-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Video] Mute behaviour & autoplay disabled improvements #5295
Conversation
useEffect(() => { | ||
function listener(newIsPlaying: boolean) { | ||
setIsPlaying(newIsPlaying) | ||
} | ||
player.addListener('playingChange', listener) | ||
return () => { | ||
player.removeListener('playingChange', listener) | ||
} | ||
}, [player]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've had issues with player in useeffects before, is this one ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
With these changes, will the play state (active vs. paused, muted vs. noisy) persist when toggling back + forth between the feed preview + the fullscreen video player? As shipped, 1.91 exhibits the following behavior:
Actual behavior:
Expected behavior:
|
Yeah it should be much more sane with autoplay disabled, will act more like web desktop |
okay lets try to get this into my pr... |
Merged in through rebases |
This PR does three things (all native)
The rationale behind change # 3 is that when autoplay is disabled, it acts a bit more like a traditional video player and thus would be nice to be able to make it stop playing
Test plan
Test all 3 changes individually. Make sure with autoplay enabled, there are no regressions other than the the persisted mute state change