@@ -6,10 +6,10 @@ import dispatchEventAsync from './lib/dispatch-event-async';
66
77const iOS8or9 = typeof document === 'object' && 'object-fit' in document . head . style && ! matchMedia ( '(-webkit-video-playable-inline)' ) . matches ;
88
9- const ಠ = 'bfred-it:iphone-inline-video' ;
10- const ಠevent = 'bfred-it:iphone-inline-video:event' ;
11- const ಠplay = 'bfred-it:iphone-inline-video:nativeplay' ;
12- const ಠpause = 'bfred-it:iphone-inline-video:nativepause' ;
9+ const IIV = 'bfred-it:iphone-inline-video' ;
10+ const IIVEvent = 'bfred-it:iphone-inline-video:event' ;
11+ const IIVPlay = 'bfred-it:iphone-inline-video:nativeplay' ;
12+ const IIVPause = 'bfred-it:iphone-inline-video:nativepause' ;
1313
1414/**
1515 * UTILS
@@ -40,7 +40,7 @@ let lastTimeupdateEvent;
4040function setTime ( video , time , rememberOnly ) {
4141 // Allow one timeupdate event every 200+ ms
4242 if ( ( lastTimeupdateEvent || 0 ) + 200 < Date . now ( ) ) {
43- video [ ಠevent ] = true ;
43+ video [ IIVEvent ] = true ;
4444 lastTimeupdateEvent = Date . now ( ) ;
4545 }
4646 if ( ! rememberOnly ) {
@@ -77,7 +77,7 @@ function update(timeDiff) {
7777 // // console.assert(player.video.currentTime === player.driver.currentTime, 'Video not updating!');
7878
7979 if ( player . video . ended ) {
80- delete player . video [ ಠevent ] ; // Allow timeupdate event
80+ delete player . video [ IIVEvent ] ; // Allow timeupdate event
8181 player . video . pause ( true ) ;
8282 }
8383}
@@ -89,11 +89,11 @@ function update(timeDiff) {
8989function play ( ) {
9090 // // console.log('play');
9191 const video = this ;
92- const player = video [ ಠ ] ;
92+ const player = video [ IIV ] ;
9393
9494 // If it's fullscreen, use the native player
9595 if ( video . webkitDisplayingFullscreen ) {
96- video [ ಠplay ] ( ) ;
96+ video [ IIVPlay ] ( ) ;
9797 return ;
9898 }
9999
@@ -129,7 +129,7 @@ function play() {
129129function pause ( forceEvents ) {
130130 // // console.log('pause');
131131 const video = this ;
132- const player = video [ ಠ ] ;
132+ const player = video [ IIV ] ;
133133
134134 player . driver . pause ( ) ;
135135 player . updater . stop ( ) ;
@@ -138,7 +138,7 @@ function pause(forceEvents) {
138138 // This is at the end of pause() because it also
139139 // needs to make sure that the simulation is paused
140140 if ( video . webkitDisplayingFullscreen ) {
141- video [ ಠpause ] ( ) ;
141+ video [ IIVPause ] ( ) ;
142142 }
143143
144144 if ( player . paused && ! forceEvents ) {
@@ -152,7 +152,7 @@ function pause(forceEvents) {
152152
153153 // Handle the 'ended' event only if it's not fullscreen
154154 if ( video . ended && ! video . webkitDisplayingFullscreen ) {
155- video [ ಠevent ] = true ;
155+ video [ IIVEvent ] = true ;
156156 dispatchEventAsync ( video , 'ended' ) ;
157157 }
158158}
@@ -163,7 +163,7 @@ function pause(forceEvents) {
163163
164164function addPlayer ( video , hasAudio ) {
165165 const player = { } ;
166- video [ ಠ ] = player ;
166+ video [ IIV ] = player ;
167167 player . paused = true ; // Track whether 'pause' events have been fired
168168 player . hasAudio = hasAudio ;
169169 player . video = video ;
@@ -222,7 +222,7 @@ function addPlayer(video, hasAudio) {
222222 video . pause ( ) ;
223223
224224 // Play video natively
225- video [ ಠplay ] ( ) ;
225+ video [ IIVPlay ] ( ) ;
226226 } else if ( hasAudio && player . driver . buffered . length === 0 ) {
227227 // If the first play is native,
228228 // the <audio> needs to be buffered manually
@@ -248,15 +248,15 @@ function addPlayer(video, hasAudio) {
248248}
249249
250250function preventWithPropOrFullscreen ( el ) {
251- const isAllowed = el [ ಠevent ] ;
252- delete el [ ಠevent ] ;
251+ const isAllowed = el [ IIVEvent ] ;
252+ delete el [ IIVEvent ] ;
253253 return ! el . webkitDisplayingFullscreen && ! isAllowed ;
254254}
255255
256256function overloadAPI ( video ) {
257- const player = video [ ಠ ] ;
258- video [ ಠplay ] = video . play ;
259- video [ ಠpause ] = video . pause ;
257+ const player = video [ IIV ] ;
258+ video [ IIVPlay ] = video . play ;
259+ video [ IIVPause ] = video . pause ;
260260 video . play = play ;
261261 video . pause = pause ;
262262 proxyProperty ( video , 'paused' , player . driver ) ;
@@ -279,7 +279,7 @@ function overloadAPI(video) {
279279
280280export default function enableInlineVideo ( video , opts = { } ) {
281281 // Stop if already enabled
282- if ( video [ ಠ ] ) {
282+ if ( video [ IIV ] ) {
283283 return ;
284284 }
285285
0 commit comments