How to play HLS streams with fmp4 container in chromecast CAFv3 receivers?

Default CAFv3 behaviour

The current CAFv3 SDK uses the default Media Player Library (MPL ) to playback HLS streams. However, default MPL doesn’t support HLS playback for streams with fmp4 containers.

Solution

Google CAF team has recommended to use shaka instead of MPL for HLS playback as a solution. This can be achieved through the useShakaForHls property.

The default Bitmovin receiver follows the default CAFv3 behaviour so in order to use Shaka for HLS you should slightly update our public sample by setting the useShakaForHls property to true, for example:

let castReceiverOptions = new cast.framework.CastReceiverOptions();
castReceiverOptions.useShakaForHls = true;
this.context.start(castReceiverOptions);

Please, take into account that you may need to update the chromecast-caf-receiver version in the packages.json file in order to acess to the latest version, for instance

"chromecast-caf-receiver": "^6.0.10"

Note: Likely this tweak wont be needed anymore after H2 2024 as Shaka will become the default player for HLS as described here HLS On Shaka Player Migration  |  Cast  |  Google for Developers

1 Like

really good to know !