casting – Is the chromecast default receiver able to play HLS audio only streams?

I’ve been having a terrible time trying to play a HLS AAC audio only stream to a chromecast device. Supposedly the default receiver application handles HLS, and it seems to sort of do so, but the audio never plays. The stream I’m testing works with several other HLS web players like hsl.js and Shaka Player, but not on the chromecast device itself.

I’ve tried some other sample streams and they also fail. The most recent test is with this HLS audio only test from Shaka Player. https://storage.googleapis.com/shaka-demo-assets/raw-hls-audio-only/manifest.m3u8

When I try to play that stream I see the default receiver request the manifest and request a few of the audio files, but it stalls there and never plays anything. I have DEBUG logging setup, but the only really useful thing I see in the logs is

Unsafe attempt to load URL https://storage.googleapis.com/shaka-demo-assets/raw-hls-audio-only/manifest.m3u8 from frame with URL https://www.gstatic.com/cast/sdk/default_receiver/1.0/app.html?skin. Domains, protocols and ports must match.

Which doesn’t even make sense to me since that URL responds with all the appropriate CORs headers. Any help or advice would be helpful even if it is only firm confirmation that the default receiver can’t do this and I’m going to have to try to write my own.

In the network tab I see

Here are the complete logs from the receiver application

 [ 20.319s] [cast.receiver.IpcChannel] Received message: {"data":"{"largeMessageSupported":false,"senderId":"91d0aba3-760d-9abb-af58-3fb96da2cca7.70:sender-0","type":"senderconnected","userAgent":"RustCast"}","namespace":"urn:x-cast:com.google.cast.system","senderId":"SystemSender"} 
