【发布时间】:2021-07-19 15:15:14
【问题描述】:
我已经使用 Brightcove Player Loader 在我的页面上加载了 Brightcove 视频播放器:
brightcovePlayerLoader({
refNode: document.querySelector('#mainvid'),
accountId: myaccountId, //this is a variable with global scope
playerId: '947WeZ6d',
videoId: mainvidID
})
.then(function(success) {
myPlayer = success.ref;
console.log('success', success);
myPlayer.on('loadedmetadata',function(){
//myPlayer.muted(true);
//myPlayer.play();
});
})
.catch(function(error) {
console.log('error', error);
});
当用户单击图像时,我想读取图像的 ID 并将其用作 myPlayer 的新 VideoID。但是我该怎么做呢?
$('.vid-thumbnail').on('click', function() {
myPlayer.videoId = maidvidID; //doesn't work
});
【问题讨论】:
标签: brightcove