cordova-plugin-trtc/www/trtc.js

24 lines
606 B
JavaScript
Raw Permalink Normal View History

2021-12-21 16:35:16 +08:00
var exec = require('cordova/exec');
function Trtc() {}
Trtc.prototype.joinChannel = function(arg, success, error) {
exec(success, error, 'Trtc', 'joinChannel', [arg]);
};
2021-12-26 19:03:41 +08:00
Trtc.prototype.userInfoChange = function(userInfo,success, error) {
exec(success, error, 'Trtc', 'userInfoChange', [userInfo]);
2021-12-27 11:25:27 +08:00
};
2021-12-26 19:03:41 +08:00
Trtc.prototype.fireEvent = function(event,extra) {
cordova.fireDocumentEvent("trtc."+event, extra);
2021-12-27 11:25:27 +08:00
};
Trtc.prototype.Constant = {
EVENT_ON_LAYOUT_CHANGE :'trtc.onLayoutChangeMessage',
EVENT_ON_USER_VIDEO_AVAILABLE :'trtc.onUserVideoAvailable',
};
2021-12-21 16:35:16 +08:00
module.exports = new Trtc();