src/SSCMS.Web/wwwroot/sitefiles/assets/js/admin/common/materialLayerVideo.js
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
var $urlUploadVideo = $apiUrl + '/common/material/layerVideo/actions/uploadVideo?siteId=' + utils.getQueryInt('siteId');
var $urlUploadImage = $apiUrl + '/common/material/layerVideo/actions/uploadImage?siteId=' + utils.getQueryInt('siteId');
var data = utils.init({
activeName: 'first',
form: {
siteId: utils.getQueryInt('siteId'),
type: 'upload',
videoUrl: '',
isPoster: false,
isAutoPlay: false,
isWidth: false,
isHeight: false,
imageUrl: '',
width: '100%',
height: '300px',
isLinkToOriginal: true,
},
player: null
});
var methods = {
btnTabsClick: function() {
if (this.activeName !== 'second') return;
if (this.player) {
this.player.poster(this.form.isPoster ? this.form.imageUrl : '');
this.player.src([{src: this.form.videoUrl}]);
} else {
this.player = videojs(this.$refs.videoPlayer, {
poster: this.form.isPoster ? this.form.imageUrl : '',
sources: [
{
src: this.form.videoUrl
}
]
});
}
},
btnSubmitClick: function () {
if (!this.form.videoUrl) {
utils.error('请设置需要插入的视频文件!');
return false;
}
var imageUrl = this.form.isPoster && this.form.imageUrl ? ' imageUrl="' + this.form.imageUrl + '"' : '';
var isAutoPlay = ' isAutoPlay="' + this.form.isAutoPlay + '"';
var width = this.form.isWidth ? ' width="' + this.form.width + '"' : '';
var height = this.form.isHeight ? ' height="' + this.form.height + '"' : '';
var clipUrl = utils.getAssetsUrl('images/video-clip.png');
parent.$vue.insertHtml('<img ' + imageUrl + isAutoPlay + width + height + ' playUrl="' + this.form.videoUrl + '" class="siteserver-stl-player" style="width: 333px; height: 333px" src="' + clipUrl + '" /><br/>');
utils.closeLayer();
},
btnCancelClick: function () {
utils.closeLayer();
},
uploadVideoBefore(file) {
后面还有 56 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
