Skip to content

Commit

Permalink
不测试的后果。。。
Browse files Browse the repository at this point in the history
  • Loading branch information
haocity committed Feb 21, 2018
1 parent 2609d07 commit c309e88
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Binary file modified chrome/chrome.zip
Binary file not shown.
Binary file modified chrome/dist.crx
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/tdplayer.js

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@ window.tdvidplay = function(options) {
//autoplay 是否自动播放
//ab 是否为番剧
//yk 是否为优酷
options.ele.style.backgroundColor = "#000000";
let videosrcarr = [];
options.ele2=document.querySelector(options.ele)
options.ele2.style.backgroundColor = "#000000"
let videosrcarr = []
let acflash = document.querySelector('section.player #player object') || document.querySelector('section.player #player #ACFlashPlayer')
if(acflash) {
acflash.style.display = 'none';
options.ele.style.height = acflash.style.height;
options.ele.style.backgroundColor = "#000000"
options.ele2.style.height = acflash.style.height;
options.ele2.style.backgroundColor = "#000000"
}
let e = document.createElement('div')
e.className = "tp-loding";
Expand All @@ -72,8 +73,8 @@ window.tdvidplay = function(options) {
let backimg = document.createElement("div")
backimg.className = "tp-img-back"
backimg.style.backgroundImage = "url(" + options.pic + ")"
options.ele.appendChild(backimg)
options.ele.appendChild(e)
options.ele2.appendChild(backimg)
options.ele2.appendChild(e)
let lodingimg = document.createElement("div")
let lodingimgwarp = document.createElement("div")
lodingimgwarp.className = 'tp-loding-img-warp tp-acenter'
Expand Down Expand Up @@ -1441,7 +1442,8 @@ class Tplayer {
if(this.config.dmshadow) {
shadow = `text-shadow: rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;`
}
this.ele.css.innerText = `
let t=this.options.Element
this.ele.css.innerHTML = `
${t} .tp-left {animation: dmleft ${this.config.v}s linear;-webkit-animation: dmleft ${this.config.v}s linear;}
${t} .danmaku-warp{font-weight:${this.config.dmweight};transform:scale(${this.config.danmakusize});-webkit-transform:scale(${this.config.danmakusize});-moz-transform:scale(${this.config.danmakusize});width:${100/this.config.danmakusize}%;height:${100/this.config.danmakusize}%;opacity:${this.config.danmakuo}}
${t} .tp-video-main>.danmaku-warp>.danmaku{${shadow}}`;
Expand Down

0 comments on commit c309e88

Please sign in to comment.