在我的自定义接收器中,有这个片段:
<video id='media' width="1260" height="700" autoplay />
<video id='videoloop' width="1260" height="700" loop autoplay />
<script>
window.onload = function() {
//window.mediaElement = document.getElementById('media');
window.mediaElement = document.getElementById('videoloop');
window.mediaManager = new cast.receiver.MediaManager(window.mediaElement);
window.castReceiverManager = cast.receiver.CastReceiverManager.getInstance();
window.castReceiverManager.start();
通过这一行,我可以播放带声音的视频:
window.mediaElement = document.getElementById('media');
但是用这条线,我只能听到声音,但没有视频:
window.mediaElement = document.getElementById('videoloop');
有什么建议吗?