How to keep Chrome Cast running in background iOS?

2019-03-28 11:35发布

问题:

I have a simple question when you go to home screen of iPhone and do not quit the application than the chrome Cast device stops playing the video on screen how can I keep playback alive while the application is running in background.

回答1:

If you have a video app and it is running in a cast device, you would want the following behavior:

  • if user "explicitly" disconnects a device (through the cast menu), then receiver should look at the connected devices and see if there is any "other" connected device. If there is none, it should stop the application on the cast device. If, however, it finds another connected device, it should not stop the app.

  • If user doesn't explicitly disconnect but device gets disconnected since the app goes into background, or phone goes out of wifi range, or it battery dies, or ..., then receiver should not stop the app and should let it run, even if there is no other connected sender.

If you follow these two in the design of your app and your receiver, then you shouldn't have any issue when your phone goes to sleep or your app goes to background. Do you still see an issue given the above?