@@ -1018,7 +1018,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
1018
1018
1019
1019
var mejs = { } ;
1020
1020
1021
- mejs . version = '4.2.16 ' ;
1021
+ mejs . version = '4.2.17 ' ;
1022
1022
1023
1023
mejs . html5media = {
1024
1024
properties : [ 'volume' , 'src' , 'currentTime' , 'muted' , 'duration' , 'paused' , 'ended' , 'buffered' , 'error' , 'networkState' , 'readyState' , 'seeking' , 'seekable' , 'currentSrc' , 'preload' , 'bufferedBytes' , 'bufferedTime' , 'initialTime' , 'startOffsetTime' , 'defaultPlaybackRate' , 'playbackRate' , 'played' , 'autoplay' , 'loop' , 'controls' ] ,
@@ -1307,7 +1307,7 @@ Object.assign(_player2.default.prototype, {
1307
1307
return ;
1308
1308
}
1309
1309
1310
- if ( t . options . useFakeFullscreen === false && Features . IS_IOS && Features . HAS_IOS_FULLSCREEN && typeof t . media . originalNode . webkitEnterFullscreen === 'function' && t . media . originalNode . canPlayType ( ( 0 , _media . getTypeFromFile ) ( t . media . getSrc ( ) ) ) ) {
1310
+ if ( t . options . useFakeFullscreen === false && ( Features . IS_IOS || Features . IS_SAFARI ) && Features . HAS_IOS_FULLSCREEN && typeof t . media . originalNode . webkitEnterFullscreen === 'function' && t . media . originalNode . canPlayType ( ( 0 , _media . getTypeFromFile ) ( t . media . getSrc ( ) ) ) ) {
1311
1311
t . media . originalNode . webkitEnterFullscreen ( ) ;
1312
1312
return ;
1313
1313
}
@@ -2943,15 +2943,15 @@ _mejs2.default.TrackFormatParser = {
2943
2943
2944
2944
dfxp : {
2945
2945
parse : function parse ( trackText ) {
2946
- trackText = $ ( trackText ) . filter ( 'tt' ) ;
2947
- var container = trackText . firstChild ,
2946
+ var trackElem = _document2 . default . adoptNode ( new DOMParser ( ) . parseFromString ( trackText , 'application/xml' ) . documentElement ) ,
2947
+ container = trackElem . querySelector ( 'div' ) ,
2948
2948
lines = container . querySelectorAll ( 'p' ) ,
2949
- styleNode = trackText . getElementById ( '' + container . attr ( 'style' ) ) ,
2949
+ styleNode = _document2 . default . getElementById ( container . getAttribute ( 'style' ) ) ,
2950
2950
entries = [ ] ;
2951
2951
2952
2952
var styles = void 0 ;
2953
2953
2954
- if ( styleNode . length ) {
2954
+ if ( styleNode ) {
2955
2955
styleNode . removeAttribute ( 'id' ) ;
2956
2956
var attributes = styleNode . attributes ;
2957
2957
if ( attributes . length ) {
@@ -2971,23 +2971,23 @@ _mejs2.default.TrackFormatParser = {
2971
2971
text : null
2972
2972
} ;
2973
2973
2974
- if ( lines . eq ( _i16 ) . attr ( 'begin' ) ) {
2975
- _temp . start = ( 0 , _time . convertSMPTEtoSeconds ) ( lines . eq ( _i16 ) . attr ( 'begin' ) ) ;
2974
+ if ( lines [ _i16 ] . getAttribute ( 'begin' ) ) {
2975
+ _temp . start = ( 0 , _time . convertSMPTEtoSeconds ) ( lines [ _i16 ] . getAttribute ( 'begin' ) ) ;
2976
2976
}
2977
- if ( ! _temp . start && lines . eq ( _i16 - 1 ) . attr ( 'end' ) ) {
2978
- _temp . start = ( 0 , _time . convertSMPTEtoSeconds ) ( lines . eq ( _i16 - 1 ) . attr ( 'end' ) ) ;
2977
+ if ( ! _temp . start && lines [ _i16 - 1 ] . getAttribute ( 'end' ) ) {
2978
+ _temp . start = ( 0 , _time . convertSMPTEtoSeconds ) ( lines [ _i16 - 1 ] . getAttribute ( 'end' ) ) ;
2979
2979
}
2980
- if ( lines . eq ( _i16 ) . attr ( 'end' ) ) {
2981
- _temp . stop = ( 0 , _time . convertSMPTEtoSeconds ) ( lines . eq ( _i16 ) . attr ( 'end' ) ) ;
2980
+ if ( lines [ _i16 ] . getAttribute ( 'end' ) ) {
2981
+ _temp . stop = ( 0 , _time . convertSMPTEtoSeconds ) ( lines [ _i16 ] . getAttribute ( 'end' ) ) ;
2982
2982
}
2983
- if ( ! _temp . stop && lines . eq ( _i16 + 1 ) . attr ( 'begin' ) ) {
2984
- _temp . stop = ( 0 , _time . convertSMPTEtoSeconds ) ( lines . eq ( _i16 + 1 ) . attr ( 'begin' ) ) ;
2983
+ if ( ! _temp . stop && lines [ _i16 + 1 ] . getAttribute ( 'begin' ) ) {
2984
+ _temp . stop = ( 0 , _time . convertSMPTEtoSeconds ) ( lines [ _i16 + 1 ] . getAttribute ( 'begin' ) ) ;
2985
2985
}
2986
2986
2987
2987
if ( styles ) {
2988
2988
style = '' ;
2989
2989
for ( var _style in styles ) {
2990
- style += _style + ':' + styles [ _style ] + ';' ;
2990
+ style += _style + ': ' + styles [ _style ] + ';' ;
2991
2991
}
2992
2992
}
2993
2993
if ( style ) {
@@ -2996,7 +2996,7 @@ _mejs2.default.TrackFormatParser = {
2996
2996
if ( _temp . start === 0 ) {
2997
2997
_temp . start = 0.200 ;
2998
2998
}
2999
- _temp . text = lines . eq ( _i16 ) . innerHTML . trim ( ) . replace ( / ( \b ( h t t p s ? | f t p | f i l e ) : \/ \/ [ - A - Z 0 - 9 + & @ # \/ % ? = ~ _ | ! : , . ; ] * [ - A - Z 0 - 9 + & @ # \/ % = ~ _ | ] ) / ig, "<a href='$1' target='_blank'>$1</a>" ) ;
2999
+ _temp . text = lines [ _i16 ] . innerHTML . trim ( ) . replace ( / ( \b ( h t t p s ? | f t p | f i l e ) : \/ \/ [ - A - Z 0 - 9 + & @ # \/ % ? = ~ _ | ! : , . ; ] * [ - A - Z 0 - 9 + & @ # \/ % = ~ _ | ] ) / ig, "<a href='$1' target='_blank'>$1</a>" ) ;
3000
3000
entries . push ( _temp ) ;
3001
3001
}
3002
3002
return entries ;
@@ -3224,6 +3224,7 @@ Object.assign(_player2.default.prototype, {
3224
3224
( 0 , _dom . removeClass ) ( mute , t . options . classPrefix + 'mute' ) ;
3225
3225
( 0 , _dom . addClass ) ( mute , t . options . classPrefix + 'unmute' ) ;
3226
3226
} else {
3227
+
3227
3228
positionVolumeHandle ( media . volume ) ;
3228
3229
( 0 , _dom . removeClass ) ( mute , t . options . classPrefix + 'unmute' ) ;
3229
3230
( 0 , _dom . addClass ) ( mute , t . options . classPrefix + 'mute' ) ;
@@ -3344,7 +3345,6 @@ Object.assign(_player2.default.prototype, {
3344
3345
rendered = true ;
3345
3346
if ( player . options . startVolume === 0 || media . originalNode . muted ) {
3346
3347
media . setMuted ( true ) ;
3347
- player . options . startVolume = 0 ;
3348
3348
}
3349
3349
media . setVolume ( player . options . startVolume ) ;
3350
3350
t . setControlsSize ( ) ;
@@ -3358,6 +3358,9 @@ Object.assign(_player2.default.prototype, {
3358
3358
if ( player . options . startVolume === 0 || media . originalNode . muted ) {
3359
3359
media . setMuted ( true ) ;
3360
3360
}
3361
+ if ( player . options . startVolume === 0 ) {
3362
+ player . options . startVolume = 0 ;
3363
+ }
3361
3364
media . setVolume ( player . options . startVolume ) ;
3362
3365
t . setControlsSize ( ) ;
3363
3366
}
@@ -3367,7 +3370,9 @@ Object.assign(_player2.default.prototype, {
3367
3370
3368
3371
if ( player . options . startVolume === 0 || media . originalNode . muted ) {
3369
3372
media . setMuted ( true ) ;
3370
- player . options . startVolume = 0 ;
3373
+ if ( player . options . startVolume === 0 ) {
3374
+ player . options . startVolume = 0 ;
3375
+ }
3371
3376
toggleMute ( ) ;
3372
3377
}
3373
3378
@@ -3994,7 +3999,7 @@ var MediaElementPlayer = function () {
3994
3999
var t = this ,
3995
4000
autoplayAttr = domNode . getAttribute ( 'autoplay' ) ,
3996
4001
autoplay = ! ( autoplayAttr === undefined || autoplayAttr === null || autoplayAttr === 'false' ) ,
3997
- isNative = media . rendererName !== null && / ( n a t i v e | h t m l 5 ) / i. test ( t . media . rendererName ) ;
4002
+ isNative = media . rendererName !== null && / ( n a t i v e | h t m l 5 ) / i. test ( media . rendererName ) ;
3998
4003
3999
4004
if ( t . getElement ( t . controls ) ) {
4000
4005
t . enableControls ( ) ;
@@ -4433,6 +4438,9 @@ var MediaElementPlayer = function () {
4433
4438
}
4434
4439
} ( ) ,
4435
4440
aspectRatio = function ( ) {
4441
+ if ( ! t . options . enableAutosize ) {
4442
+ return t . initialAspectRatio ;
4443
+ }
4436
4444
var ratio = 1 ;
4437
4445
if ( ! t . isVideo ) {
4438
4446
return ratio ;
@@ -5230,7 +5238,9 @@ var MediaElementPlayer = function () {
5230
5238
5231
5239
if ( _typeof ( t . getElement ( t . container ) ) === 'object' ) {
5232
5240
var offscreen = t . getElement ( t . container ) . parentNode . querySelector ( '.' + t . options . classPrefix + 'offscreen' ) ;
5233
- offscreen . remove ( ) ;
5241
+ if ( offscreen ) {
5242
+ offscreen . remove ( ) ;
5243
+ }
5234
5244
t . getElement ( t . container ) . remove ( ) ;
5235
5245
}
5236
5246
t . globalUnbind ( 'resize' , t . globalResizeCallback ) ;
@@ -7255,6 +7265,7 @@ var YouTubeIframeRenderer = {
7255
7265
videoId : videoId ,
7256
7266
height : height ,
7257
7267
width : width ,
7268
+ host : youtube . options . youtube && youtube . options . youtube . nocookie ? 'https://www.youtube-nocookie.com' : undefined ,
7258
7269
playerVars : Object . assign ( {
7259
7270
controls : 0 ,
7260
7271
rel : 0 ,
@@ -8065,8 +8076,10 @@ function getTypeFromFile(url) {
8065
8076
var mime = 'video/mp4' ;
8066
8077
8067
8078
if ( normalizedExt ) {
8068
- if ( ~ [ 'mp4' , 'm4v' , 'ogg' , 'ogv' , 'webm' , 'flv' , 'mpeg' , 'mov' ] . indexOf ( normalizedExt ) ) {
8079
+ if ( ~ [ 'mp4' , 'm4v' , 'ogg' , 'ogv' , 'webm' , 'flv' , 'mpeg' ] . indexOf ( normalizedExt ) ) {
8069
8080
mime = 'video/' + normalizedExt ;
8081
+ } else if ( 'mov' === normalizedExt ) {
8082
+ mime = 'video/quicktime' ;
8070
8083
} else if ( ~ [ 'mp3' , 'oga' , 'wav' , 'mid' , 'midi' ] . indexOf ( normalizedExt ) ) {
8071
8084
mime = 'audio/' + normalizedExt ;
8072
8085
}
0 commit comments