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