File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,7 @@ import {
1616 DEFAULT_BASE_URL ,
1717 CUSTOM_USER_AGENT ,
1818} from './constants' ;
19- import {
20- playMode ,
21- soundMode ,
22- MAIN_SCRIPT ,
23- PLAYER_FUNCTIONS ,
24- } from './PlayerScripts' ;
19+ import { MAIN_SCRIPT , PLAYER_FUNCTIONS } from './PlayerScripts' ;
2520import { deepComparePlayList } from './utils' ;
2621
2722const YoutubeIframe = ( props , ref ) => {
@@ -125,7 +120,7 @@ const YoutubeIframe = (props, ref) => {
125120 }
126121
127122 webViewRef . current . postMessage ( play ? 'playVideo' : 'pauseVideo' ) ;
128- } , [ play ] ) ;
123+ } , [ play , playerReady ] ) ;
129124
130125 useEffect ( ( ) => {
131126 if ( ! playerReady ) {
@@ -134,7 +129,7 @@ const YoutubeIframe = (props, ref) => {
134129 }
135130
136131 webViewRef . current . postMessage ( mute ? 'muteVideo' : 'unMuteVideo' ) ;
137- } , [ mute ] ) ;
132+ } , [ mute , playerReady ] ) ;
138133
139134 useEffect ( ( ) => {
140135 if ( ! playerReady ) {
You can’t perform that action at this time.
0 commit comments