File tree Expand file tree Collapse file tree 3 files changed +25
-6
lines changed Expand file tree Collapse file tree 3 files changed +25
-6
lines changed Original file line number Diff line number Diff line change 1111 "babel-plugin-transform-runtime" : " ^6.23.0" ,
1212 "chalk" : " ^1.1.3" ,
1313 "crypto-js" : " ^3.1.9-1" ,
14- "easemob-websdk" : " ^3.4.0-beta " ,
14+ "easemob-websdk" : " ^3.4.2 " ,
1515 "eslint" : " ^4.13.0" ,
1616 "eslint-plugin-flowtype" : " ^2.50.3" ,
1717 "eslint-plugin-react" : " ^7.14.3" ,
3939 "@testing-library/user-event" : " ^7.1.2" ,
4040 "@typescript-eslint/eslint-plugin" : " ^2.10.0" ,
4141 "@typescript-eslint/parser" : " ^2.10.0" ,
42+ "agora-rtc-sdk-ng" : " ^4.2.1" ,
4243 "ansi-styles" : " ^3.2.0" ,
4344 "autoprefixer" : " 7.1.1" ,
4445 "axios" : " ^0.19.0" ,
Original file line number Diff line number Diff line change 22//import "script-loader!easemob-websdk/dist/strophe-1.2.8.js"
33/* eslint-enable */
44
5- import websdk from './websdk3.4.1 '
6- // import websdk from 'easemob-websdk'
5+ // import websdk from './websdk3.4.2 '
6+ import websdk from 'easemob-websdk'
77import webrtc from './EMedia_x1v1_3.4.1'
88// import webrtc from 'easemob-webrtc'
99
@@ -13,6 +13,17 @@ import emoji from './emoji'
1313import Api from 'axios'
1414import { message } from 'antd'
1515import loglevel from '@/utils/loglevel'
16+ import AgoraRTC from "agora-rtc-sdk-ng"
17+
18+
19+ const rtc = {
20+ // 用来放置本地客户端。
21+ client : null ,
22+ // 用来放置本地音视频频轨道对象。
23+ localAudioTrack : null ,
24+ localVideoTrack : null ,
25+ } ;
26+ rtc . client = AgoraRTC . createClient ( { mode : "rtc" , codec : "vp8" } ) ;
1627
1728console = console || { }
1829console . group = console . group || function ( ) { }
@@ -95,4 +106,6 @@ WebIM.WebRTC = webrtc;
95106
96107WebIM . EMedia = webrtc . emedia
97108webrtc . emedia . config . consoleLogger = false
109+ WebIM . rtc = rtc ;
110+ WebIM . AgoraRTC = AgoraRTC ;
98111export default WebIM
You can’t perform that action at this time.
0 commit comments