Reputation: 9594
My users are complaining that when they click the disconnect after playing a video, it does not stop the video.
Is that something the CastCompanionLibrary should be doing or do I need to trap the disconnect and do it myself?
I thought maybe by the time I get the disconnect event it is probably too late for me to be telling the app to stop the video playback.
Upvotes: 3
Views: 1113
Reputation: 19094
CCL can do that if needed, but it is advised that you implement this in the receiver logic. I have explained the proper way of doing that in this post. Back to the first statement I made, you can use the following API to instruct the CCL to stop the running app on disconnect:
mVideoCastManager.setStopOnDisconnect(true)
You need to call that somewhere early from your application, say when you create the VideoCastManager singleton. But as I said earlier and is explained in the referenced post, that is not the proper way of doing that.
Upvotes: 3