2
votes

we are trying to play a HLS Live stream that is Audio-only. It looks ok spec-wise and we're able to play it on all browsers and native player that we have, but it fails to play on Chromecast.

Url: http://rcavliveaudio.akamaized.net/hls/live/2006635/P-2QMTL0_MTL/playlist.m3u8

Content-Type: vnd.apple.mpegURL

Steps to reproduce Force this content url and content type into the Chromecast player.

Expected To hear audio playing like on any other player we try.

Actual result There is no playback. The master playlist is fetched, the chunk playlist is fetched and the first chunks are fetched, but there is no playback. It stops after a few chunk. The player is stuck in the "processing segment" phase, and it stops.

2

2 Answers

1
votes

Please change the Content type to audio/mp4 and set AAC to segment format mediaInfo.hlsSegmentFormat = cast.framework.messages.HlsSegmentFormat.AAC;

0
votes

Using Anjaneesh's comment, here's how I ended up solving this. On the receiver's JavaScript:

  const instance = cast.framework.CastReceiverContext.getInstance();

  const options = new cast.framework.CastReceiverOptions();
  options.disableIdleTimeout = true;
  options.supportedCommands = cast.framework.messages.Command.ALL_BASIC_MEDIA;

  instance.start(options);

  const playerManager = instance.getPlayerManager();
  playerManager.setMessageInterceptor(cast.framework.messages.MessageType.LOAD, (req) => {
    req.media.hlsSegmentFormat = cast.framework.messages.HlsSegmentFormat.TS_AAC;
    req.media.streamType = cast.framework.messages.StreamType.LIVE;
    return req;
  });

The key is setting the message interceptor callback for the LOAD event/message. There, you can override hlsSegmentFormat from the client. In my case, I needed to indicate that my segments were in TS format.

I'm not entirely sure why this is necessary. It isn't necessary when there is a video track... only when video is missing.