From e8f3d2f562cd70342776ac99e8342eec088ea350 Mon Sep 17 00:00:00 2001 From: Ananthu Kanive Date: Sat, 15 Jun 2024 23:53:55 +0530 Subject: [PATCH] style: fix lint issues --- src/YoutubeIframe.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/YoutubeIframe.js b/src/YoutubeIframe.js index 1298c75..7a4e7a1 100644 --- a/src/YoutubeIframe.js +++ b/src/YoutubeIframe.js @@ -16,12 +16,7 @@ import { DEFAULT_BASE_URL, CUSTOM_USER_AGENT, } from './constants'; -import { - playMode, - soundMode, - MAIN_SCRIPT, - PLAYER_FUNCTIONS, -} from './PlayerScripts'; +import {MAIN_SCRIPT, PLAYER_FUNCTIONS} from './PlayerScripts'; import {deepComparePlayList} from './utils'; const YoutubeIframe = (props, ref) => { @@ -125,7 +120,7 @@ const YoutubeIframe = (props, ref) => { } webViewRef.current.postMessage(play ? 'playVideo' : 'pauseVideo'); - }, [play]); + }, [play, playerReady]); useEffect(() => { if (!playerReady) { @@ -134,7 +129,7 @@ const YoutubeIframe = (props, ref) => { } webViewRef.current.postMessage(mute ? 'muteVideo' : 'unMuteVideo'); - }, [mute]); + }, [mute, playerReady]); useEffect(() => { if (!playerReady) {