英华在线助手-自动静音连播-自动跳转到未完成视频-视频暂停超时播放提示音

return this._json;

}

refresh() { //刷新当前课程信息

var json = null;

if(this.parseIndex() != -1 && this.requireJson()) {

this._updateProperty();

return true;

}

else {

return false;

}

}

_updateProperty() { //设置属性

this.id = this._json.list[this.index % 20].id;

this.chapterId = this._json.list[this.index % 20].chapterId;

this.courseId = this._json.list[this.index % 20].courseId;

this.name = this._json.list[this.index % 20].name;

this.viewCount = parseInt(this._json.list[this.index % 20].viewCount);

this.duration = parseInt(this._json.list[this.index % 20].duration);

this.videoDuration = parseSec(this._json.list[this.index % 20].videoDuration);

this.state = /(未学完|未学|已学)/.exec(this._json.list[this.index % 20].state)[0];

if(this.state == “已学”) this.finished = true;

this.url = this.prefixURL1 + this._json.list[this.index % 20].url;

this.pageInfo = this._json.pageInfo;

// 保存 json 至本地(SKM_courseId_page_recordsCount_pageSize)

writeSessionStorage(SKM_${this.courseId}_${this._json.pageInfo.page}_${this._json.pageInfo.recordsCount}_${this._json.pageInfo.pageSize}, JSON.stringify(this._json), true);

}

}

class YHAssistant {

constructor() {

this.HTML = document.createElement(“div”);

this.baseInfo = null;

this.mainTimer = 0; //主时钟

this.currentDuration = -1; //观看时长

this.countdown = -1; //倒计时

this.course = null; //自定义课程对象

this.elTable = null; //HTML 表格对象

this.video = null; //HTML 视频对象

this.autoplay = true;

this.onduty = false; //是否值守

this.ocTip = null;

this._timer1 = 0; //值守计时器

this._timer2 = 0; //播放时长计时器(非Interval)

this._mtID = null; //主时钟 ID

this._tID1 = null; //值守计时器 ID

this._fg1 = false; //已切换背景

this._fg2 = false; //倒计时为 0

this._fg3 = false; //暂停计时

this._pageOther = false; //是否为其他页面

if(/\w+://mooc.yinghuaonline.com/user/node?\S+/.exec(location.href)) this.init();

else {

this.initOther();

this._pageOther = true;

}

}

init() { //播放界面初始化

var elStyle = null;

//添加 innerHTML

this.HTML.className = “YHAssistant”;

this.HTML.innerHTML += ‘

Title

  • 21
    点赞
  • 29
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值