How to update currently playing protected video from iOS app when casting to Chromecast?

68 Views Asked by At

I checked CastVideos-ios sample app and now using this code to switch current item when casting to Chromecast:

let builder = GCKMediaInformationBuilder(contentURL: url)
if let remoteMediaClient = GCKCastContext.sharedInstance().sessionManager.currentCastSession?.remoteMediaClient {
    remoteMediaClient.loadMedia(with: builder.build())
}

It works for the videos from this example, but I also need to play videos with FairPlay protection. How can I set AVAssetResourceLoaderDelegate in such case? Or should I use another approach?

0

There are 0 best solutions below