Skip to content

Commit e8f3d2f

Browse files
committed
style: fix lint issues
1 parent 74184db commit e8f3d2f

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/YoutubeIframe.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff 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';
2520
import {deepComparePlayList} from './utils';
2621

2722
const 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) {

0 commit comments

Comments
 (0)