Commit 37c6aa86 authored by xiabin's avatar xiabin

修改flv的支持

parent c736f7e1
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
</div> </div>
</div> </div>
<div v-show="videoShow" class="video-main"> <div class="video-main">
<video id="my-video-play" class="video-js vjs-default-skin vjs-big-play-centered" <video id="my-video-play" class="video-js vjs-default-skin vjs-big-play-centered"
controls preload="auto"> controls preload="auto">
<source :src="coursewareInfo.videoUrl" type="video/x-flv"/> <source :src="coursewareInfo.videoUrl"/>
</video> </video>
</div> </div>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
:src="item.avatar"></a> :src="item.avatar"></a>
<p><a href="javascript:;" data-toggle="modal" data-target="#myModal2">{{item.name}}</a></p> <p><a href="javascript:;" data-toggle="modal" data-target="#myModal2">{{item.name}}</a></p>
</div> </div>
<div class="video-sm-info pull-right"> <div class="video-sm-info pull-right" style="width:100%">
<p class="mb-right"> <p class="mb-right">
<a href="javascript:;"><i class="icon-comment-empty"></i>{{coursewareInfo.comment_count}}</a> <a href="javascript:;"><i class="icon-comment-empty"></i>{{coursewareInfo.comment_count}}</a>
<a @click="favorite" href="javascript:;"><i <a @click="favorite" href="javascript:;"><i
...@@ -248,12 +248,13 @@ ...@@ -248,12 +248,13 @@
this.isMobile = this.coursewareInfo.isMobile; this.isMobile = this.coursewareInfo.isMobile;
this.isWeixin = Utils.isWeixin(); this.isWeixin = Utils.isWeixin();
videojs("my-video-play", { videojs("my-video-play", {
"techOrder": ['html5','flash'],
"controls": true, "controls": true,
"autoplay": false, "autoplay": false,
"language": "zh-CN", "language": "zh-CN",
poster: this.coursewareInfo.previewUrl poster: this.coursewareInfo.previewUrl
}).ready(function () { }).ready(function () {
var myPlayer = this; self.videoShow = true;
var rate = 9 / 16; var rate = 9 / 16;
$('#my-video-play').css('width', '100%'); $('#my-video-play').css('width', '100%');
var wVideo = $('.video-detail-info').width(); var wVideo = $('.video-detail-info').width();
...@@ -264,11 +265,15 @@ ...@@ -264,11 +265,15 @@
var hVideo = wVideo * rate; var hVideo = wVideo * rate;
$('#my-video-play').css('height', hVideo); $('#my-video-play').css('height', hVideo);
}; };
self.videoShow = true;
}); });
} }
} }
</script> </script>
...@@ -75,7 +75,7 @@ var config = { ...@@ -75,7 +75,7 @@ var config = {
// {from: __dirname + '/resource', to: 'resource'}, // {from: __dirname + '/resource', to: 'resource'},
{from: lib_dir + '/layer', to: 'layer'}, {from: lib_dir + '/layer', to: 'layer'},
{from: img_dir, to: 'img'}, {from: img_dir, to: 'img'},
{from: lib_dir + '/videojs/video-js.swf', to: 'libs/videojs/'}, {from: lib_dir + '/videojs/video-js.swf', to: 'videojs/'},
{from: lib_dir + '/plupload', to: 'plupload'}, {from: lib_dir + '/plupload', to: 'plupload'},
// {from: manage_dir + '/dist', to: 'manage/dist'}, // {from: manage_dir + '/dist', to: 'manage/dist'},
// {from: manage_dir + '/plugins', to: 'manage/plugins'}, // {from: manage_dir + '/plugins', to: 'manage/plugins'},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment