cordova-plugin-trtc/www/trtc.js
2021-12-26 19:03:41 +08:00

18 lines
449 B
JavaScript

var exec = require('cordova/exec');
function Trtc() {}
Trtc.prototype.joinChannel = function(arg, success, error) {
exec(success, error, 'Trtc', 'joinChannel', [arg]);
};
Trtc.prototype.userInfoChange = function(userInfo,success, error) {
exec(success, error, 'Trtc', 'userInfoChange', [userInfo]);
}
Trtc.prototype.fireEvent = function(event,extra) {
cordova.fireDocumentEvent("trtc."+event, extra);
}
module.exports = new Trtc();