react_hsbc_teller 1.1.8 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/pages/foot/foot.jsx +0 -11
- package/packages/pages/video/video.jsx +121 -81
package/package.json
CHANGED
|
@@ -47,9 +47,6 @@ export default class foot extends Component {
|
|
|
47
47
|
inspection = ()=>{
|
|
48
48
|
this.props.inspection()
|
|
49
49
|
}
|
|
50
|
-
screenSwitching =()=>{
|
|
51
|
-
this.props.screenSwitching()
|
|
52
|
-
}
|
|
53
50
|
switchExternal=()=>{
|
|
54
51
|
this.props.switchExternal()
|
|
55
52
|
}
|
|
@@ -164,14 +161,6 @@ export default class foot extends Component {
|
|
|
164
161
|
</div>
|
|
165
162
|
</div>
|
|
166
163
|
</div>
|
|
167
|
-
{/* <div className='footHover' onClick={this.screenSwitching.bind(this)}>
|
|
168
|
-
<div className="one">
|
|
169
|
-
<img className="imgClass" src={require("../../assets/img/inspection.png").default} alt="" />
|
|
170
|
-
<div className="text">
|
|
171
|
-
切换投屏
|
|
172
|
-
</div>
|
|
173
|
-
</div>
|
|
174
|
-
</div> */}
|
|
175
164
|
</div>
|
|
176
165
|
{defaultList}
|
|
177
166
|
|
|
@@ -173,11 +173,13 @@ class Video extends Component {
|
|
|
173
173
|
publish_config.publish_tag = 'tag1'
|
|
174
174
|
this.test_controller.Publish(publish_config)
|
|
175
175
|
// eslint-disable-next-line no-undef
|
|
176
|
-
|
|
176
|
+
setTimeout(() => {
|
|
177
|
+
if(this.state.imStatus && !this.state.imJoinRoom) {
|
|
177
178
|
joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
|
|
178
179
|
this.state.imJoinRoom =true
|
|
179
180
|
console.log('加入IM房间')
|
|
180
181
|
}
|
|
182
|
+
})
|
|
181
183
|
this.props.createRoomCallback({
|
|
182
184
|
type: 1,
|
|
183
185
|
errorManage: '',
|
|
@@ -1071,7 +1073,10 @@ class Video extends Component {
|
|
|
1071
1073
|
noVideoTwelve: true
|
|
1072
1074
|
})
|
|
1073
1075
|
}
|
|
1074
|
-
this.
|
|
1076
|
+
if(this.state.isPictureInPicture) {
|
|
1077
|
+
this.pictureInPicture('Refresh')
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1075
1080
|
}
|
|
1076
1081
|
}
|
|
1077
1082
|
else if (Mival.typeId == 3003) {
|
|
@@ -1147,7 +1152,9 @@ class Video extends Component {
|
|
|
1147
1152
|
noVideoTwelve: false
|
|
1148
1153
|
})
|
|
1149
1154
|
}
|
|
1150
|
-
this.
|
|
1155
|
+
if(this.state.isPictureInPicture) {
|
|
1156
|
+
this.pictureInPicture('Refresh')
|
|
1157
|
+
}
|
|
1151
1158
|
}
|
|
1152
1159
|
}
|
|
1153
1160
|
else if (Mival.typeId == 1220) {
|
|
@@ -1366,10 +1373,10 @@ class Video extends Component {
|
|
|
1366
1373
|
window.IMOpenfire = msg =>{
|
|
1367
1374
|
console.log('im登录', msg)
|
|
1368
1375
|
if(msg.status == 'error') {
|
|
1369
|
-
this.state.
|
|
1376
|
+
this.state.imStatus = false
|
|
1370
1377
|
this.roomCallBack(2, 'im建立连接失败',5)
|
|
1371
1378
|
} else if (msg.status == 'success') {
|
|
1372
|
-
this.state.imStatus =
|
|
1379
|
+
this.state.imStatus = true
|
|
1373
1380
|
setTimeout(() => {
|
|
1374
1381
|
if(this.state.imRoomId && !this.state.imJoinRoom) {
|
|
1375
1382
|
joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
|
|
@@ -1380,7 +1387,7 @@ class Video extends Component {
|
|
|
1380
1387
|
} else if (msg.status == 'close') {
|
|
1381
1388
|
if(!this.state.manualClose) {
|
|
1382
1389
|
this.timer && clearInterval(this.timer);
|
|
1383
|
-
this.state.
|
|
1390
|
+
this.state.imStatus = false
|
|
1384
1391
|
console.log('IMOpenfireclose')
|
|
1385
1392
|
this.roomCallBack(2, '账号重复登录',9)
|
|
1386
1393
|
|
|
@@ -1562,7 +1569,11 @@ class Video extends Component {
|
|
|
1562
1569
|
this.test_controller.OnMediaClose = (code, sid) => {
|
|
1563
1570
|
console.log(code, sid)
|
|
1564
1571
|
if(code == 5003 || code == 5004 || code == 5005|| code == 5007|| code == 5009|| code == 5010 || code == 5011|| code == 5012) {
|
|
1572
|
+
if(sid == document.getElementById('publish_video1').name) {
|
|
1565
1573
|
this.roomCallBack(2, '音视频异常关闭',8)
|
|
1574
|
+
} else {
|
|
1575
|
+
this.state.isScreenSwitching = false
|
|
1576
|
+
}
|
|
1566
1577
|
}
|
|
1567
1578
|
};
|
|
1568
1579
|
// 加入房间成功
|
|
@@ -1616,7 +1627,7 @@ class Video extends Component {
|
|
|
1616
1627
|
'tellerId': this.props.tellerAccount
|
|
1617
1628
|
})
|
|
1618
1629
|
});
|
|
1619
|
-
if(this.state.screenName == '
|
|
1630
|
+
if(this.state.screenName == '切换共享') {
|
|
1620
1631
|
this.state.isSharedScreen = true
|
|
1621
1632
|
this.state.isScreenSwitching = false
|
|
1622
1633
|
}
|
|
@@ -1629,7 +1640,7 @@ class Video extends Component {
|
|
|
1629
1640
|
this.enterRoom()
|
|
1630
1641
|
this.timer = setInterval(
|
|
1631
1642
|
() => {
|
|
1632
|
-
if(!this.state.voiceStatue) {
|
|
1643
|
+
if(!this.state.voiceStatue && this.state.analyserHeight.get(sid).toFixed(2) > 0) {
|
|
1633
1644
|
callNimIM('sendCustomCmdMsg', {
|
|
1634
1645
|
customId: this.state.imRoomId,
|
|
1635
1646
|
content: JSON.stringify({
|
|
@@ -1651,8 +1662,13 @@ class Video extends Component {
|
|
|
1651
1662
|
// 发布媒体流失败
|
|
1652
1663
|
this.test_controller.OnPublishFailed = (sid, err_code, err_msg) => {
|
|
1653
1664
|
console.log('发布媒体流失败', sid, err_code, err_msg)
|
|
1654
|
-
|
|
1655
|
-
|
|
1665
|
+
if(sid == document.getElementById('publish_video1').name) {
|
|
1666
|
+
this.state.sessionType = false
|
|
1667
|
+
this.roomCallBack(2, '发布失败',4)
|
|
1668
|
+
} else {
|
|
1669
|
+
this.messageClick('投屏失败请重新投屏','error')
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1656
1672
|
};
|
|
1657
1673
|
// 订阅媒体流成功
|
|
1658
1674
|
this.test_controller.OnSubscribeSucc = (feed, sid) => {
|
|
@@ -2076,78 +2092,92 @@ class Video extends Component {
|
|
|
2076
2092
|
if (!document.getElementById("video1").name) {
|
|
2077
2093
|
this.setState({
|
|
2078
2094
|
videoOneName: '',
|
|
2079
|
-
voiceVideoOne: false
|
|
2095
|
+
voiceVideoOne: false,
|
|
2096
|
+
noVideoOne: false
|
|
2080
2097
|
})
|
|
2081
2098
|
}
|
|
2082
2099
|
if (!document.getElementById("video2").name) {
|
|
2083
2100
|
this.setState({
|
|
2084
2101
|
videoTwoName: '',
|
|
2085
|
-
voiceVideoTwo: false
|
|
2102
|
+
voiceVideoTwo: false,
|
|
2103
|
+
noVideoTwo: false
|
|
2086
2104
|
})
|
|
2087
2105
|
}
|
|
2088
2106
|
if (!document.getElementById("video3").name) {
|
|
2089
2107
|
this.setState({
|
|
2090
2108
|
videoThreeName: '',
|
|
2091
|
-
voiceVideoThree: false
|
|
2109
|
+
voiceVideoThree: false,
|
|
2110
|
+
noVideoThree: false
|
|
2092
2111
|
})
|
|
2093
2112
|
}
|
|
2094
2113
|
if (!document.getElementById("video4").name) {
|
|
2095
2114
|
this.setState({
|
|
2096
2115
|
videoFourName: '',
|
|
2097
2116
|
voiceVideoFour: false,
|
|
2117
|
+
noVideoFour: false
|
|
2098
2118
|
})
|
|
2099
2119
|
}
|
|
2100
2120
|
if (!document.getElementById("video5").name) {
|
|
2101
2121
|
this.setState({
|
|
2102
2122
|
videoFiveName: '',
|
|
2103
|
-
voiceVideoFive: false
|
|
2123
|
+
voiceVideoFive: false,
|
|
2124
|
+
noVideoFive: false
|
|
2104
2125
|
})
|
|
2105
2126
|
}
|
|
2106
2127
|
if (!document.getElementById("video6").name) {
|
|
2107
2128
|
this.setState({
|
|
2108
2129
|
videoSixName: '',
|
|
2109
|
-
voiceVideoSix: false
|
|
2130
|
+
voiceVideoSix: false,
|
|
2131
|
+
noVideoSix: false
|
|
2110
2132
|
})
|
|
2111
2133
|
}
|
|
2112
2134
|
|
|
2113
2135
|
if (!document.getElementById("video7").name) {
|
|
2114
2136
|
this.setState({
|
|
2115
2137
|
videoSevenName: '',
|
|
2116
|
-
voiceVideoSeven: false
|
|
2138
|
+
voiceVideoSeven: false,
|
|
2139
|
+
noVideoSeven: false
|
|
2117
2140
|
})
|
|
2118
2141
|
}
|
|
2119
2142
|
if (!document.getElementById("video8").name) {
|
|
2120
2143
|
this.setState({
|
|
2121
2144
|
videoEightName: '',
|
|
2122
|
-
voiceVideoEight: false
|
|
2145
|
+
voiceVideoEight: false,
|
|
2146
|
+
noVideoEight: false
|
|
2123
2147
|
})
|
|
2124
2148
|
}
|
|
2125
2149
|
if (!document.getElementById("video9").name) {
|
|
2126
2150
|
this.setState({
|
|
2127
2151
|
videoNineName: '',
|
|
2128
|
-
voiceVideoNine: false
|
|
2152
|
+
voiceVideoNine: false,
|
|
2153
|
+
noVideoNine: false
|
|
2129
2154
|
})
|
|
2130
2155
|
}
|
|
2131
2156
|
if (!document.getElementById("video10").name) {
|
|
2132
2157
|
this.setState({
|
|
2133
2158
|
videoTenName: '',
|
|
2134
|
-
voiceVideoTen: false
|
|
2159
|
+
voiceVideoTen: false,
|
|
2160
|
+
noVideoTen: false
|
|
2135
2161
|
})
|
|
2136
2162
|
}
|
|
2137
2163
|
if (!document.getElementById("video11").name) {
|
|
2138
2164
|
this.setState({
|
|
2139
2165
|
videoElevenName: '',
|
|
2140
|
-
voiceVideoEleven: false
|
|
2166
|
+
voiceVideoEleven: false,
|
|
2167
|
+
noVideoEleven: false
|
|
2141
2168
|
})
|
|
2142
2169
|
}
|
|
2143
2170
|
if (!document.getElementById("video12").name) {
|
|
2144
2171
|
this.setState({
|
|
2145
2172
|
videoTwelveName: '',
|
|
2146
|
-
voiceVideoTwelve: false
|
|
2173
|
+
voiceVideoTwelve: false,
|
|
2174
|
+
noVideoTwelve: false
|
|
2147
2175
|
})
|
|
2148
2176
|
}
|
|
2149
2177
|
this.state.analyserData.delete(sid)
|
|
2150
|
-
this.
|
|
2178
|
+
if(this.state.isPictureInPicture) {
|
|
2179
|
+
this.pictureInPicture('Refresh')
|
|
2180
|
+
}
|
|
2151
2181
|
};
|
|
2152
2182
|
// 推送“取消发布”给与会者
|
|
2153
2183
|
this.test_controller.OnUnPublish = (feed) => {
|
|
@@ -2342,7 +2372,7 @@ class Video extends Component {
|
|
|
2342
2372
|
})
|
|
2343
2373
|
}
|
|
2344
2374
|
if (sid == document.getElementById('video20').name) {
|
|
2345
|
-
if(this.state.screenName == '
|
|
2375
|
+
if(this.state.screenName == '切换共享') {
|
|
2346
2376
|
this.state.isSharedScreen = true
|
|
2347
2377
|
this.state.isScreenSwitching = false
|
|
2348
2378
|
}
|
|
@@ -2360,7 +2390,19 @@ class Video extends Component {
|
|
|
2360
2390
|
loading: false
|
|
2361
2391
|
})
|
|
2362
2392
|
this.messageClick('切换摄像头或麦克风失败,请先检查设备','error')
|
|
2363
|
-
}
|
|
2393
|
+
} else if(this.state.screenName == '切换共享') {
|
|
2394
|
+
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
2395
|
+
this.state.isSharedScreen = false
|
|
2396
|
+
this.state.isScreenSwitching = false
|
|
2397
|
+
this.setState({
|
|
2398
|
+
screenName: '共享模式'
|
|
2399
|
+
});
|
|
2400
|
+
console.log(pictureInPictureVideo)
|
|
2401
|
+
this.tabTitlesClick('RMScreen', 'delect')
|
|
2402
|
+
if (this.state.isPictureInPicture) {
|
|
2403
|
+
document.exitPictureInPicture()
|
|
2404
|
+
}
|
|
2405
|
+
}
|
|
2364
2406
|
};
|
|
2365
2407
|
// 服务端录制初始化成功
|
|
2366
2408
|
this.test_controller.OnInitRemoteRecordSucc = (
|
|
@@ -2371,20 +2413,20 @@ class Video extends Component {
|
|
|
2371
2413
|
};
|
|
2372
2414
|
this.test_controller.OnVolumeAnalyser = (sid, analyser) => {
|
|
2373
2415
|
clearInterval(this.state.OnVolumeAnalyserMap.get(sid))
|
|
2374
|
-
let publish_sid = document.getElementById('publish_video1').name || document.getElementById('publish_streamId1').name;
|
|
2375
|
-
let subscribe_sid1 = document.getElementById('video1').name || document.getElementById('audio1').name;
|
|
2376
|
-
let subscribe_sid2 = document.getElementById('video2').name || document.getElementById('audio2').name;
|
|
2377
|
-
let subscribe_sid3 = document.getElementById('video3').name || document.getElementById('audio3').name;
|
|
2378
|
-
let subscribe_sid4 = document.getElementById('video4').name || document.getElementById('audio4').name;
|
|
2379
|
-
let subscribe_sid5 = document.getElementById('video5').name || document.getElementById('audio5').name;
|
|
2380
|
-
let subscribe_sid6 = document.getElementById('video6').name || document.getElementById('audio6').name;
|
|
2381
|
-
|
|
2382
|
-
let subscribe_sid7 = document.getElementById('video7').name || document.getElementById('audio7').name;
|
|
2383
|
-
let subscribe_sid8 = document.getElementById('video8').name || document.getElementById('audio8').name;
|
|
2384
|
-
let subscribe_sid9 = document.getElementById('video9').name || document.getElementById('audio9').name;
|
|
2385
|
-
let subscribe_sid10 = document.getElementById('video10').name || document.getElementById('audio10').name;
|
|
2386
|
-
let subscribe_sid11 = document.getElementById('video11').name || document.getElementById('audio11').name;
|
|
2387
|
-
let subscribe_sid12 = document.getElementById('video12').name || document.getElementById('audio12').name;
|
|
2416
|
+
let publish_sid = (document.getElementById('publish_video1') ? document.getElementById('publish_video1').name : '') || (document.getElementById('publish_streamId1') ? document.getElementById('publish_streamId1').name : '');
|
|
2417
|
+
let subscribe_sid1 = (document.getElementById('video1') ? document.getElementById('video1').name : '') || (document.getElementById('audio1') ? document.getElementById('audio1').name : '');
|
|
2418
|
+
let subscribe_sid2 = (document.getElementById('video2') ? document.getElementById('video2').name : '') || (document.getElementById('audio2') ? document.getElementById('audio2').name : '');
|
|
2419
|
+
let subscribe_sid3 =(document.getElementById('video3') ? document.getElementById('video3').name : '') || (document.getElementById('audio3') ? document.getElementById('audio3').name : '');
|
|
2420
|
+
let subscribe_sid4 = (document.getElementById('video4') ? document.getElementById('video4').name : '') || (document.getElementById('audio4') ? document.getElementById('audio4').name : '');
|
|
2421
|
+
let subscribe_sid5 = (document.getElementById('video5') ? document.getElementById('video5').name : '') || (document.getElementById('audio5') ? document.getElementById('audio5').name : '');
|
|
2422
|
+
let subscribe_sid6 = (document.getElementById('video6') ? document.getElementById('video6').name : '') || (document.getElementById('audio6') ? document.getElementById('audio6').name : '');
|
|
2423
|
+
|
|
2424
|
+
let subscribe_sid7 = (document.getElementById('video7') ? document.getElementById('video7').name : '') || (document.getElementById('audio7') ? document.getElementById('audio7').name : '');
|
|
2425
|
+
let subscribe_sid8 = (document.getElementById('video8') ? document.getElementById('video8').name : '') || (document.getElementById('audio8') ? document.getElementById('audio8').name : '');
|
|
2426
|
+
let subscribe_sid9 = (document.getElementById('video9') ? document.getElementById('video9').name : '') || (document.getElementById('audio9') ? document.getElementById('audio9').name : '');
|
|
2427
|
+
let subscribe_sid10 = (document.getElementById('video10') ? document.getElementById('video10').name : '') || (document.getElementById('audio10') ? document.getElementById('audio10').name : '');
|
|
2428
|
+
let subscribe_sid11 = (document.getElementById('video11') ? document.getElementById('video11').name : '') || (document.getElementById('audio11') ? document.getElementById('audio11').name : '');
|
|
2429
|
+
let subscribe_sid12 = (document.getElementById('video12') ? document.getElementById('video12').name : '') || (document.getElementById('audio12') ? document.getElementById('audio12').name : '');
|
|
2388
2430
|
|
|
2389
2431
|
let volumeView;
|
|
2390
2432
|
switch (sid) {
|
|
@@ -2451,7 +2493,7 @@ class Video extends Component {
|
|
|
2451
2493
|
}
|
|
2452
2494
|
|
|
2453
2495
|
for (var i = 0; i < 40; i++) {
|
|
2454
|
-
let energy = (dataArray[step * i] / 256.0) *
|
|
2496
|
+
let energy = (dataArray[step * i] / 256.0) * 100;
|
|
2455
2497
|
ctx.beginPath();
|
|
2456
2498
|
ctx.fillStyle = this.props.voiceColor;
|
|
2457
2499
|
const { x1, y1, x2, y2 } = drawArea
|
|
@@ -2461,7 +2503,7 @@ class Video extends Component {
|
|
|
2461
2503
|
let startY = y1 - height // 绘制起始点y
|
|
2462
2504
|
ctx.fillRect(startX, startY, width, height)
|
|
2463
2505
|
if(document.getElementById('publish_video1').name == sid) {
|
|
2464
|
-
this.state.analyserHeight.set(sid,energy/
|
|
2506
|
+
this.state.analyserHeight.set(sid,energy/25)
|
|
2465
2507
|
this.state.analyserHeight = this.state.analyserHeight
|
|
2466
2508
|
}
|
|
2467
2509
|
|
|
@@ -2482,9 +2524,32 @@ class Video extends Component {
|
|
|
2482
2524
|
if(this.state.isScreenSwitching) {
|
|
2483
2525
|
this.state.isScreenSwitching = false
|
|
2484
2526
|
} else {
|
|
2485
|
-
|
|
2486
|
-
|
|
2527
|
+
// if (this.state.isWhiteboard) {
|
|
2528
|
+
// publish_config.publish_device = 4
|
|
2529
|
+
// publish_config.media_type = 1
|
|
2530
|
+
// publish_config.sid = document.getElementById('video20').name
|
|
2531
|
+
// publish_config.part_of_screen_id = 'touBoxItem'
|
|
2532
|
+
// publish_config.video_profile_type = 5
|
|
2533
|
+
// this.test_controller.ChangeMediaStream(publish_config);
|
|
2534
|
+
// this.setState({
|
|
2535
|
+
// isPDF: true,
|
|
2536
|
+
// })
|
|
2537
|
+
// } else {
|
|
2538
|
+
document.getElementById('video20') && document.getElementById('video20').name ? this.test_controller.UnPublish(document.getElementById('video20').name) : ''
|
|
2539
|
+
// }
|
|
2540
|
+
this.state.isSharedScreen = false
|
|
2541
|
+
this.state.isScreenSwitching = false
|
|
2542
|
+
this.setState({
|
|
2543
|
+
screenName: '共享模式'
|
|
2544
|
+
});
|
|
2545
|
+
console.log(pictureInPictureVideo)
|
|
2546
|
+
this.tabTitlesClick('RMScreen', 'delect')
|
|
2547
|
+
if (this.state.isPictureInPicture) {
|
|
2548
|
+
document.exitPictureInPicture()
|
|
2487
2549
|
}
|
|
2550
|
+
// if (!this.state.laveRoomSharedScreen && this.state.isSharedScreen) {
|
|
2551
|
+
// this.sharedScreen()
|
|
2552
|
+
// }
|
|
2488
2553
|
}
|
|
2489
2554
|
|
|
2490
2555
|
|
|
@@ -2559,6 +2624,10 @@ class Video extends Component {
|
|
|
2559
2624
|
}
|
|
2560
2625
|
}
|
|
2561
2626
|
finishSession = () => {
|
|
2627
|
+
// clearInterval(this.state.OnVolumeAnalyserMap.get(sid))
|
|
2628
|
+
this.state.OnVolumeAnalyserMap.forEach((value,key,map)=>{
|
|
2629
|
+
clearInterval(value)
|
|
2630
|
+
})
|
|
2562
2631
|
this.timer && clearInterval(this.timer);
|
|
2563
2632
|
if(this.state.isSharedScreen) {
|
|
2564
2633
|
this.setState({
|
|
@@ -2787,7 +2856,7 @@ class Video extends Component {
|
|
|
2787
2856
|
}
|
|
2788
2857
|
};
|
|
2789
2858
|
isFileSuccuse = () => {
|
|
2790
|
-
if (!this.state.sessionId || this.state.
|
|
2859
|
+
if (!this.state.sessionId || !this.state.sessionType || !this.state.imStatus) {
|
|
2791
2860
|
this.messageClick('当前程序异常请先退出重开','error')
|
|
2792
2861
|
return false
|
|
2793
2862
|
} else {
|
|
@@ -2844,9 +2913,13 @@ class Video extends Component {
|
|
|
2844
2913
|
}
|
|
2845
2914
|
}
|
|
2846
2915
|
};
|
|
2847
|
-
|
|
2916
|
+
sharedScreen = () => {
|
|
2917
|
+
console.log('投屏')
|
|
2848
2918
|
if (this.isFileSuccuse()) {
|
|
2849
2919
|
const publish_config = {};
|
|
2920
|
+
if(streamShare) {
|
|
2921
|
+
streamShare.getTracks().forEach(track => track.stop());
|
|
2922
|
+
}
|
|
2850
2923
|
if (this.state.isSharedScreen) {
|
|
2851
2924
|
const publish_config = {}
|
|
2852
2925
|
publish_config.media_type = 1
|
|
@@ -2859,40 +2932,6 @@ class Video extends Component {
|
|
|
2859
2932
|
publish_config.sid = document.getElementById('video20').name
|
|
2860
2933
|
this.test_controller.ChangeMediaStream(publish_config)
|
|
2861
2934
|
this.state.isScreenSwitching = true
|
|
2862
|
-
}
|
|
2863
|
-
}
|
|
2864
|
-
}
|
|
2865
|
-
sharedScreen = () => {
|
|
2866
|
-
console.log('投屏')
|
|
2867
|
-
if (this.isFileSuccuse()) {
|
|
2868
|
-
const publish_config = {};
|
|
2869
|
-
if(streamShare) {
|
|
2870
|
-
streamShare.getTracks().forEach(track => track.stop());
|
|
2871
|
-
}
|
|
2872
|
-
if (this.state.isSharedScreen) {
|
|
2873
|
-
// if (this.state.isWhiteboard) {
|
|
2874
|
-
// publish_config.publish_device = 4
|
|
2875
|
-
// publish_config.media_type = 1
|
|
2876
|
-
// publish_config.sid = document.getElementById('video20').name
|
|
2877
|
-
// publish_config.part_of_screen_id = 'touBoxItem'
|
|
2878
|
-
// publish_config.video_profile_type = 5
|
|
2879
|
-
// this.test_controller.ChangeMediaStream(publish_config);
|
|
2880
|
-
// this.setState({
|
|
2881
|
-
// isPDF: true,
|
|
2882
|
-
// })
|
|
2883
|
-
// } else {
|
|
2884
|
-
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
2885
|
-
// }
|
|
2886
|
-
this.state.isSharedScreen = false
|
|
2887
|
-
this.state.isScreenSwitching = false
|
|
2888
|
-
this.setState({
|
|
2889
|
-
screenName: '共享模式'
|
|
2890
|
-
});
|
|
2891
|
-
console.log(pictureInPictureVideo)
|
|
2892
|
-
this.tabTitlesClick('RMScreen', 'delect')
|
|
2893
|
-
if (this.state.isPictureInPicture) {
|
|
2894
|
-
document.exitPictureInPicture()
|
|
2895
|
-
}
|
|
2896
2935
|
} else {
|
|
2897
2936
|
if (document.getElementById('video20').name) {
|
|
2898
2937
|
publish_config.media_type = 1;
|
|
@@ -2919,7 +2958,7 @@ class Video extends Component {
|
|
|
2919
2958
|
// this.state.isSharedScreen = true
|
|
2920
2959
|
// this.state.isScreenSwitching = false
|
|
2921
2960
|
this.setState({
|
|
2922
|
-
screenName: '
|
|
2961
|
+
screenName: '切换共享',
|
|
2923
2962
|
isPDF: false
|
|
2924
2963
|
})
|
|
2925
2964
|
this.tabTitlesClick(
|
|
@@ -3258,7 +3297,9 @@ class Video extends Component {
|
|
|
3258
3297
|
videoTwelveName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户12'
|
|
3259
3298
|
})
|
|
3260
3299
|
}
|
|
3261
|
-
this.
|
|
3300
|
+
if(this.state.isPictureInPicture) {
|
|
3301
|
+
this.pictureInPicture('Refresh')
|
|
3302
|
+
}
|
|
3262
3303
|
} catch (err) {
|
|
3263
3304
|
if(err.status == 502 || err.status== 404) {
|
|
3264
3305
|
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
@@ -4065,7 +4106,6 @@ class Video extends Component {
|
|
|
4065
4106
|
ocrClick={this.ocrClick}
|
|
4066
4107
|
switchExternal={this.switchExternalAge}
|
|
4067
4108
|
inspection={this.inspection}
|
|
4068
|
-
screenSwitching={this.screenSwitching}
|
|
4069
4109
|
></Foot>
|
|
4070
4110
|
<Modal cancelText="取消" okText="确定" visible={this.state.isModalVisible} onOk={this.handleOk}
|
|
4071
4111
|
onCancel={this.handleCancel}>
|