## Overview

A common use case is leveraging our Player iOS SDK to play HLS streams with FairPlay DRM protection on iOS devices. This solution works very well for protecting the content while ensuring compatibility with the iOS operating system.

However, this presents some issues if you'd like to enable casting from your iOS app to devices such as Chromecast, which doesn't support FairPlay. In scenarios like this, it's possible to instruct your app to switch to a different streaming and DRM format that is Chromecast-compatible, such as DASH + Widevine DRM.

## Switch from HLS FairPlay to DASH Widevine

As shown in [this github example](🔗), switching to a different streaming and DRM format is easy when casting to a 3rd party device. Here is the relevant piece of code that handles this:

### When using the playlist feature of the Player iOS SDK

When using the built-in Player iOS SDK feature, called Playlists (example can be found [here](🔗)) - while still supporting casting - it is necessary to account for the different sources in `RemoteControlConfig.prepareSource`.

This mapping has to be available at the moment of starting the casting session for the whole playlist.

Here is a redacted code snippet to showcase such a setup: