
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
trtc-electron-sdk
Advanced tools
npm install trtc-electron-sdk (确认联网状态)
//1、引入库
const TrtcEngine = require('trtc-electron-sdk');
//2、构建Trtc
this.rtcEngine = new TrtcEngine();
//3、注册回调
subscribeEvents = (rtcEngine) => {
rtcEngine.on('onerror', (errcode, errmsg) => {
console.info('trtc_demo: onerror :' + errcode + " msg" + errmsg);
});
rtcEngine.on('enterroom', (elapsed) => {
console.info('trtc_demo: enterroom elapsed:' + elapsed);
});
rtcEngine.on('exitroom', (reason) => {
console.info('exitroom: userenter reason:' + reason);
});
//.....
//.....
};
subscribeEvents(this.rtcEngine);
//4、进入房间
enterroom () {
//1. 开本地视频
this.enableVideoCapture(this.enableCamera);
//2. 编码参数
let encparam = {
videoResolution: TrtcEngine.TRTCVideoResolution.TRTCVideoResolution_640_360,
videoFps: 15,
videoBitrate: 600
};
this.rtcEngine.setVideoEncoderParam(encparam);
//3. 进房参数
let param = {
sdkAppId: this.sdkAppId,
roomId: this.roomID,
userSig: this.findUserSig(this.userId),
userId: this.userId,
privateMapKey: '',
businessInfo: ''
};
this.rtcEngine.enterRoom(param, 0);
},
//5、退出房间
exitroom() {
this.rtcEngine.exitRoom();
},
//6、开启视频
enableVideoCapture(bEnable) {
if (bEnable) {
let view = this.findView("local", 0);
this.rtcEngine.startLocalPreview(view);
}
else {
this.rtcEngine.stopLocalPreview();
}
},
//7、开启音频
enableAudioCapture(bEnable) {
if (bEnable) {
this.rtcEngine.startLocalAudio();
}
else {
this.rtcEngine.stopLocalAudio();
}
},
demo: http://git.code.oa.com/TICSDK/TRTC_Electron_Demo.git
FAQs
trtc electron sdk
The npm package trtc-electron-sdk receives a total of 72 weekly downloads. As such, trtc-electron-sdk popularity was classified as not popular.
We found that trtc-electron-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.