多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 创建视频载体(固定视频不随层移动) ~~~ video = plus.video.createVideoPlayer('video', { src:'https://aweme.snssdk.com/aweme/v1/playwm/?s_vid=93f1b41336a8b7a442dbf1c29c6bbc56ed36a264deeb0dbd7de34f2461f611992c7461fbd5d74f19fefee7b486937eb0f02f51f0a2c565611a8647508c79e643&line=0', top:'0', left:'0px', width: '100%', height: (Number(height) - 80) + 'px', 'poster' : 'https://p9.pstatp.com/large/tos-cn-p-0015/98750838e6834083a5301fb7c43f751d_1584966810.jpg', position: 'absolute', 'direction' : 0, //全屏方向正常竖向 'enable-danmu' : true, //展示弹幕 'danmu-btn' : true, //是否显示弹幕按钮 'show-progress' : false, //显示播放进度条 'enable-progress-gesture' : false, //是否开启进度手势 }); plus.webview.currentWebview().append(video); video.show(); ~~~ # 创建视频载体(视频随层移动) ~~~ video = new plus.video.VideoPlayer('video',{ 'src' : 'https://aweme.snssdk.com/aweme/v1/playwm/?s_vid=93f1b41336a8b7a442dbf1c29c6bbc56ed36a264deeb0dbd7de34f2461f611992c7461fbd5d74f19fefee7b486937eb0f02f51f0a2c565611a8647508c79e643&line=0', // 'show-progress' : false, // 'show-fullscreen-btn' : false, 'enable-progress-gesture' : false, 'danmu-btn' : true, 'enable-danmu' : true, 'direction' : 0, 'poster' : 'https://p9.pstatp.com/large/tos-cn-p-0015/98750838e6834083a5301fb7c43f751d_1584966810.jpg', }); ~~~ # 创建事件 ~~~ video.addEventListener('ended',function(e){ console.log(JSON.stringify(e)); }); ~~~