Please, I wanna know how to prevent or stop video when the user eject the earphones from the device. Flutter
I tried to find a package for that. but i didn't found any package or solution
Please, I wanna know how to prevent or stop video when the user eject the earphones from the device. Flutter
I tried to find a package for that. but i didn't found any package or solution
you can listen on the headset events with this package
and inside the listener check if the event is DISCONNECT
then pause the video through videoController.pause()
Additional ref links:
Detecting whether a headset is plugged into an Android device or not.