How to send media status to sender of google cast?

45 views Asked by At

Setting up google cast.

I use my own player in the receiver. Interaction between the sender and the receiver occurs using custom messages. Everything works, but there is a problem with the state. It is always IDLE.

By default, if the state is IDLE for 5 - 10 minutes, the sender will close the connection with the receiver due to the timeout setting.

I cancel the timeout using options.disableIdleTimeout = true. This solves the problem of connection loss.

Now when I switch videos I get an error. [cast.receiver.MediaManager] Unexpected command, player is in IDLE state so the media session ID is not valid yet

I need to change the state from IDLE to PLAYING.

When starting a video I use playerManager.play(). It does not help.

How can the receiver send its updated MEDIA_STATUS to the sender?

0

There are 0 answers