mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-30 08:51:24 +00:00
always restore player volume settings on first play
This commit is contained in:
parent
ab74052446
commit
1a06ddca3b
1 changed files with 2 additions and 7 deletions
|
@ -79,13 +79,9 @@ function VideoViewer(props: Props) {
|
||||||
|
|
||||||
function doTrackingFirstPlay(e: Event, data: any) {
|
function doTrackingFirstPlay(e: Event, data: any) {
|
||||||
if (!embedded) {
|
if (!embedded) {
|
||||||
if (muted) {
|
|
||||||
this.muted(muted);
|
this.muted(muted);
|
||||||
}
|
|
||||||
if (volume) {
|
|
||||||
this.volume(volume);
|
this.volume(volume);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
analytics.videoStartEvent(claimId, data.secondsToLoad);
|
analytics.videoStartEvent(claimId, data.secondsToLoad);
|
||||||
|
|
||||||
|
@ -115,7 +111,6 @@ function VideoViewer(props: Props) {
|
||||||
|
|
||||||
const onPlayerReady = useCallback(player => {
|
const onPlayerReady = useCallback(player => {
|
||||||
setIsLoading(!embedded); // if we are here outside of an embed, we're playing
|
setIsLoading(!embedded); // if we are here outside of an embed, we're playing
|
||||||
|
|
||||||
player.on('tracking:buffered', doTrackingBuffered);
|
player.on('tracking:buffered', doTrackingBuffered);
|
||||||
player.on('tracking:firstplay', doTrackingFirstPlay.bind(player));
|
player.on('tracking:firstplay', doTrackingFirstPlay.bind(player));
|
||||||
player.on('ended', onEnded);
|
player.on('ended', onEnded);
|
||||||
|
|
Loading…
Add table
Reference in a new issue