always restore player volume settings on first play

This commit is contained in:
Jeremy Kauffman 2020-04-20 17:07:49 -04:00 committed by Sean Yesmunt
parent ab74052446
commit 1a06ddca3b

View file

@ -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);