mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	Add limited support for devices without MSE extensions. (#251)
This commit is contained in:
		
							parent
							
								
									b0d9145e75
								
							
						
					
					
						commit
						d77ab806e5
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
					@ -55,11 +55,13 @@ export default {
 | 
				
			||||||
            streams.push(...this.video.audioStreams);
 | 
					            streams.push(...this.video.audioStreams);
 | 
				
			||||||
            streams.push(...this.video.videoStreams);
 | 
					            streams.push(...this.video.videoStreams);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            const MseSupport = window.MediaSource !== undefined;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            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) {
 | 
					            } else if (this.video.audioStreams.length > 0 && 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,
 | 
				
			||||||
| 
						 | 
					@ -67,7 +69,7 @@ export default {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                uri = "data:application/dash+xml;charset=utf-8;base64," + btoa(dash);
 | 
					                uri = "data:application/dash+xml;charset=utf-8;base64," + btoa(dash);
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                uri = this.video.videoStreams[0].url;
 | 
					                uri = this.video.videoStreams.filter(stream => stream.codec == null)[0].url;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (noPrevPlayer)
 | 
					            if (noPrevPlayer)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue