Better video stop treatment in HTML5
This commit is contained in:
parent
0974c69d48
commit
2e3ea4e45f
@ -299,16 +299,12 @@ export default class VideoDock extends Component {
|
|||||||
|
|
||||||
stop(id) {
|
stop(id) {
|
||||||
const { users } = this.props;
|
const { users } = this.props;
|
||||||
if (id == users[0].userId) {
|
this.sendMessage({
|
||||||
// this.unshareWebcam();
|
type: 'video',
|
||||||
|
role: id == users[0].userId ? 'shared' : 'viewer',
|
||||||
this.sendMessage({
|
id: 'stop',
|
||||||
type: 'video',
|
cameraId: id,
|
||||||
role: 'shared',
|
});
|
||||||
id: 'stop',
|
|
||||||
cameraId: id,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.destroyWebRTCPeer(id);
|
this.destroyWebRTCPeer(id);
|
||||||
this.destroyVideoTag(id);
|
this.destroyVideoTag(id);
|
||||||
@ -426,7 +422,13 @@ export default class VideoDock extends Component {
|
|||||||
log('info', 'Handle play stop <--------------------');
|
log('info', 'Handle play stop <--------------------');
|
||||||
log('error', message);
|
log('error', message);
|
||||||
|
|
||||||
this.stop(message.cameraId);
|
const { users } = this.props;
|
||||||
|
|
||||||
|
if (message.cameraId == users[0].userId) {
|
||||||
|
this.unshareWebcam();
|
||||||
|
} else {
|
||||||
|
this.stop(message.cameraId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePlayStart(message) {
|
handlePlayStart(message) {
|
||||||
|
Loading…
Reference in New Issue
Block a user