How can I listen to progress on Google Cast in iOS? I have implemented cast support in my app based on https://github.com/googlecast/CastVideos-ios but I don't want to use their GCKUIExpandedMediaControlsViewController class to control playback.
I added GCKRemoteMediaClientListener to GCKCastSession's GCKRemoteMediaClient. It calls
public func remoteMediaClient(_ client: GCKRemoteMediaClient, didUpdate mediaStatus: GCKMediaStatus?) {
print("position: \(mediaStatus?.streamPosition)")
}
But it's called every 10 seconds and I would like to get progress every second. Is there some way to do it? Or I have to implement my own timer and check current stream position every second?
Thanks
It is recommended that you use the widgets provided by the SDK. They have been optimized to manage the media status efficiently. There are various ways you can customize and brand these widgets for your app.