Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
300 views
in Technique[技术] by (71.8m points)

React native google casting images stop when app goes in background

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 ?

question from:https://stackoverflow.com/questions/65921260/react-native-google-casting-images-stop-when-app-goes-in-background

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...