mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	cleanup + add color to seekbar.
This commit is contained in:
		
							parent
							
								
									3bf14b1547
								
							
						
					
					
						commit
						fefbb95b16
					
				
					 1 changed files with 9 additions and 5 deletions
				
			
		| 
						 | 
					@ -91,7 +91,6 @@ export default {
 | 
				
			||||||
            video: {
 | 
					            video: {
 | 
				
			||||||
                title: "Loading..."
 | 
					                title: "Loading..."
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            player: null,
 | 
					 | 
				
			||||||
            sponsors: null,
 | 
					            sponsors: null,
 | 
				
			||||||
            selectedAutoPlay: null,
 | 
					            selectedAutoPlay: null,
 | 
				
			||||||
            showDesc: true
 | 
					            showDesc: true
 | 
				
			||||||
| 
						 | 
					@ -103,7 +102,7 @@ export default {
 | 
				
			||||||
        this.getSponsors();
 | 
					        this.getSponsors();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    beforeUnmount() {
 | 
					    beforeUnmount() {
 | 
				
			||||||
        if (this.player) {
 | 
					        if (window.player) {
 | 
				
			||||||
            window.player.destroy();
 | 
					            window.player.destroy();
 | 
				
			||||||
            window.player = undefined;
 | 
					            window.player = undefined;
 | 
				
			||||||
            window.ui = undefined;
 | 
					            window.ui = undefined;
 | 
				
			||||||
| 
						 | 
					@ -181,7 +180,12 @@ export default {
 | 
				
			||||||
                            "quality",
 | 
					                            "quality",
 | 
				
			||||||
                            "captions",
 | 
					                            "captions",
 | 
				
			||||||
                            "playback_rate"
 | 
					                            "playback_rate"
 | 
				
			||||||
                        ]
 | 
					                        ],
 | 
				
			||||||
 | 
					                        seekBarColors: {
 | 
				
			||||||
 | 
					                            base: "rgba(255, 255, 255, 0.3)",
 | 
				
			||||||
 | 
					                            buffered: "rgba(255, 255, 255, 0.54)",
 | 
				
			||||||
 | 
					                            played: "rgb(255, 0, 0)"
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
                    };
 | 
					                    };
 | 
				
			||||||
                    ui.configure(config);
 | 
					                    ui.configure(config);
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
| 
						 | 
					@ -199,7 +203,7 @@ export default {
 | 
				
			||||||
                        .replaceAll("https://www.youtube.com", "")
 | 
					                        .replaceAll("https://www.youtube.com", "")
 | 
				
			||||||
                        .replaceAll("\n", "<br>");
 | 
					                        .replaceAll("\n", "<br>");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    const noPrevPlayer = !this.player;
 | 
					                    const noPrevPlayer = !window.player;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    var streams = [];
 | 
					                    var streams = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -247,7 +251,7 @@ export default {
 | 
				
			||||||
                    videoEl.setAttribute("poster", this.video.thumbnailUrl);
 | 
					                    videoEl.setAttribute("poster", this.video.thumbnailUrl);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    if (this.$route.query.t)
 | 
					                    if (this.$route.query.t)
 | 
				
			||||||
                        this.player.currentTime(this.$route.query.t);
 | 
					                        videoEl.currentTime = this.$route.query.t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    videoEl.addEventListener("loadedmetadata", function() {
 | 
					                    videoEl.addEventListener("loadedmetadata", function() {
 | 
				
			||||||
                        const track = this.addTextTrack(
 | 
					                        const track = this.addTextTrack(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue