Avoid bug at init
This commit is contained in:
parent
e26971d995
commit
d1bd418e89
|
@ -36,6 +36,7 @@ function setupApp(app) {
|
||||||
let hls;
|
let hls;
|
||||||
|
|
||||||
app.ports.polymnyVideoInit.subscribe(function(arg) {
|
app.ports.polymnyVideoInit.subscribe(function(arg) {
|
||||||
|
requestAnimationFrame(function() {
|
||||||
const video = document.getElementById(arg[0]);
|
const video = document.getElementById(arg[0]);
|
||||||
if (Hls.isSupported()) {
|
if (Hls.isSupported()) {
|
||||||
hls = new Hls();
|
hls = new Hls();
|
||||||
|
@ -68,6 +69,7 @@ function setupApp(app) {
|
||||||
video.src = arg[1];
|
video.src = arg[1];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
app.ports.polymnyVideoPlayPause.subscribe(function(arg) {
|
app.ports.polymnyVideoPlayPause.subscribe(function(arg) {
|
||||||
const video = document.getElementById(arg);
|
const video = document.getElementById(arg);
|
||||||
|
|
Loading…
Reference in New Issue