0

I am using react-native-google-cast for casting images with timer as adding images to queue is not supported by google

from https://developers.google.com/cast/docs/ios_sender/queueing

Note: The styled media receiver and default media receiver do not support a queue of images; only a queue of audio or video streams is supported in the styled and default receivers.

const client = useRemoteMediaClient()

setInterval(() => {
 client.loadMedia({image data...})
}, 5000)

It casts images one by one perfectly when app is in foreground, but stops as soon as app goes background only to continue when app comes back to foreground.

I tried react-native-background-timer and I can see counter executing in the background but still casting stays on hold.

Is there any way to make image casting work in background as well? Is it possible with default receiver ?

Praful Kadam
  • 372
  • 6
  • 22
  • Found solution here https://stackoverflow.com/questions/38897611/how-to-keep-gckcastsession-alive-when-app-goes-to-background/38898182. Now stuck again as app in background will run only for 30 seconds and not infinitely as required in this case. – Praful Kadam Jan 27 '21 at 18:30
  • Well I believe I will have to create custom receiver app then create and provide image queue to that custom receiver app. – Praful Kadam Jan 27 '21 at 18:55

0 Answers0