sy6sy2 / xbmc

Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS and Windows.
https://kodi.tv/
Other
6 stars 1 forks source link

Transition management #79

Open sy6sy2 opened 5 years ago

sy6sy2 commented 5 years ago

A thread to discuss the wanted behavior of Kodi when the Apple TV change states.

WIP work

Branch: https://github.com/SylvainCecchetto/xbmc/tree/transition-management

Actuel behavior:

Future work:

Examples of transitions (tested)

Possible states of Kodi when a "transition" appears

Suggestions

It's quite possible (sure) that I made mistakes, please tell me if I'm wrong ;-).

What do you think? Let me know your opinion and I will update this post :-D

t3Ubw Source: https://stackoverflow.com/questions/16880791/is-applicationwillresignactive-ever-called-before-didfinishlaunchingwithoptions

kambala-decapitator commented 5 years ago

Overall I agree. Comments:

One point I'd alter:

applicationDidEnterBackground - A "network" file is played --> Stop it

I'd rather pause it, as user might return to the app fast enough. Then in this case on applicationWillEnterForeground we can check if a significant amount of time has passed (maybe possible to fetch timeout), in which case we reload the stream from network (as if it was stop -> play).

One more case to test: user selects something from top shelf after applicationDidEnterBackground --> either stop player and open movie details or replace currently playing item.

P.S. Pausing on applicationWillResignActive must save current time offset.

sy6sy2 commented 5 years ago

Thank you for your comments, I updated the first post.

kambala-decapitator commented 5 years ago

User select item from TopShelf

should be: applicationWillEnterForeground, applicationDidBecomeActive (normal app resume process)

Wake up Apple TV with Kodi app as last open app

the second applicationWillResignActive followed by applicationDidBecomeActive looks strange. Are you sure there were no interruptions like some system dialog?

sy6sy2 commented 5 years ago

I found this strange too :-/ I will try again just to be sure.

sy6sy2 commented 5 years ago

I tried again and I can confirm the "strange" transition when you put the device to sleep while Kodi is running.

sy6sy2 commented 4 years ago

This week I will try to have a look to this improvement. I think that I will try to do like Android --> https://github.com/xbmc/xbmc/pull/17187

davilla commented 4 years ago

Don't forget when tvos screensaver is up. You will get pushed into the background but tvOS will not schedule possible suspend in 5 seconds.