-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add Lock screen controls for video playback #2938
Comments
Any progress? |
I've had really good luck using this player with react native music control. It does everything that you're asking. |
@jrhager84 I'm using this package as well, but unfortunately this package is "deprecated" favour of I think these core functionalities is belongs to the video player in some way. |
How is it deprecated? It works just fine. 🤷🏼♂️ |
@vargajacint I didn't think react-native-track-player handles video? According to @freeboub in #2932 the lock screen controls are still unavailable in react-native-video, but possible. @jrhager84 good to hear react-native-music-control works well with react-native-video. It'd be great if lock screen controls were in RNV directly but good to know there is a workaround. |
@jrhager84 Right now works fine, but they don't have maintainers, and have a couple of problems on Android. Also if Apple change something, the library will break your app. |
If you want to contribute to this library (react-native-track-player) I can invite you to join react-native-video organization and create a fork here |
@sam1463 no, unfortunately, I don't have this feature developped ... |
You can actually do this, but its a bit of hack with
Basically you are using the track player to listen for events and that's about it. The audio comes from the video. |
@watadarkstar The controls appear when these props are like so: If those controls are reversed to: playInBackground={true} and playWhenInactive={false} then the controls are not shown but it also doesn't pause when the phone is locked. |
@Dahvd Yeah my props are like so:
I had to build all the controls myself manually to deliver what the client wanted. Did you add a listener to handle the pausing of the video from the lock screen? Like so:
|
HI @watadarkstar have you wrote your listeners inside RNVP module's components/contexts ? Because its mentioned in the docs if we will write it in some component or context file ,they may get unmounted , and we should add these listeners in Index.js (entry file). |
I ended up using react-native-track-player for adding lock screen buttons, and using its remote event listeners. I believe the RNTP lock screen buttons need to be added by setting the |
I have integrated |
Hey folks, I see you started to implement @MTPL0005-AbhishekDubey @mitchdowney @watadarkstar |
@vargajacint That is a good point. I didn't think about that. It probably does double the cost but I have yet to test this. I will bring this up with our team and see what we can find. |
I believe this is available now with prop |
@paulrinaldi, I was migrating and saw the documentation for this. The showNotificationControls works as expected on Android but fails on iOS. When I set showNotificationControls to false, the controls still appear on the notification screen. I raised this as a bug a few hours ago. |
@freeboub @KrzysztofMoch |
Available on 6.2.0. another fix ongoing for the next release from @KrzysztofMoch. Issue on old android versions |
Feature Request
Add the ability to play, pause, time jump, or skip track in the video player from the Lock screen.
Why it is needed
For devices that allow you to continue playing a video from the lock screen, it would be a nice UX to be able to play, pause, time jump, or skip track from the Lock screen.
The text was updated successfully, but these errors were encountered: