[JS] 动态修改ckPlayer播放器宽度

时间:2021-05-06 07:31:40

//设置播放器宽度
var play_width=0;
$(function(){
play_width = $(window).width() - $(".stu-video-r").width();
});

//当窗口改变宽度时执行此函数

window.onresize=resizeBannerImage;
function resizeBannerImage() {
play_width = $(window).width() - $(".stu-video-r").width();
CKobject.getObjectById('ckplayer_a1').width = play_width;
}