mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	Fix double ui.
This commit is contained in:
		
							parent
							
								
									9b659ad3b8
								
							
						
					
					
						commit
						5e6b41f8bf
					
				
					 1 changed files with 14 additions and 15 deletions
				
			
		| 
						 | 
					@ -47,7 +47,7 @@ export default {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        this.player = player;
 | 
					                        this.player = player;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        this.setPlayerAttrs(player, videoEl, dash, shaka);
 | 
					                        this.setPlayerAttrs(this.player, videoEl, dash, shaka);
 | 
				
			||||||
                    });
 | 
					                    });
 | 
				
			||||||
            else this.setPlayerAttrs(this.player, videoEl, dash, this.shaka);
 | 
					            else this.setPlayerAttrs(this.player, videoEl, dash, this.shaka);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -85,28 +85,27 @@ export default {
 | 
				
			||||||
            player.load("data:application/dash+xml;charset=utf-8;base64," + btoa(dash)).then(() => {
 | 
					            player.load("data:application/dash+xml;charset=utf-8;base64," + btoa(dash)).then(() => {
 | 
				
			||||||
                this.video.subtitles.map(subtitle => {
 | 
					                this.video.subtitles.map(subtitle => {
 | 
				
			||||||
                    player.addTextTrack(subtitle.url, "eng", "SUBTITLE", subtitle.mimeType, null, "English");
 | 
					                    player.addTextTrack(subtitle.url, "eng", "SUBTITLE", subtitle.mimeType, null, "English");
 | 
				
			||||||
                    player.setTextTrackVisibility(true);
 | 
					 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
                if (localStorage) videoEl.volume = localStorage.getItem("volume") || 1;
 | 
					                if (localStorage) videoEl.volume = localStorage.getItem("volume") || 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                const ui =
 | 
					                if (!this.ui) {
 | 
				
			||||||
                    this.ui ||
 | 
					                    this.ui = new shaka.ui.Overlay(
 | 
				
			||||||
                    (this.ui = new shaka.ui.Overlay(
 | 
					 | 
				
			||||||
                        player,
 | 
					                        player,
 | 
				
			||||||
                        document.querySelector("div[data-shaka-player-container]"),
 | 
					                        document.querySelector("div[data-shaka-player-container]"),
 | 
				
			||||||
                        videoEl,
 | 
					                        videoEl,
 | 
				
			||||||
                    ));
 | 
					                    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                const config = {
 | 
					                    const config = {
 | 
				
			||||||
                    overflowMenuButtons: ["quality", "captions", "playback_rate"],
 | 
					                        overflowMenuButtons: ["quality", "captions", "playback_rate"],
 | 
				
			||||||
                    seekBarColors: {
 | 
					                        seekBarColors: {
 | 
				
			||||||
                        base: "rgba(255, 255, 255, 0.3)",
 | 
					                            base: "rgba(255, 255, 255, 0.3)",
 | 
				
			||||||
                        buffered: "rgba(255, 255, 255, 0.54)",
 | 
					                            buffered: "rgba(255, 255, 255, 0.54)",
 | 
				
			||||||
                        played: "rgb(255, 0, 0)",
 | 
					                            played: "rgb(255, 0, 0)",
 | 
				
			||||||
                    },
 | 
					                        },
 | 
				
			||||||
                };
 | 
					                    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                ui.configure(config);
 | 
					                    this.ui.configure(config);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue