OdyseeTeam / odysee-ios

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

Irregular PiP behavior from mini-player #362

Open anohren opened 1 year ago

anohren commented 1 year ago
  1. Play video in mini-player
  2. Press home button to enter PiP
  3. Return to app using restore button in PiP window — playback stops
  4. Continue playback
  5. Press home button — no more PiP

In 3 we should've continued playback, and in 5 we should've entered PiP, from my understanding.

tzarebczan commented 1 year ago

Great catch, I was able to reproduce this also!

tzarebczan commented 1 year ago

Let me know your Odyse channel btw - you can reply here or email me at tom@odysee.com

anohren commented 1 year ago

I don't think I have a channel; I don't really comment on videos. I guess I could create one if it's useful here?

anohren commented 1 year ago

An alternative smaller list of steps to reproduce the (probably) same problem:

  1. Play video in mini-player
  2. Restore mini-player to regular player
  3. Press home button — (PiP doesn't seem to activate every time here)
  4. Return to app using restore button in PiP window — playback stops even though we previously returned to the regular player
ktprograms commented 1 year ago

@akinwale can you please see if you can figure this out?

I think the problem is happening in https://github.com/OdyseeTeam/odysee-ios/blob/39bf1a5/Odysee/Controllers/Content/FileViewController.swift#L999-L1005, probably by lazyPlayer being used/changed somewhere else.

Even moving this block of code to above the return statement doesn't make it work.

Removing the if !forceInit ... and letting the player be reinitialized does work, although playback position is lost.

tzarebczan commented 1 year ago

I don't think I have a channel; I don't really comment on videos. I guess I could create one if it's useful here?

Just wanted a way to show some appreciation - making and sharing the channel would be the easiest, or email me at tom@odysee.com with your credits address!

anohren commented 1 year ago

Thank you for the offer @tzarebczan! I sent you an email at approximately when I posted this.