2
votes

This is my first time trying chromecast apps.

I started with the CastVideos-android paired with a Styled Media Player with custom skin url. After some hurdles, was able to get the custom skin to work plus the video clips from the sender app plays nicely.

Now I'm attempting a custom media player using the sample CastHelloVideoPlayer receiver app from google's sample list and paired with the CastVideos-android sender app. After creating a new application id and recompiled CastVideos-android, I tried to cast some videos to the cast device.

1) First thing I noticed is the TV is purely blanked. No default app name or anything, just plain black screen. Didn't think much about it since this is a custom media player, a lot of things may not be set such as the logo/splash/watermark.

2) Main issue I have encountered, when I tried to play a video clip the cast device remains blank. Looking at the chrome debugging console I noticed this error message:

[ 32.941s] [cast.receiver.MediaManager] Load metadata error: [object Object]pd @ cast_receiver.js:formatted:2249nd.Zc @ cast_receiver.js:formatted:2234tb.log @ cast_receiver.js:formatted:675G @ cast_receiver.js:formatted:710W.Yb @ cast_receiver.js:formatted:4855g.Yb @ cast_receiver.js:formatted:3660Jc @ cast_receiver.js:formatted:1500Gc @ cast_receiver.js:formatted:1550(anonymous function) @ cast_receiver.js:formatted:1447
cast_receiver.js:formatted:2249 [ 32.955s] [cast.receiver.MediaManager] Sending error message to b5d9d1e6-f6d6-a0bd-440c-fe7255ebfcbc.11:com.google.sample.cast.refplayer-172

Now I'm surprised to encounter this because the same video clips played nicely when I'm using the Styled Media Player. But failed when I used the sample CastHelloVideoPlayer?

1

1 Answers

3
votes

Just found out that the sample receiver app I took from Chromecast sample page is limited to the default media containers defined in Custom Receiver Supported media format. And the sample sender app is sending m3u8 containers. So after changing the sender app to select the correct target media (mp4), everything starts working.

To support HLS, need to use the Google Cast Media Library which is not part of any of the sample apps.