cast_receiver_framework.js:116  [ 20.323s] [cast.receiver.CastMessageBus] Dispatching CastMessageBus message 
cast_receiver_framework.js:116  [ 20.329s] [cast.receiver.CastReceiverManager] Dispatching CastReceiverManager sender connected event [91d0aba3-760d-9abb-af58-3fb96da2cca7.70:sender-0] 
cast_receiver_framework.js:116  [ 20.337s] [cast.receiver.CastMessageBus] Registering sender [urn:x-cast:com.google.cast.cac, 91d0aba3-760d-9abb-af58-3fb96da2cca7.70:sender-0] 
cast_receiver_framework.js:116  [ 20.342s] [cast.receiver.CastMessageBus] Registering sender [urn:x-cast:com.google.cast.debugoverlay, 91d0aba3-760d-9abb-af58-3fb96da2cca7.70:sender-0] 
cast_receiver_framework.js:116  [ 20.347s] [cast.receiver.CastMessageBus] Registering sender [urn:x-cast:com.google.cast.broadcast, 91d0aba3-760d-9abb-af58-3fb96da2cca7.70:sender-0] 
cast_receiver_framework.js:116  [ 20.352s] [cast.receiver.CastMessageBus] Registering sender [urn:x-cast:com.google.cast.media, 91d0aba3-760d-9abb-af58-3fb96da2cca7.70:sender-0] 
cast_receiver_framework.js:116  [ 20.355s] [cast.receiver.CastMessageBus] Registering sender [urn:x-cast:com.google.cast.inject, 91d0aba3-760d-9abb-af58-3fb96da2cca7.70:sender-0] 
cast_receiver_framework.js:116  [ 20.363s] [cast.receiver.IpcChannel] Received message: {"data":"{"requestId":3,"sessionId":"0fc5db1c-837b-4226-bff9-7ee7a7b339eb","type":"LOAD","media":{"contentId":"https://storage.googleapis.com/shaka-demo-assets/raw-hls-audio-only/manifest.m3u8","streamType":"BUFFERED","contentType":"application/vnd.apple.mpegurl"},"currentTime":0.0,"customData":{},"autoplay":true}","namespace":"urn:x-cast:com.google.cast.media","senderId":"91d0aba3-760d-9abb-af58-3fb96da2cca7.70:sender-0"} 
cast_receiver_framework.js:116  [ 20.368s] [cast.receiver.CastMessageBus] Dispatching CastMessageBus message 
cast_receiver_framework.js:116  [ 20.374s] [cast.receiver.MediaManager] MediaManager message received 
cast_receiver_framework.js:116  [ 20.382s] [cast.receiver.MediaManager] Dispatching MediaManager load event 
cast_receiver_framework.js:116  [ 20.383s] [cast.receiver.MediaManager] Load message received:{"requestId":3,"sessionId":"0fc5db1c-837b-4226-bff9-7ee7a7b339eb","type":"LOAD","media":{"contentId":"https://storage.googleapis.com/shaka-demo-assets/raw-hls-audio-only/manifest.m3u8","streamType":"BUFFERED","contentType":"application/vnd.apple.mpegurl"},"currentTime":0,"customData":{},"autoplay":true} 
cast_receiver_framework.js:116  [ 20.392s] [cast.framework.common.EventHandler] onEvent for load 
cast_receiver_framework.js:116  [ 20.401s] [cast.receiver.MediaManager] Sending broadcast status message 
cast_receiver_framework.js:116  [ 20.446s] [cast.receiver.IpcChannel] IPC message sent: {"namespace":"urn:x-cast:com.google.cast.media","senderId":"*:*","data":"{"type":"MEDIA_STATUS","status":[{"mediaSessionId":1,"playbackRate":1,"playerState":"IDLE","currentTime":0,"supportedMediaCommands":12303,"volume":{"level":1,"muted":false},"media":{"contentId":"https://storage.googleapis.com/shaka-demo-assets/raw-hls-audio-only/manifest.m3u8","streamType":"BUFFERED","contentType":"application/vnd.apple.mpegurl"},"currentItemId":1,"extendedStatus":{"playerState":"LOADING","media":{"contentId":"https://storage.googleapis.com/shaka-demo-assets/raw-hls-audio-only/manifest.m3u8","streamType":"BUFFERED","contentType":"application/vnd.apple.mpegurl"},"mediaSessionId":1},"repeatMode":"REPEAT_OFF"}],"requestId":0}"} 
cast_receiver_framework.js:116  [ 20.450s] [cast.framework.PlayerManager] MediaManagerLoad 
cast_receiver_framework.js:116  [ 20.515s] [cast.receiver.MediaManager] No need to prefetch more for now. 
cast_receiver_framework.js:116  [ 20.529s] [cast.framework.media.StreamingPlayer] load: 0 
cast_receiver_framework.js:116  [ 20.671s] [cast.receiver.IpcChannel] Received message: {"data":"{"requestId":484310003,"type":"QUEUE_GET_ITEM_IDS","mediaSessionId":1}","namespace":"urn:x-cast:com.google.cast.media","senderId":"91d0aba3-760d-9abb-af58-3fb96da2cca7.69:com.google.android.gms-10"} 
cast_receiver_framework.js:116  [ 20.674s] [cast.receiver.CastMessageBus] Dispatching CastMessageBus message 
cast_receiver_framework.js:116  [ 20.678s] [cast.receiver.MediaManager] Load is in progress, media command is being queued. 
th @ cast_receiver_framework.js:116
sh.o @ cast_receiver_framework.js:608
(anonymous) @ cast_receiver_framework.js:65
ge @ cast_receiver_framework.js:65
ne @ cast_receiver_framework.js:66
_.H @ cast_receiver_framework.js:67
_.h.Qg @ cast_receiver_framework.js:646
_.h.Kh @ cast_receiver_framework.js:599
Td @ cast_receiver_framework.js:63
_.h.dispatchEvent @ cast_receiver_framework.js:580
_.h.ql @ cast_receiver_framework.js:597
Td @ cast_receiver_framework.js:63
_.h.dispatchEvent @ cast_receiver_framework.js:580
rf @ cast_receiver_framework.js:79
_.h.ll @ cast_receiver_framework.js:589
onMessage @ VM93:1
[Violation] 'readystatechange' handler took 154ms
app.html:1 Unsafe attempt to load URL https://storage.googleapis.com/shaka-demo-assets/raw-hls-audio-only/manifest.m3u8 from frame with URL https://www.gstatic.com/cast/sdk/default_receiver/1.0/app.html?skin. Domains, protocols and ports must match.

[Violation] 'setTimeout' handler took 63ms
cast_receiver_framework.js:116  [ 21.464s] [cast.receiver.MediaManager] Buffering state changed, isPlayerBuffering: true old time: 0 current time: 0 
cast_receiver_framework.js:116  [ 21.466s] [cast.receiver.MediaManager] Sending broadcast status message 
cast_receiver_framework.js:116  [ 21.478s] [cast.receiver.IpcChannel] IPC message sent: {"namespace":"urn:x-cast:com.google.cast.media","senderId":"*:*","data":"{"type":"MEDIA_STATUS","status":[{"mediaSessionId":1,"playbackRate":1,"playerState":"BUFFERING","currentTime":0,"supportedMediaCommands":12303,"volume":{"level":1,"muted":false},"currentItemId":1,"repeatMode":"REPEAT_OFF"}],"requestId":0}"} 
cast_receiver_framework.js:116  [125.074s] [cast.receiver.IpcChannel] Received message: {"data":"{"reason":"transport_closed","senderId":"91d0aba3-760d-9abb-af58-3fb96da2cca7.70:sender-0","type":"senderdisconnected"}","namespace":"urn:x-cast:com.google.cast.system","senderId":"SystemSender"} 
cast_receiver_framework.js:116  [125.080s] [cast.receiver.CastMessageBus] Dispatching CastMessageBus message 
cast_receiver_framework.js:116  [125.084s] [cast.receiver.CastReceiverManager] Dispatching sender disconnected event [91d0aba3-760d-9abb-af58-3fb96da2cca7.70:sender-0] Reason: unknown 
cast_receiver_framework.js:116  [125.088s] [cast.receiver.CastMessageBus] Unregistering sender [urn:x-cast:com.google.cast.cac, 91d0aba3-760d-9abb-af58-3fb96da2cca7.70:sender-0] 
cast_receiver_framework.js:116  [125.091s] [cast.receiver.CastMessageBus] Unregistering sender [urn:x-cast:com.google.cast.debugoverlay, 91d0aba3-760d-9abb-af58-3fb96da2cca7.70:sender-0] 
cast_receiver_framework.js:116  [125.096s] [cast.receiver.CastMessageBus] Unregistering sender [urn:x-cast:com.google.cast.broadcast, 91d0aba3-760d-9abb-af58-3fb96da2cca7.70:sender-0] 
cast_receiver_framework.js:116  [125.099s] [cast.receiver.CastMessageBus] Unregistering sender [urn:x-cast:com.google.cast.media, 91d0aba3-760d-9abb-af58-3fb96da2cca7.70:sender-0] 
cast_receiver_framework.js:116  [125.103s] [cast.receiver.CastMessageBus] Unregistering sender [urn:x-cast:com.google.cast.inject, 91d0aba3-760d-9abb-af58-3fb96da2cca7.70:sender-0] 
cast_receiver_framework.js:116  [125.108s] [cast.framework.Application] onSenderDisconnected 
cast_receiver_framework.js:116  [320.513s] [IdleTimeoutManager] timer expired 
cast_receiver_framework.js:116  [320.516s] [cast.receiver.IpcChannel] Closing message bus websocket 
cast_receiver_framework.js:116  [320.524s] [cast.receiver.IpcChannel] IpcChannel closed 
cast_receiver_framework.js:116  [320.529s] [cast.receiver.CastMessageBus] Dispatching CastMessageBus message 
cast_receiver_framework.js:116  [320.534s] [cast.receiver.CastReceiverManager] Dispatching shutdown event 
cast_receiver_framework.js:116  [320.541s] [cast.receiver.CastMessageBus] Disposed CastMessageBus[urn:x-cast:com.google.cast.system] 
cast_receiver_framework.js:116  [320.543s] [cast.receiver.CastMessageBus] Disposed CastMessageBus[urn:x-cast:com.google.cast.cac] 
cast_receiver_framework.js:116  [320.545s] [cast.receiver.CastMessageBus] Disposed CastMessageBus[urn:x-cast:com.google.cast.debugoverlay] 
cast_receiver_framework.js:116  [320.547s] [cast.receiver.CastMessageBus] Disposed CastMessageBus[urn:x-cast:com.google.cast.broadcast] 
cast_receiver_framework.js:116  [320.552s] [cast.receiver.CastMessageBus] Disposed CastMessageBus[urn:x-cast:com.google.cast.media] 
cast_receiver_framework.js:116  [320.555s] [cast.receiver.CastMessageBus] Disposed CastMessageBus[urn:x-cast:com.google.cast.inject] 
cast_receiver_framework.js:116  [320.564s] [cast.receiver.CastReceiverManager] Disposed CastReceiverManager 
[Violation] 'setTimeout' handler took 65ms

Leave a Comment