CastV2inPHP
CastV2inPHP copied to clipboard
Include image with audiocast
"urn:x-cast:com.google.cast.media" supports including images with the message: https://developers.google.com/cast/docs/reference/messages#GenericMediaMetadata
It should be added here: https://github.com/ChrisRidings/CastV2inPHP/blob/master/CCDefaultMediaPlayer.php#L15
But I'm not quite sure on the correct syntax... Would it be something like this? $json = '{"type":"LOAD","media":{"contentId":"' . $url . '","streamType":"' . $streamType . '","contentType":"' . $contentType . '", "metadata":{"metadataType":0, "images":['http://www.google.com/image.png']}},"autoplay":' . $autoPlay . ',"currentTime":' . $currentTime . ',"requestId":921489134}';
I'm not at a machine to test and a bit short on time, but search google suggests:
metadata: {
metadataType: 0,
title: "Big Buck Bunny",
images: [
{ url: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/BigBuckBunny.jpg' }
]
}
In the place you've put it should be fine.