OdyseeTeam / odysee-ios

The Odysee iOS app with wallet functionality.
MIT License
67 stars 22 forks source link

Restoring PiP video not possible after playing second video in parallel #367

Closed anohren closed 1 year ago

anohren commented 1 year ago
  1. Start a video in PiP
  2. Start another video the usual way — PiP stops playback when the new one starts (not unexpected).
  3. There is now no way to restore the player state of the PiP video (using PiP restore button), even if you completely close the 2nd video and its mini-player.

In short, behavior doesn't seem entirely defined when starting a second video while PiP is still active/visible. The Restore button now acts like the Close button. I think it's implied in PiP that the playback state is preserved and can be restored as long as the window is visible.

ktprograms commented 1 year ago

Currently, when a video is playing in the mini player and you open another video, the first stops playing and gets replaced by the new one.

Would it be okay to have that same behaviour occur with PiP for now, and I'll try to implement a "Start playing" confirmation like in the Android native app?

Or would you prefer for the behaviour to be kept as-is until the better way is implemented?

anohren commented 1 year ago

I think you could just as well leave it as-is instead of start hijacking the PiP window.

I guess you're referring to what's discussed in #240 as the better way, which I'd tend to agree with — navigation should not stop what you're already listening to.

Even so, there's still this issue with restoring the PiP video; restore fails even when the other video has been closed.

As a reference, Apple's Developer app preserves the state of the PiP independently of any in-app player.

ktprograms commented 1 year ago

As a reference, Apple's Developer app preserves the state of the PiP independently of any in-app player.

Ah, I see. I'll take a look, then.

ktprograms commented 1 year ago

I'm not sure why I didn't mark this as fixed in the PR. Just tested again to be sure and it's working as expected.