From 1a06ddca3beba40f1eea2b72d34e36bb6490d60d Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Mon, 20 Apr 2020 17:07:49 -0400 Subject: [PATCH] always restore player volume settings on first play --- ui/component/viewers/videoViewer/view.jsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ui/component/viewers/videoViewer/view.jsx b/ui/component/viewers/videoViewer/view.jsx index 5c1bbc413..fe881b798 100644 --- a/ui/component/viewers/videoViewer/view.jsx +++ b/ui/component/viewers/videoViewer/view.jsx @@ -79,12 +79,8 @@ function VideoViewer(props: Props) { function doTrackingFirstPlay(e: Event, data: any) { if (!embedded) { - if (muted) { - this.muted(muted); - } - if (volume) { - this.volume(volume); - } + this.muted(muted); + this.volume(volume); } analytics.videoStartEvent(claimId, data.secondsToLoad); @@ -115,7 +111,6 @@ function VideoViewer(props: Props) { const onPlayerReady = useCallback(player => { setIsLoading(!embedded); // if we are here outside of an embed, we're playing - player.on('tracking:buffered', doTrackingBuffered); player.on('tracking:firstplay', doTrackingFirstPlay.bind(player)); player.on('ended', onEnded);