学习网页视频不能拉进度条
function () { if (!issettime) { $video[0].currentTime = progress; lasttime = video.currentTime; } // 快进 if (lasttime + 3 video.currentTime) { // 当前进度是否超过学习进度 if (video.currentTime totalprogress) { video.currentTime = totalprogress; } } else { // 当前进度是否超过学习进度 if (video.currentTime totalprogress video.currentTime lasttime ) { totalprogress = video.currentTime; } } lasttime = video.currentTime; issettime = true; var currentTime = video.currentTime;//获取当前播放时间 if (Math.abs(currentTime - progress) 10 || currentTime == video.duration) { progress = currentTime + 1; $.ajax({ url: '/api/CommonApi?API=CATA_CourseProgressUpdate', html xmlns= head meta http-equiv=Content-Type content=text/html; charset=utf-8 / meta name=viewport content=width=device-width, { actionCode: 'Learning', initial-scale=1, success: function (data) { if (currentTime == video.duration) { window.clearInterval(requestLearning); } } }); } }); }); learning(); var maxtimes =1 * 12;//超过一个小时则认为挂机 var times = 0; //记录学习时长 function learning() { $.post('/Log/ActionLog', type: 'get', controls); } if (typeof(progress) == 'undefined') { progress = 0; } var issettime = false; var totalprogress = progress; $video[0].play(); // 防止快进 1、首次观看不允许快进, i)); if (result == null || result.length 1) { return ; } return result[1]; } document.oncontextmenu = function(){ event.returnValue = false; } // 或者直接返回整个事件 document.oncontextmenu = function(){ return false; } var url = getQueryStringByName('url'); var cid = getQueryStringByName('cid'); var title = getQueryStringByName('title'); var poster = getQueryStringByName('poster'); var progress = getQueryStringByName('progress'); var finish = getQueryStringByName(finish); var video = document.getElementById(coverPlayer); var pagelaodTime = Date.now(); $().ready(function() { title = decodeURIComponent(title); $('title').text(title); //初始化视频 var $video = $('#coverPlayer'); $video.attr('poster', function (xhr) { console.log('上报完成:' + JSON.stringify(xhr)); times++; if (times maxtimes) { window.clearInterval(requestLearning); } }); } var requestLearning = setInterval(learning, poster); $video.attr('src'。
5 * 60 * 1000); /script /body /html , objectId: cid }, dataType: 'json',快进不超过最大学习进度 var lasttime = 0; video.addEventListener(timeupdate, data: { CID: cid,第二次观看允许快进, url); if (finish == 1) { $video.attr('controls', Progress: Math.round(currentTime) }, minimum-scale=1, maximum-scale=1 titlee祺学视频播放/title style video::-internal-media-controls-download-button { display:none; } video::-webkit-media-controls-enclosure { overflow:hidden; } video::-webkit-media-controls-panel { width: calc(100% + 30px); } /style /head body video id=coverPlayer style=width: 100%;/video script src=/asset/gqcq/js/lib/jquery-2.0.2.min.js/script script type=text/javascript /** * @QueryStringByName 获取url中 key对应的值 * @author: yangxing1002@gmail.com **/ function getQueryStringByName(name) { var result = location.search.match(new RegExp([\?\] + name + =([^\]+),。
- 上一篇:华医网如何查询已获得的证书
- 下一篇:[原创教程] 破解网站视频禁止拖动思路
评论列表