Embed: WebRTC improvements:

- make webrtc obey autoplay = false; when video is paused, disable autoplay and vise versa
- silenced some unneccesary webrtc errors
- webrtc: pause player on stop, so that "stream offline" message is shown
- improved webrtc wrapper robustness
- more webrtc don't autoplay when paused
- when not yet connected during a seek, wait until connected and seek then
This commit is contained in:
Cat 2020-01-28 11:22:17 +01:00 committed by Thulinma
parent 01b957d136
commit 214b584956
6 changed files with 51 additions and 10 deletions

View file

@ -900,6 +900,7 @@ MistSkins["default"] = {
//obey video states
MistUtil.event.addListener(video,"playing",function(){
button.setState("playing");
MistVideo.options.autoplay = true;
},button);
MistUtil.event.addListener(video,"pause",function(){
button.setState("paused");
@ -919,6 +920,7 @@ MistSkins["default"] = {
}
else {
MistVideo.player.api.pause();
MistVideo.options.autoplay = false;
}
});
@ -926,7 +928,10 @@ MistSkins["default"] = {
if (MistVideo.player.api) {
MistUtil.event.addListener(MistVideo.video,"click",function(){
if (MistVideo.player.api.paused) { MistVideo.player.api.play(); }
else if (!MistUtil.isTouchDevice()) { MistVideo.player.api.pause(); }
else if (!MistUtil.isTouchDevice()) {
MistVideo.player.api.pause();
MistVideo.options.autoplay = false;
}
},button);
}