OdyseeTeam / odysee-ios

The Odysee iOS app with wallet functionality.
MIT License
69 stars 21 forks source link

Toggling play/pause with Bluetooth fails to pause video #400

Closed anohren closed 1 year ago

anohren commented 1 year ago

It's this problem that's returned:

Using a Bluetooth headset to pause a video will result in it pausing and immediately resuming playback. Starting playback, on the contrary, works and does not result in immediate pausing.

Pause and play from control center works as expected.

This headset is most likely sending a togglePlayPause event. That would explain the discrepancy in behavior compared to control center, but will not explain why starting playback still works. That (without looking at the code) makes me suspect some kind of timing issue, but that's only a guess.

ktprograms commented 1 year ago

What version are you using?

It works for me (with a headset that sends togglePlayPause).

Did you do something other than just opening a single video (for example going to mini player, opening another video, starting that other video replacing the miniplayer)? That could be the cause, and would help me figure out the problem.

anohren commented 1 year ago

I'll try to find a reproducible pattern and report back.

I always try to find the app version number in-app before sending an issue, but I can never find it. Hunting for it in the Settings app is just a bit too uninviting since on iOS it's traditionally always been hidden in some inconspicuous place like app-specific storage settings or something. I've been using iOS for too long...

Still a pain to find in iOS 15 apparently:

0.6.8

anohren commented 1 year ago

Ok, I can recreate the problem now:

  1. Play a video
  2. Navigate back to video list
  3. Open another video page
  4. Manually press play on second video
  5. Headset does immediate pause+play on new video when trying to pause it
ktprograms commented 1 year ago

Thanks for figuring out the steps to reproduce! I did suspect it was something like this (with adding/removing the player from the player controller). I'll try and debug this soon.