File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
- import { EventEmitter } from 'events' ;
2
1
import React , {
2
+ useRef ,
3
+ useMemo ,
4
+ useEffect ,
3
5
forwardRef ,
4
6
useCallback ,
5
- useEffect ,
6
7
useImperativeHandle ,
7
- useMemo ,
8
- useRef ,
9
8
} from 'react' ;
10
9
import { Platform , StyleSheet , View } from 'react-native' ;
10
+ import { EventEmitter } from 'events' ;
11
+ import { WebView } from './WebView' ;
11
12
import {
12
- CUSTOM_USER_AGENT ,
13
- DEFAULT_BASE_URL ,
14
13
PLAYER_ERROR ,
15
14
PLAYER_STATES ,
15
+ DEFAULT_BASE_URL ,
16
+ CUSTOM_USER_AGENT ,
16
17
} from './constants' ;
17
18
import {
18
- MAIN_SCRIPT ,
19
- PLAYER_FUNCTIONS ,
20
19
playMode ,
21
20
soundMode ,
21
+ MAIN_SCRIPT ,
22
+ PLAYER_FUNCTIONS ,
22
23
} from './PlayerScripts' ;
23
24
import { deepComparePlayList } from './utils' ;
24
- import { WebView } from './WebView' ;
25
25
26
26
const YoutubeIframe = ( props , ref ) => {
27
27
const {
@@ -145,7 +145,7 @@ const YoutubeIframe = (props, ref) => {
145
145
} , [ videoId , play ] ) ;
146
146
147
147
useEffect ( ( ) => {
148
- if ( ! playerReady . current < 1 ) {
148
+ if ( ! playerReady . current ) {
149
149
// no instance of player is ready
150
150
return ;
151
151
}
You can’t perform that action at this time.
0 commit comments