Google Chromecast SDK TearDown in background

后端 未结 2 1733
旧巷少年郎
旧巷少年郎 2021-01-16 19:58

Using the iOS Sender API Framework, when my application goes in the background, the SDK tears down all connections and I cannot launch any more media until the app is put ba

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-16 20:36

    With the version 2.0 of the iOS Sender API, the GCKCastSocket is closed upon receiving a UIApplicationDidEnterBackgroundNotification and this is not something that can be configured.

    That means:

    • no new media can be pushed from the app to the chromecast while the app is in the background
    • it is not possible to implement lock screen controls

    Alternatives (custom receiver only):

    • Send a list of media to be played to the receiver
    • Fetch new media from the cloud directly from the receiver

    See also this question or this one for more details.

提交回复
热议问题