File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 33 "default_locale" : " en" ,
44 "name" : " __MSG_extension_name__" ,
55 "description" : " __MSG_extension_description__" ,
6- "version" : " 1.3.71 " ,
6+ "version" : " 1.3.72 " ,
77 "author" : " Andrew S" ,
88 "options_ui" : {
99 "page" : " player/options/index.html" ,
Original file line number Diff line number Diff line change @@ -76,14 +76,18 @@ export default class MP4Player extends EventEmitter {
7676 makeSourceBuffers ( ) {
7777 const videoTrack = this . metaData . videoTracks [ this . currentVideoTrack ] ;
7878 if ( videoTrack ) {
79- const videoCodec = 'video/mp4; codecs=\"' + videoTrack . codec . toLowerCase ( ) + '\"' ;
79+ const videoCodec = 'video/mp4; codecs=\"' + videoTrack . codec + '\"' ;
8080 this . videoSourceBuffer = new SourceBufferWrapper ( this . mediaSource , videoCodec ) ;
8181 }
8282
8383 if ( this . currentAudioTrack !== null ) {
8484 const audioTrack = this . metaData . audioTracks [ this . currentAudioTrack ] ;
8585 if ( audioTrack ) {
86- const audioCodec = 'audio/mp4; codecs=\"' + audioTrack . codec . toLowerCase ( ) + '\"' ;
86+ const fixedCodec = audioTrack . codec ;
87+ if ( fixedCodec === 'Opus' ) {
88+ fixedCode = 'opus' ;
89+ }
90+ const audioCodec = 'audio/mp4; codecs=\"' + fixedCodec + '\"' ;
8791 this . audioSourceBuffer = new SourceBufferWrapper ( this . mediaSource , audioCodec ) ;
8892 }
8993 }
@@ -102,7 +106,12 @@ export default class MP4Player extends EventEmitter {
102106
103107 setupHLS ( ) {
104108 this . removeSourceBuffers ( ) ;
105- this . makeSourceBuffers ( ) ;
109+ try {
110+ this . makeSourceBuffers ( ) ;
111+ } catch ( e ) {
112+ this . emit ( DefaultPlayerEvents . ERROR , 'Failed to create SourceBuffers: ' + e . message ) ;
113+ return ;
114+ }
106115
107116 this . mp4box . fragmentedTracks . length = 0 ;
108117
Original file line number Diff line number Diff line change 11{
22 "name" : " faststream" ,
3- "version" : " 1.3.71 " ,
3+ "version" : " 1.3.72 " ,
44 "description" : " Stream videos without buffering. Fix bad video players on the internet." ,
55 "scripts" : {
66 "test" : " echo \" Error: no test specified\" && exit 1" ,
You can’t perform that action at this time.
0 commit comments