@@ -1116,7 +1116,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
11161116
11171117var mejs = { } ;
11181118
1119- mejs . version = '7.0.7 ' ;
1119+ mejs . version = '7.1.0 ' ;
11201120
11211121mejs . html5media = {
11221122 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' ] ,
@@ -1251,10 +1251,6 @@ _mejs2.default.Renderers = renderer;
12511251} , { "8" :8 } ] , 10 :[ function ( _dereq_ , module , exports ) {
12521252'use strict' ;
12531253
1254- var _window = _dereq_ ( 3 ) ;
1255-
1256- var _window2 = _interopRequireDefault ( _window ) ;
1257-
12581254var _document = _dereq_ ( 2 ) ;
12591255
12601256var _document2 = _interopRequireDefault ( _document ) ;
@@ -1296,8 +1292,6 @@ Object.assign(_player2.default.prototype, {
12961292
12971293 isNativeFullScreen : false ,
12981294
1299- isInIframe : false ,
1300-
13011295 isPluginClickThroughCreated : false ,
13021296
13031297 fullscreenMode : '' ,
@@ -1309,8 +1303,6 @@ Object.assign(_player2.default.prototype, {
13091303 return ;
13101304 }
13111305
1312- player . isInIframe = _window2 . default . location !== _window2 . default . parent . location ;
1313-
13141306 player . detectFullscreenMode ( ) ;
13151307
13161308 var t = this ,
@@ -1407,8 +1399,8 @@ Object.assign(_player2.default.prototype, {
14071399 return ;
14081400 }
14091401
1410- 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 ( ) ) ) ) {
1411- t . media . originalNode . webkitEnterFullscreen ( ) ;
1402+ if ( t . options . useFakeFullscreen === false && ( Features . IS_IOS || Features . IS_SAFARI ) && Features . HAS_IOS_FULLSCREEN && typeof t . node . webkitEnterFullscreen === 'function' && t . node . canPlayType ( ( 0 , _media . getTypeFromFile ) ( t . media . getSrc ( ) ) ) ) {
1403+ t . node . webkitEnterFullscreen ( ) ;
14121404 return ;
14131405 }
14141406
@@ -1420,40 +1412,12 @@ Object.assign(_player2.default.prototype, {
14201412
14211413 if ( t . fullscreenMode === 'native-native' || t . fullscreenMode === 'plugin-native' ) {
14221414 Features . requestFullScreen ( t . getElement ( t . container ) ) ;
1423-
1424- if ( t . isInIframe ) {
1425- setTimeout ( function checkFullscreen ( ) {
1426-
1427- if ( t . isNativeFullScreen ) {
1428- var percentErrorMargin = 0.002 ,
1429- windowWidth = _window2 . default . innerWidth || _document2 . default . documentElement . clientWidth || _document2 . default . body . clientWidth ,
1430- screenWidth = screen . width ,
1431- absDiff = Math . abs ( screenWidth - windowWidth ) ,
1432- marginError = screenWidth * percentErrorMargin ;
1433-
1434- if ( absDiff > marginError ) {
1435- t . exitFullScreen ( ) ;
1436- } else {
1437- setTimeout ( checkFullscreen , 500 ) ;
1438- }
1439- }
1440- } , 1000 ) ;
1441- }
14421415 }
14431416
14441417 t . getElement ( t . container ) . style . width = '100%' ;
14451418 t . getElement ( t . container ) . style . height = '100%' ;
14461419
1447- t . containerSizeTimeout = setTimeout ( function ( ) {
1448- t . getElement ( t . container ) . style . width = '100%' ;
1449- t . getElement ( t . container ) . style . height = '100%' ;
1450- t . setControlsSize ( ) ;
1451- } , 500 ) ;
1452-
1453- if ( isNative ) {
1454- t . node . style . width = '100%' ;
1455- t . node . style . height = '100%' ;
1456- } else {
1420+ if ( isNative ) { } else {
14571421 var elements = t . getElement ( t . container ) . querySelectorAll ( 'embed, object, video' ) ,
14581422 _total = elements . length ;
14591423 for ( var i = 0 ; i < _total ; i ++ ) {
@@ -1462,7 +1426,7 @@ Object.assign(_player2.default.prototype, {
14621426 }
14631427 }
14641428
1465- if ( t . options . setDimensions && typeof t . media . setSize === 'function' ) {
1429+ if ( t . options . setDimensions && typeof t . media . setSize === 'function' && ! isNative ) {
14661430 t . media . setSize ( screen . width , screen . height ) ;
14671431 }
14681432
@@ -1478,8 +1442,14 @@ Object.assign(_player2.default.prototype, {
14781442 ( 0 , _dom . addClass ) ( t . fullscreenBtn , t . options . classPrefix + 'unfullscreen' ) ;
14791443 }
14801444
1481- t . setControlsSize ( ) ;
14821445 t . isFullScreen = true ;
1446+ t . setControlsSize ( ) ;
1447+
1448+ if ( ! isNative ) {
1449+ requestAnimationFrame ( function ( ) {
1450+ t . setPlayerSize ( screen . width , screen . height ) ;
1451+ } ) ;
1452+ }
14831453
14841454 var zoomFactor = Math . min ( screen . width / t . width , screen . height / t . height ) ,
14851455 captionText = t . getElement ( t . container ) . querySelector ( '.' + t . options . classPrefix + 'captions-text' ) ;
@@ -1544,6 +1514,8 @@ Object.assign(_player2.default.prototype, {
15441514 t . setControlsSize ( ) ;
15451515 t . isFullScreen = false ;
15461516
1517+ t . setPlayerSize ( t . normalWidth , t . normalHeight ) ;
1518+
15471519 var captionText = t . getElement ( t . container ) . querySelector ( '.' + t . options . classPrefix + 'captions-text' ) ;
15481520 if ( captionText ) {
15491521 captionText . style . fontSize = '' ;
@@ -1555,7 +1527,7 @@ Object.assign(_player2.default.prototype, {
15551527 }
15561528} ) ;
15571529
1558- } , { "17" :17 , "2" :2 , "24" :24 , "25" :25 , "26" :26 , "27" :27 , "28" :28 , "3" : 3 , " 6" :6 } ] , 11 :[ function ( _dereq_ , module , exports ) {
1530+ } , { "17" :17 , "2" :2 , "24" :24 , "25" :25 , "26" :26 , "27" :27 , "28" :28 , "6" :6 } ] , 11 :[ function ( _dereq_ , module , exports ) {
15591531'use strict' ;
15601532
15611533var _document = _dereq_ ( 2 ) ;
@@ -4275,13 +4247,14 @@ var MediaElementPlayer = function () {
42754247 } , 0 ) ;
42764248
42774249 t . globalResizeCallback = function ( ) {
4278- if ( ! ( t . isFullScreen || _constants . HAS_TRUE_NATIVE_FULLSCREEN && _document2 . default . webkitIsFullScreen ) ) {
4250+ if ( t . isFullScreen || _constants . HAS_TRUE_NATIVE_FULLSCREEN && _document2 . default . webkitIsFullScreen ) {
4251+ t . setPlayerSize ( screen . width , screen . height ) ;
4252+ } else {
42794253 t . setPlayerSize ( t . width , t . height ) ;
42804254 }
42814255
42824256 t . setControlsSize ( ) ;
42834257 } ;
4284-
42854258 t . globalBind ( 'resize' , t . globalResizeCallback ) ;
42864259 }
42874260
@@ -4368,6 +4341,11 @@ var MediaElementPlayer = function () {
43684341 t . height = height ;
43694342 }
43704343
4344+ if ( t . isFullScreen || _constants . HAS_TRUE_NATIVE_FULLSCREEN && _document2 . default . webkitIsFullScreen ) {
4345+ t . setDimensions ( t . width , t . height ) ;
4346+ return ;
4347+ }
4348+
43714349 switch ( t . options . stretching ) {
43724350 case 'fill' :
43734351 if ( t . isVideo ) {
@@ -4632,6 +4610,12 @@ var MediaElementPlayer = function () {
46324610 t . getElement ( t . container ) . style . width = width ;
46334611 t . getElement ( t . container ) . style . height = height ;
46344612
4613+ var isNative = t . media . rendererName !== null && / ( h t m l 5 | n a t i v e ) / i. test ( t . media . rendererName ) ;
4614+ if ( ( t . isFullScreen || _constants . HAS_TRUE_NATIVE_FULLSCREEN && _document2 . default . webkitIsFullScreen ) && ! isNative ) {
4615+ t . node . style . width = width ;
4616+ t . node . style . height = height ;
4617+ }
4618+
46354619 var layers = t . getElement ( t . layers ) . children ;
46364620 for ( var i = 0 , total = layers . length ; i < total ; i ++ ) {
46374621 layers [ i ] . style . width = width ;
0 commit comments