Chromecast Custom Receiver styling

梦想与她 提交于 2019-12-25 03:27:31

问题


I created a custom receiver for my Chromecast app to receive media. However, I want to add a background picture, watermark, logo etc before the media I am casting is loaded. That functionality is currently available in the Styled Media Receiver and according to this Google site (https://developers.google.com/cast/docs/styled_receiver) I can do that in the css field with .background and .logo etc.But I try to add that into my css portion of the custom receiver, nothing shows up, just skips to the media I am trying to stream from Sender app. What am I doing wrong? Can I not put those classes? I am already importing the following scripts:

<script type="text/javascript" src="//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js"></script>
<script type="text/javascript" src="//www.gstatic.com/cast/sdk/libs/mediaplayer/0.7.0/media_player.js"></script>

回答1:


Those CSS classes are specific to the way the Styled Media Receiver works.

For you own custom receiver, you need to define the CSS styles you want to use. The Styled Media Receiver classes won't just work for you.

Take a look at this sample app on how to create a receiver that complies with the Google Cast Design Checklist: https://github.com/googlecast/Cast-Player-Sample




回答2:


I am not sure I am following you. Did you create your own custom receiver or you are using the Styled receiver? If you are using your own, then you are in charge of all the styling yourself as any other web page that you can write, there is no styling done by google for your own custom receiver.



来源:https://stackoverflow.com/questions/25254684/chromecast-custom-receiver-styling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!