mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	Fix playback of LBRY streams.
This commit is contained in:
		
							parent
							
								
									c1a2aef8e3
								
							
						
					
					
						commit
						44607bf429
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -71,17 +71,21 @@ export default {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            const MseSupport = window.MediaSource !== undefined;
 | 
					            const MseSupport = window.MediaSource !== undefined;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            const lbry = this.video.videoStreams.filter(stream => stream.quality === "LBRY")[0];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            var uri;
 | 
					            var uri;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (this.video.livestream) {
 | 
					            if (this.video.livestream) {
 | 
				
			||||||
                uri = this.video.hls;
 | 
					                uri = this.video.hls;
 | 
				
			||||||
            } else if (this.video.audioStreams.length > 0 && MseSupport) {
 | 
					            } else if (this.video.audioStreams.length > 0 && !lbry && MseSupport) {
 | 
				
			||||||
                const dash = require("@/utils/DashUtils.js").default.generate_dash_file_from_formats(
 | 
					                const dash = require("@/utils/DashUtils.js").default.generate_dash_file_from_formats(
 | 
				
			||||||
                    streams,
 | 
					                    streams,
 | 
				
			||||||
                    this.video.duration,
 | 
					                    this.video.duration,
 | 
				
			||||||
                );
 | 
					                );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                uri = "data:application/dash+xml;charset=utf-8;base64," + btoa(dash);
 | 
					                uri = "data:application/dash+xml;charset=utf-8;base64," + btoa(dash);
 | 
				
			||||||
 | 
					            } else if (lbry) {
 | 
				
			||||||
 | 
					                uri = lbry.url;
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                uri = this.video.videoStreams.filter(stream => stream.codec == null).slice(-1)[0].url;
 | 
					                uri = this.video.videoStreams.filter(stream => stream.codec == null).slice(-1)[0].url;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue