作者 景龙
1 个管道 的构建 通过 耗费 10 秒

解除独角星球模块视频限制

... ... @@ -91,6 +91,8 @@
<input type="hidden" value="{$vo.framing}" class="li_framing">
<!--上映时间-->
<input type="hidden" value="{$vo.release_time}" class="li_release_time">
<!--city_id-->
<input type="hidden" value="{$vo.city_id}" class="li_city_video_id">
</li>
</volist>
</ul>
... ... @@ -106,6 +108,8 @@
<input type="hidden" value="" id="li_id">
<p>取景:<span class="framing"></span></p>
<p>上映时间:<span class="release_time"></span></p>
<!--city_id-->
<input type="hidden" value="0" class="city_video_id">
<!--视频索引-->
<input type="hidden" value="0" class="video_index">
<!--视频url-->
... ... @@ -189,13 +193,22 @@
});
//登录
var users = $('#users').val();
//未登录
if (users == 0) {
//监听播放时间
video_mask('您还不是会员,可试看20秒');
var city_id = getUrlParam('city_id');
//非独角星球视频模块
if(city_id != 68){
video_mask('您还不是会员,可试看20秒');
}
var video = document.getElementById('video');
//使用事件监听方式捕捉事件
video.addEventListener("timeupdate", function() {
//获取当前点击播放视频的city_id
var city_video_id = $('.city_video_id').val();
var timeDisplay;
//用秒数来显示当前播放进度
timeDisplay = Math.floor(video.currentTime);
... ... @@ -203,13 +216,19 @@
video.addEventListener('play', function() {
video.currentTime = 0;
});
//当视频播放到 15s的时候做处理
if (timeDisplay >= 20) {
video.addEventListener('play', function() {
video.currentTime = 0;
}),
video_mask('会员可观看完整视频');
video.pause();
//非独角星球视频模块
if(city_id != 68){
//当视频播放到 15s的时候做处理
if(city_video_id != 68){
if (timeDisplay >= 20) {
video.addEventListener('play', function() {
video.currentTime = 0;
}),
video_mask('会员可观看完整视频');
video.pause();
}
}
}
}, false);
}
... ... @@ -317,12 +336,13 @@
var city_name = li_index.children('.li_city_name').val();
var framing = li_index.children('.li_framing').val();
var release_time = li_index.children('.li_release_time').val();
var city_video_id = li_index.children('.li_city_video_id').val();
$('#li_id').val(id);
$('.post_title').text(post_title);
$('.city_name').text(city_name);
$('.framing').text(framing);
$('.release_time').text(release_time);
$('.city_video_id').val(city_video_id);
//是否收藏
is_collections(id);
... ...
... ... @@ -119,6 +119,8 @@
<input type="hidden" value="{$vo.framing}" class="li_framing">
<!--上映时间-->
<input type="hidden" value="{$vo.release_time}" class="li_release_time">
<!--city_id-->
<input type="hidden" value="{$vo.city_id}" class="li_city_video_id">
</li>
</volist>
</ul>
... ... @@ -133,6 +135,8 @@
<!-- <div class="index_seventh_bottom_two">国家:<span class="city_name"></span></div> -->
<div class="index_seventh_bottom_three">取景:<span class="framing"></span></div>
<div class="index_seventh_bottom_four">上映时间:<span class="release_time"></span></div>
<!--city_id-->
<input type="hidden" value="0" class="city_video_id">
<!--视频索引-->
<input type="hidden" value="0" class="video_index">
<!--视频url-->
... ... @@ -182,10 +186,18 @@
var users = $('#users').val();
if (users == 0) {
//监听播放时间
video_mask('您还不是会员,可试看20秒');
var city_id = getUrlParam('city_id');
//非独角星球视频模块
if(city_id != 68){
video_mask('您还不是会员,可试看20秒');
}
var video = document.getElementById('video');
//使用事件监听方式捕捉事件
video.addEventListener("timeupdate", function() {
//获取当前点击播放视频的city_id
var city_video_id = $('.city_video_id').val();
var timeDisplay;
//用秒数来显示当前播放进度
timeDisplay = Math.floor(video.currentTime);
... ... @@ -193,14 +205,19 @@
video.addEventListener('play', function() {
video.currentTime = 0;
});
//当视频播放到 15s的时候做处理
if (timeDisplay >= 20) {
video.addEventListener('play', function() {
video.currentTime = 0;
}),
video_mask('会员可观看完整视频');
video.pause();
//非独角星球视频模块
if(city_id != 68){
if(city_video_id != 68){
//当视频播放到 15s的时候做处理
if (timeDisplay >= 20) {
video.addEventListener('play', function() {
video.currentTime = 0;
}),
video_mask('会员可观看完整视频');
video.pause();
}
}
}
}, false);
}
... ... @@ -362,11 +379,13 @@
var city_name = li_index.children('.li_city_name').val();
var framing = li_index.children('.li_framing').val();
var release_time = li_index.children('.li_release_time').val();
var city_video_id = li_index.children('.li_city_video_id').val();
$('#li_id').val(id);
$('.post_title').text(post_title);
$('.city_name').text(city_name);
$('.framing').text(framing);
$('.release_time').text(release_time);
$('.city_video_id').val(city_video_id);
//是否收藏
is_collections(id);
... ...