我正在尝试定制CAF Receiver (https://github.com/googlecast/BasicReceiverCAF)的缓冲UI。
现在我只有一个黑屏和一个小进度条在屏幕左下角,就像这里的https://developers.google.com/cast/docs/design_checklist/receiver#receiver-ui-buffer,但没有预览图片。
我的问题是,如何设置这个预览而不是黑色背景?
我试过了:
let playerElement = document.getElementById('player');
playerElement.style
.setProperty('--buffering-image', 'url("/img/megacast-placeholder.jpg")'); 但是这段代码会影响进度条控件,它取代了image.Also上的环,我从这里https://developers.google.com/cast/docs/caf_receiver_features尝试了其他属性
请帮忙,提前谢谢。
发布于 2018-04-18 17:40:31
--启动图像
是您应该使用的属性。如果由于某些原因不能使用:
playerElement.style.setProperty('--splash-image', 'url("../img/megacast-placeholder.jpg")'); 尝试添加包含以下内容的单独样式标记
#player {
--splash-image: url("../img/megacast-placeholder.jpg");
}https://stackoverflow.com/questions/47301881
复制相似问题