Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
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 147 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.