Reputation: 2304
Based on the CastVideos sample for Android (https://github.com/googlecast/CastVideos-android), I am developing a video library app that will casts videos to a styled receiver on my Chromecast.
I want to implement a loop functionality. When the user clicks on a button, it activates video looping when it's casting. Is there a way to make that possible ? Any listener in the Cast SDK that I haven't found and that can make me able to play the video when it finishes ?
Upvotes: 1
Views: 1032
Reputation: 19094
You have a few options. If you want to stick to a Styled receiver, then you have at least the following two options:
If you can write a custom receiver (say, start with the reference player that is on our GitHub repo), then you can set the loop property on the media element yourself.
I believe all of the above solutions produce a bit of a pause when the media reaches the end and before it starts from the beginning. If you truly want a looping solution without such brief pause, you would then need to do some more work and use some approach based on Media Source Extension but that can get a bit tricky.
Upvotes: 1