public/plugins/wxeditor/ueditor/dialogs/video/show.js
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
(function () {
var style = 'position:relative;z-index:1;max-width:100%!important;margin:auto;';
function getParam(name) {
return location.href.match(new RegExp('[?#&]' + name + '=([^?#&]+)', 'i')) ? RegExp.$1 : '';
}
var url = decodeURIComponent(getParam('url'));
var iframeId = getParam('id'), $iframe = null, $wxEditor = null;
if (iframeId) {
$iframe = $(parent.document).contents().find('#' + iframeId);
style = $iframe.attr('style');
$wxEditor = $iframe.parent('._wxEditor');
$wxEditor.height($iframe.height());
}
var videoObject = {
container: '#video', //“#”代表容器的ID,“.”或“”代表容器的class
// crossOrigin: 'Anonymous',//发送跨域字符
video: url,//视频地址
webFull:true,//是否启用页面全屏按钮,默认不启用
theatre:true,//是否启用剧场模式按钮,默认不启用
controls:false,//是否显示自带控制栏
rightBar:true,//是否开启右边控制栏
smallWindows:false,//是否启用小窗口模式
screenshot:true,//截图功能是否开启
menu: [
{
title:'关于视频',
click:'aboutShow'
}
],
};
var m = /.*(\.\w+)[?#].*$/.exec(url);
if (m) {
var type = m[1].toLowerCase();
if (type == '.m3u8') {
videoObject.plug = 'hls.js';
} else if (type == '.flv') {
videoObject.plug = 'flv.js';
} else if (type == '.ts') {
videoObject.plug = 'mpegts.js';
}
}
var player = new ckplayer(videoObject);
//页面全屏
player.webFull(function (bool) {
if (bool && $iframe) {
var _style = $('#video >.ckplayer-ckplayer').attr('style');
$iframe.attr('style', _style).css('z-index', '99999999999999');
} else {
$iframe.attr('style', style);
}
});
//剧场模式
player.theatre(function (bool) {
if (bool && $iframe) {
var _style = $('#video >.ckplayer-ckplayer').attr('style');
$iframe.attr('style', _style).css('z-index', '99999999999999');
} else {
$iframe.attr('style', style);
}
后面还有 36 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。