请右键保存截图
",t.appendChild(e),this.alert({t:t,btn:!0})}},{key:"changersound",value:function(){for(var e=.01*parseInt(this.ele.tp_s.style.width),t=0;t弹幕透明度 | \n\n \n |
弹幕缩放 | \n\n |
弹幕加粗 | \n关闭阴影 | \n
合并重复弹幕 | \n|
屏蔽弹幕 | \n\n |
优先画质 | \n\n \n | \n
\n 意见反馈&&协助开发&&指导 请联系QQ 1051667334 \n技术水平有限 感谢你的使用 \n | \n
弹幕透明度 | 54 |55 | 56 | |
弹幕缩放 | 59 |60 | |
弹幕加粗 | 63 |关闭阴影 | 64 |
合并重复弹幕 | 67 ||
屏蔽弹幕 | 70 |71 | |
优先画质 | 74 |75 | 81 | | 82 |
85 | 意见反馈&&协助开发&&指导 请联系QQ 1051667334 86 |技术水平有限 感谢你的使用 87 | |
88 |
请右键保存截图
' 1667 | warp.appendChild(c) 1668 | this.alert({t:warp,btn:true}) 1669 | } 1670 | changersound() { 1671 | let s = parseInt(this.ele.tp_s.style.width) * .01; 1672 | for(let i = 0; i < this.videoelearr.length; i++) { 1673 | this.videoelearr[i].volume = s; 1674 | } 1675 | this.config.sound =parseInt(s * 100); 1676 | this.alert({t:''+this.config.sound+"%",time:1000,padding:'6px 10px',opacity:"0.9"}) 1677 | localStorage.setItem('tdconfig', JSON.stringify(this.config)) 1678 | } 1679 | //菜单 1680 | tp_menu(ev) { 1681 | let _this=this; 1682 | let container = this.ele.tplayer; 1683 | let rightmenu = this.ele.tp_rightmenu; 1684 | if (this.istouch!=1){ 1685 | let target = ev.target || ev.srcElement; 1686 | if (hasClass(target, "danmaku")) { 1687 | this.ele.copytext.innerHTML = target.innerHTML; 1688 | this.ele.copy.style.display = "block"; 1689 | this.ele.copy.onclick = function() { 1690 | _this.ele.copytext.select(); 1691 | document.execCommand("Copy"); 1692 | rightmenu.style.display = "none"; 1693 | }; 1694 | } else { 1695 | this.ele.copy.style.display = "none"; 1696 | } 1697 | rightmenu.style.display = "block"; 1698 | let leftedge, topedge, danmakuheight = this.ele.danmaku_warp.offsetHeight, danmakuwidth = this.ele.danmaku_warp.offsetWidth; 1699 | if (danmakuheight == document.documentElement.clientHeight) { 1700 | topedge = ev.clientY; 1701 | leftedge = ev.clientX; 1702 | if (leftedge + rightmenu.offsetWidth > danmakuwidth) { 1703 | leftedge = danmakuwidth - rightmenu.offsetWidth; 1704 | } 1705 | if (topedge + rightmenu.offsetWidth > danmakuheight) { 1706 | topedge = danmakuheight - rightmenu.offsetHeight; 1707 | } 1708 | } else { 1709 | topedge = ev.clientY + document.documentElement.scrollTop - this.getTop(this.ele.tplayer); 1710 | leftedge = ev.clientX - this.getLeft(this.ele.tplayer); 1711 | let tweidth = container.offsetWidth; 1712 | let theigtht = container.offsetHeight; 1713 | if (leftedge + rightmenu.offsetWidth > tweidth) { 1714 | leftedge = tweidth - rightmenu.offsetWidth; 1715 | } 1716 | if (topedge + rightmenu.offsetHeight > theigtht) { 1717 | topedge = theigtht - rightmenu.offsetHeight; 1718 | } 1719 | } 1720 | rightmenu.style.top = topedge + "px"; 1721 | rightmenu.style.left = leftedge + "px"; 1722 | 1723 | } 1724 | } 1725 | changermode(a) { 1726 | //this.ele.tp_video_warp.style.height = this.ele.tp_video_warp.offsetWidth * 0.6 + 'px'; 1727 | } 1728 | tiao(time) { 1729 | let oldduan = this.getduan(time) - 1, oldtime = 0; 1730 | for (let i = 0; i <= oldduan; i++) { 1731 | oldtime += this.videotimearr[i]; 1732 | } 1733 | let duantime = time - oldtime; 1734 | this.nowduan = this.getduan(time); 1735 | //video id 1736 | for (let i = 0; i < this.videoelearr.length; i++) { 1737 | if (i != this.nowduan) { 1738 | let ele = this.videoelearr[i]; 1739 | ele.style.display = "none"; 1740 | ele.currentTime = 0; 1741 | ele.pause(); 1742 | } else { 1743 | let ele = this.videoelearr[i]; 1744 | this.Element = ele; 1745 | if (ele.style.display!= "block") { 1746 | ele.style.display = "block" 1747 | } 1748 | ele.currentTime = duantime; 1749 | if(ele.paused){ 1750 | ele.play() 1751 | } 1752 | this.ele.tp_spinner.style.display = "none"; 1753 | } 1754 | } 1755 | if(this.removaldata&&this.config.qc){ 1756 | this.nowdata=this.removaldata 1757 | if (this.config.pb) { 1758 | this.shielddanmaku() 1759 | } 1760 | }else{ 1761 | this.nowdata=this.data.slice(0); 1762 | } 1763 | if (this.ele.video_control_play.display != "none") { 1764 | this.play(); 1765 | } 1766 | //清空top和高级弹幕 1767 | // let a=this.ele.danmaku_warp.querySelectorAll('.danmaku-ad') 1768 | // for (let i = 0; i < a.length; i++) { 1769 | // a[i].parentNode.removeChild(a[i]) 1770 | // } 1771 | // let b=this.ele.danmaku_warp.querySelectorAll('.tp-top') 1772 | // for (let i = 0; i < b.length; i++) { 1773 | // b[i].parentNode.removeChild(b[i]) 1774 | // } 1775 | for (let i = 0; i < this.nowdm.length; i++) { 1776 | if(this.nowdm[i]&&this.nowdm[i].call){ 1777 | this.nowdm[i].call() 1778 | } 1779 | } 1780 | } 1781 | 1782 | 1783 | } 1784 | 1785 | window.Tplayer=Tplayer; 1786 | 1787 | -------------------------------------------------------------------------------- /src/style.css: -------------------------------------------------------------------------------- 1 | 2 | /*player*/ 3 | .tplayer{ 4 | height: 100%; 5 | width: 100%; 6 | } 7 | .tp-video-warp.tp-video-warp-fixed{ 8 | position: fixed; 9 | right: 10px; 10 | top: 10px; 11 | width: 360px; 12 | height: 230px; 13 | z-index: 99; 14 | } 15 | .tp-video-warp.tp-video-warp-fixed .tp-control{ 16 | display: none!important; 17 | } 18 | 19 | .tp-video-warp p{ 20 | margin: 0; 21 | } 22 | .tp-video-warp ul{ 23 | margin: 0; 24 | padding: 0; 25 | } 26 | .tp-video-warp{ 27 | font-size: 14px; 28 | } 29 | .tp-tip{ 30 | display: none; 31 | position: fixed; 32 | left: 145px; 33 | background-color: #5f5f5f7d; 34 | line-height: 18px; 35 | padding: 4px 6px; 36 | top: -9px; 37 | border-radius: 4px; 38 | /* transition: left 0.1s;*/ 39 | } 40 | .video-end { 41 | position: absolute; 42 | height: 100%; 43 | width: 100%; 44 | z-index: 8; 45 | background: #000 url(img/tdlogo.png) no-repeat right 40px bottom 30px; 46 | display: none; 47 | opacity: 1; 48 | animation: tpshow 3s; 49 | -webkit-animation:tpshow 3s; 50 | } 51 | @keyframes tpshow 52 | { 53 | from {opacity: 0} 54 | to {opacity: 1} 55 | } 56 | @-webkit-keyframes tpshow 57 | { 58 | from {opacity: 0} 59 | to {opacity: 1} 60 | } 61 | .video-end>.replay { 62 | position: absolute; 63 | left: 50%; 64 | top: 50%; 65 | margin-left: -50px; 66 | margin-top: -50px; 67 | transition:transform 2s; 68 | -moz-transition:transform 2s; 69 | -webkit-transition:transform 2s; 70 | } 71 | .video-end>.replay:hover { 72 | transform: rotate(360deg); 73 | -webkit-transform: rotate(360deg); 74 | -moz-transform: rotate(360deg); 75 | } 76 | .tp-video-main>.danmaku-warp>.danmaku { 77 | color: #fff; 78 | line-height: 37px; 79 | z-index: 6; 80 | padding: 0 4px; 81 | font-family: Avenir Next,Helvetica,Arial,Lantinghei SC,Microsoft YaHei,sans-serif; 82 | } 83 | .tp-left { 84 | position: absolute; 85 | will-change: transform; 86 | right: 0; 87 | font-size: 24px; 88 | animation: dmleft 10s linear; 89 | -webkit-animation: dmleft 10s linear; 90 | cursor: pointer; 91 | white-space: nowrap; 92 | } 93 | .tp-top { 94 | position: absolute; 95 | left: 50%; 96 | text-align: center; 97 | display: block; 98 | font-size: 22px; 99 | transform: translateX(-50%); 100 | -webkit-transform: translateX(-50%); 101 | white-space:nowrap; 102 | } 103 | .danmaku-ad{ 104 | position: absolute; 105 | white-space: nowrap; 106 | -webkit-transform: translate(50%,50%); 107 | -moz-transform: translate(50%,50%); 108 | transform: translate(50%,50%); 109 | } 110 | @keyframes dmleft { 111 | 0% { 112 | -webkit-transform: translateX(100%); 113 | transform: translateX(100%) 114 | } 115 | } 116 | @-webkit-keyframes dmleft { 117 | 0% { 118 | -webkit-transform: translateX(100%); 119 | transform: translateX(100%) 120 | } 121 | } 122 | .danmaku-warp { 123 | position: absolute; 124 | top: 0; 125 | left: 0; 126 | width: 100%; 127 | height: 100%; 128 | overflow: hidden; 129 | transform-origin: top left; 130 | -moz-transform-origin:top left; 131 | -webkit-transform-origin:top left; 132 | } 133 | .tp-send { 134 | position: absolute; 135 | left: 50%; 136 | width: 60%; 137 | height: 35px; 138 | border-radius: 5px; 139 | margin: 0 0 0 -30%; 140 | text-align: center; 141 | padding: 4px 0; 142 | background-color: rgba(255, 255, 255, 0.79); 143 | z-index: 6; 144 | box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12); 145 | } 146 | .tp-text { 147 | width: 100%; 148 | line-height: 36px; 149 | height: 36px; 150 | border: none; 151 | text-align: center; 152 | background-color: transparent; 153 | outline: none; 154 | } 155 | 156 | .tp-up { 157 | display: none; 158 | position: relative; 159 | 160 | left: 20px; 161 | background-color: #8715EF; 162 | color: #fff; 163 | border: 0 solid #000; 164 | line-height: 20px; 165 | border-radius: 4px; 166 | padding: 3px 20px; 167 | } 168 | 169 | .tp-msg{ 170 | position: absolute; 171 | bottom: 60px; 172 | right: 6px; 173 | background-color: rgba(255, 255, 255, 0.95); 174 | padding: 6px 10px; 175 | z-index: 999; 176 | border-radius: 6px; 177 | } 178 | .tp-msg>.tp-msg-close{ 179 | cursor: pointer; 180 | color: #000; 181 | font-weight: 600; 182 | font-size: 1.4em; 183 | line-height: 18px; 184 | padding-right: 8px; 185 | font-size: 15px; 186 | } 187 | .tp-video-main { 188 | position: absolute; 189 | width: 100%; 190 | height: 100%; 191 | background-color: #000; 192 | -webkit-user-select: none; 193 | -moz-user-select: none; 194 | user-select: none; 195 | overflow:hidden; 196 | } 197 | .tp-video { 198 | position: absolute; 199 | left: 0; 200 | right: 0; 201 | bottom: 0; 202 | top: 0; 203 | width: 100%; 204 | height: 100%; 205 | margin: auto; 206 | } 207 | .tp-video-con { 208 | opacity: 0; 209 | position: absolute; 210 | bottom: 0; 211 | height: 100px; 212 | width: 100%; 213 | background: linear-gradient(to top,rgba(0,0,0,.75),hsla(0,0%,100%,0)); 214 | transition: opacity 1s; 215 | -moz-transition: opacity 1s; 216 | -webkit-transition: opacity 1s; 217 | } 218 | .tp-video-con:hover{ 219 | opacity: 1!important; 220 | } 221 | .tp-control { 222 | position: absolute; 223 | bottom: 0; 224 | padding-bottom: 10px; 225 | left: 0; 226 | width: 100%; 227 | height: 45px; 228 | color: #fff; 229 | line-height: 0; 230 | user-select: none; 231 | z-index: 888; 232 | } 233 | .tp-control-nowtime,.tp-control-alltime{ 234 | cursor: default; 235 | } 236 | .tp-icon { 237 | position: relative; 238 | top: 6px; 239 | padding-left: 10px; 240 | padding-right: 2px; 241 | width: 30px; 242 | height: 30px; 243 | cursor: pointer; 244 | fill: #fff; 245 | } 246 | 247 | .tp-definition{ 248 | display: none; 249 | } 250 | .tp-danmaku-switch { 251 | position: relative; 252 | display: inline-block; 253 | border: 2px solid #fff; 254 | color: #fff; 255 | border-radius: 50%; 256 | width: 22px; 257 | height: 22px; 258 | line-height: 22px; 259 | font-size: 14px; 260 | text-align: center; 261 | cursor: pointer; 262 | } 263 | .tp-danmaku-switch-c { 264 | color: #000 !important; 265 | border: none !important; 266 | background-color: #fff; 267 | } 268 | 269 | .tp-vloop{ 270 | display: inline-block; 271 | height: 25px; 272 | width: 25px; 273 | background-size: cover; 274 | transform: translateY(8px); 275 | cursor: pointer; 276 | } 277 | .tp-vloop1{ 278 | background-image: url(img/vloop1.png) 279 | } 280 | .tp-vloop2{ 281 | background-image: url(img/vloop2.png) 282 | } 283 | .tp-set{ 284 | background-image: url(img/set.png); 285 | display: inline-block; 286 | height: 24px; 287 | width: 24px; 288 | margin: 0 14px; 289 | background-size: cover; 290 | transform: translateY(8px); 291 | cursor: pointer; 292 | } 293 | .sound-ico{ 294 | background-image: url(img/sound.png); 295 | display: inline-block; 296 | height: 26px; 297 | width: 26px; 298 | background-size: cover; 299 | cursor: pointer; 300 | margin-right: 5px; 301 | vertical-align: bottom; 302 | } 303 | .tp-alert,.tp-video-set{ 304 | display: none; 305 | position: absolute; 306 | top: 50%; 307 | left: 50%; 308 | transform: translateX(-50%) translateY(-50%); 309 | -webkit-transform: translateX(-50%) translateY(-50%); 310 | z-index: 999; 311 | background-color: rgba(255, 255, 255, 0.95); 312 | border-radius: 5px; 313 | overflow: hidden; 314 | font-size: 14px; 315 | } 316 | 317 | .tp-video-set{ 318 | width: 400px; 319 | height: 300px; 320 | } 321 | 322 | 323 | .tp-alert-ok{ 324 | width: 50px; 325 | background-color: #e05865; 326 | color: #fff; 327 | padding: 4px 10px; 328 | border-radius: 5px; 329 | text-align: center; 330 | margin: 5px auto; 331 | cursor: pointer; 332 | } 333 | .tp-closeset{ 334 | position:absolute; 335 | top: 0; 336 | right:0; 337 | padding:4px; 338 | cursor:pointer; 339 | color:#000; 340 | font-weight: 600; 341 | font-size: 1.4em; 342 | } 343 | .tp-alert-container{ 344 | padding: 20px 345 | } 346 | .tp-alert-container .tp-screenshot-canvas{ 347 | height: auto; 348 | width: 300px 349 | } 350 | .tp-settable{ 351 | margin:0 auto; 352 | cursor:default; 353 | } 354 | .tp-video-set>h4{ 355 | margin: 0 0 8px 0; 356 | padding: 10px 20px; 357 | background-color: rgb(243, 93, 93); 358 | color: #fff; 359 | } 360 | .tp-syk { 361 | padding: 10px 10px; 362 | position: relative; 363 | display: inline-block; 364 | color: #fff; 365 | top: -7px; 366 | vertical-align: bottom; 367 | } 368 | .tp-s-tranger { 369 | position: relative; 370 | height: 10px; 371 | width:80px; 372 | margin-left: 30px; 373 | top: 10px; 374 | background-color: rgba(142, 129, 129, 0.6); 375 | border-radius: 4px; 376 | cursor: pointer; 377 | overflow:hidden; 378 | } 379 | .tp-s-tranger>.tp-s-tranger-a { 380 | position: absolute; 381 | left: 0; 382 | top: 0; 383 | width: 10%; 384 | height: 100%; 385 | background-color: #e33d3d; 386 | border-radius: 4px 0 0 4px; 387 | } 388 | .tp-tranger { 389 | position: relative; 390 | height: 11px; 391 | background-color: rgba(0, 0, 0, 0.17); 392 | border-radius: 6px; 393 | cursor: pointer; 394 | overflow: hidden; 395 | margin-top: 18px; 396 | margin-left: 80px; 397 | margin-right: 170px; 398 | } 399 | .tp-tranger>.tp-tranger-a { 400 | position: relative; 401 | display: inline-block; 402 | background-color: rgb(248, 73, 73); 403 | height: 100%; 404 | width: 0; 405 | border-radius: 6px; 406 | z-index: 3; 407 | } 408 | .tp-tranger>.tp-tranger-b { 409 | position: relative; 410 | display: inline-block; 411 | background-color: #FFFFFF; 412 | height: 100%; 413 | width: 11px; 414 | border-radius: 50%; 415 | right: 16px; 416 | z-index: 5; 417 | } 418 | .tp-tranger>.tp-tranger-c { 419 | position: absolute; 420 | top: 0; 421 | width: 0%; 422 | height: 100%; 423 | background-color: rgba(207, 198, 198, 0.47); 424 | border-radius: 6px; 425 | z-index: 2; 426 | overflow: hidden; 427 | } 428 | .tp-syk-ico { 429 | position: absolute; 430 | top: 22px; 431 | left:12px; 432 | font-size: 1.6em; 433 | cursor:default; 434 | } 435 | 436 | /*loding*/ 437 | .tp-oneplay{ 438 | width: 120px; 439 | height: 111px; 440 | z-index: 999; 441 | background-color: rgb(234, 62, 73); 442 | cursor: pointer; 443 | border-radius: 10px; 444 | } 445 | .tp-oneplay>svg{ 446 | width: 100px; 447 | height: 100px; 448 | fill: #fff; 449 | margin-left: 10px; 450 | } 451 | .tp-acenter{ 452 | position: absolute; 453 | top: 0; 454 | left: 0; 455 | bottom: 0; 456 | right: 0; 457 | margin: auto; 458 | } 459 | .tp-spinner { 460 | width: 76px; 461 | height: 40px; 462 | z-index: 7; 463 | display: none; 464 | } 465 | .tp-suspend { 466 | -webkit-animation-play-state: paused !important; 467 | animation-play-state: paused !important; 468 | } 469 | .md-iframe { 470 | display: none; 471 | } 472 | .tp-place2 { 473 | background-color: #3b3b3b; 474 | margin: 2px 0 4px 0; 475 | color: #fff; 476 | cursor: pointer; 477 | } 478 | .tp-spinner > div { 479 | background-color: #fff; 480 | height: 100%; 481 | width: 6px; 482 | display: inline-block; 483 | -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out; 484 | animation: sk-stretchdelay 1.2s infinite ease-in-out; 485 | border: 1px solid #dadada; 486 | } 487 | .tp-spinner .rect2 { 488 | -webkit-animation-delay: -1.1s; 489 | animation-delay: -1.1s; 490 | } 491 | .tp-spinner .rect3 { 492 | -webkit-animation-delay: -1.0s; 493 | animation-delay: -1.0s; 494 | } 495 | .tp-spinner .rect4 { 496 | -webkit-animation-delay: -0.9s; 497 | animation-delay: -0.9s; 498 | } 499 | .tp-spinner .rect5 { 500 | -webkit-animation-delay: -0.8s; 501 | animation-delay: -0.8s; 502 | } 503 | @-webkit-keyframes sk-stretchdelay { 504 | 0%, 40%, 100% { 505 | -webkit-transform: scaleY(0.4) 506 | } 507 | 20% { 508 | -webkit-transform: scaleY(1.0) 509 | } 510 | } 511 | @keyframes sk-stretchdelay { 512 | 0%, 40%, 100% { 513 | transform: scaleY(0.4); 514 | -webkit-transform: scaleY(0.4); 515 | } 516 | 20% { 517 | transform: scaleY(1.0); 518 | -webkit-transform: scaleY(1.0); 519 | } 520 | } 521 | .video-full { 522 | width: 20px; 523 | padding-right: 30px; 524 | top: 9px; 525 | position: relative; 526 | padding-left: 10px; 527 | height: 30px; 528 | cursor: pointer; 529 | fill: #fff; 530 | } 531 | 532 | :-webkit-full-screen .tp-video-main { 533 | height: 100% !important; 534 | width: 100% !important; 535 | position: fixed; 536 | left: 0; 537 | top: 0; 538 | right: 0; 539 | bottom: 0; 540 | } 541 | :-moz-full-screen .tp-video-main { 542 | height: 100% !important; 543 | width: 100% !important; 544 | position: fixed; 545 | left: 0; 546 | top: 0; 547 | right: 0; 548 | bottom: 0; 549 | } 550 | :-ms-fullscreen .tp-video-main { 551 | height: 100% !important; 552 | width: 100% !important; 553 | position: fixed; 554 | left: 0; 555 | top: 0; 556 | right: 0; 557 | bottom: 0; 558 | } 559 | :-full-screen .tp-video-main { 560 | height: 100% !important; 561 | width: 100% !important; 562 | position: fixed; 563 | left: 0; 564 | top: 0; 565 | right: 0; 566 | bottom: 0; 567 | } 568 | :fullscreen .tp-video-main { 569 | height: 100% !important; 570 | width: 100% !important; 571 | position: fixed; 572 | left: 0; 573 | top: 0; 574 | right: 0; 575 | bottom: 0; 576 | } 577 | .tp-con { 578 | position: absolute; 579 | top: -90px; 580 | display: none; 581 | width: 150px; 582 | margin: 0 auto; 583 | padding: 6px; 584 | background-color: rgba(255, 255, 255, 0.75); 585 | border-radius: 6px; 586 | overflow: hidden; 587 | } 588 | .tp-color { 589 | display: inline-block; 590 | position: absolute; 591 | top: 18px; 592 | right: 15px; 593 | border-radius: 4px; 594 | cursor: pointer; 595 | z-index: 7; 596 | } 597 | .tp-color-w{ 598 | float: left; 599 | } 600 | .tp-color-warp { 601 | height: 60px; 602 | overflow-y: scroll; 603 | overflow-x: hidden; 604 | } 605 | .tp-color-main { 606 | width: 20px; 607 | height: 20px; 608 | border: 1px solid #FFFFFF; 609 | border-radius: 2px; 610 | } 611 | .tp-color-bo { 612 | position: relative; 613 | bottom: 8px; 614 | width: 20px; 615 | height: 20px; 616 | border-radius: 50%; 617 | border: 1px solid #8b8585; 618 | } 619 | .tp-place { 620 | text-align: center; 621 | padding-bottom: 4px; 622 | } 623 | .tp-rightmenu { 624 | display: none; 625 | position: absolute; 626 | overflow: hidden; 627 | width: 130px; 628 | margin: 0; 629 | padding: 0; 630 | list-style: none; 631 | border-radius: 4px; 632 | background: rgba(28, 28, 28, 0.9); 633 | border: none; 634 | text-shadow: rgba(0, 0, 0, 0.5) 0px 0px 2px; 635 | color: #fff; 636 | z-index: 9999; 637 | } 638 | .tp-rightmenu a { 639 | color: #fff; 640 | text-decoration: none; 641 | } 642 | .tp-rightmenu li { 643 | padding: 2px 0 2px 8px; 644 | cursor: pointer; 645 | } 646 | .tp-rightmenu li:hover { 647 | padding-left: 7px; 648 | background-color: rgba(255,255,255,0.2); 649 | } 650 | .tp-search-user{ 651 | display: none; 652 | } 653 | ul.tp-speend { 654 | display: none; 655 | margin: 4px 0 4px 30px; 656 | } 657 | 658 | .tp-copy-input{ 659 | display: block; 660 | width: 100%; 661 | height: 19px; 662 | overflow: hidden; 663 | padding: 0; 664 | margin: 0; 665 | background-color: transparent; 666 | border: 0; 667 | color: #fff; 668 | resize: none; 669 | cursor: pointer; 670 | font-size: 15px; 671 | line-height: 21px; 672 | overflow:hidden; 673 | font-family: Avenir Next,Helvetica,Arial,Lantinghei SC,Microsoft YaHei,sans-serif; 674 | } 675 | .tp-control-alltime-phone{ 676 | display: none; 677 | } 678 | .tp-loding{ 679 | position: absolute; 680 | width: 100%; 681 | height: 100%; 682 | top: 0; 683 | left: 0; 684 | z-index: 20; 685 | 686 | } 687 | .tp-loding-img-warp{ 688 | height: 120px; 689 | width: 120px; 690 | box-sizing: content-box; 691 | border: 8px solid rgba(200, 200, 200, 0.63); 692 | border-radius: 50%; 693 | animation:lodingborder 1s infinite alternate; 694 | -webkit-animation:lodingborder 1s infinite alternate; 695 | overflow: hidden; 696 | } 697 | @keyframes lodingborder 698 | { 699 | to { border: 14px solid rgba(200, 200, 200, 0.63);} 700 | } 701 | @-webkit-keyframes lodingborder 702 | { 703 | to { border: 14px solid rgba(200, 200, 200, 0.63);} 704 | } 705 | .tp-loding-img{ 706 | background-image: url(http://cdn.aixifan.com/dotnet/20130418/umeditor/dialogs/emotion/images/ac3/02.gif); 707 | width: 120px; 708 | height: 120px; 709 | background-repeat: no-repeat; 710 | background-position: center; 711 | background-size: 100px; 712 | background-color: rgb(255, 255, 255); 713 | } 714 | .tp-loding-text{ 715 | color: #ffffff; 716 | text-align: center; 717 | position: absolute; 718 | bottom: 30%; 719 | width: 100% 720 | } 721 | .tp-img-back{ 722 | position: absolute; 723 | width: 100%; 724 | height: 100%; 725 | background-size: cover; 726 | -webkit-filter: blur(10px); 727 | -moz-filter: blur(10px); 728 | -ms-filter: blur(10px); 729 | filter: blur(10px); 730 | z-index: 2; 731 | overflow: hidden; 732 | } 733 | .noflash-alert{ 734 | display:none; 735 | } 736 | section.clearfix.wp.area.player { 737 | z-index: 99; 738 | } 739 | .off-light{ 740 | position: fixed; 741 | top: 0; 742 | left: 0; 743 | z-index: 50; 744 | background-color: #000; 745 | width: 100%; 746 | height: 100%; 747 | } 748 | @media screen and (max-width: 700px) { 749 | .tp-tranger{ 750 | position: absolute; 751 | width: 97%; 752 | bottom: 4px; 753 | margin: 0; 754 | } 755 | .tp-video-con>.tp-send{ 756 | bottom: 60px; 757 | left: initial; 758 | right: 10%; 759 | width: 80%; 760 | } 761 | .tp-control-alltime{ 762 | display: none; 763 | } 764 | .tp-control-alltime-phone{ 765 | display: inline-block; 766 | } 767 | } 768 | /*animation*/ 769 | .tp-zoomoutdown{ 770 | animation:zoomOutDown .5s; 771 | -webkit-animation:zoomOutDown .5s; 772 | } 773 | @keyframes zoomOutDown { 774 | 40% { 775 | opacity: 1; 776 | transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); 777 | animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); 778 | } 779 | 780 | to { 781 | opacity: 0; 782 | transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0); 783 | transform-origin: center bottom; 784 | animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); 785 | } 786 | } 787 | @-webkit-keyframes zoomOutDown { 788 | 40% { 789 | opacity: 1; 790 | transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); 791 | animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); 792 | } 793 | 794 | to { 795 | opacity: 0; 796 | transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0); 797 | transform-origin: center bottom; 798 | animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); 799 | } 800 | } 801 | .tp-zoomoutup{ 802 | animation:zoomInUp .5s; 803 | -webkit-animation:zoomInUp .5s; 804 | } 805 | @keyframes zoomInUp { 806 | from { 807 | opacity: 0; 808 | transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); 809 | animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); 810 | } 811 | 812 | 60% { 813 | opacity: 1; 814 | transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); 815 | animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); 816 | } 817 | } 818 | @-webkit-keyframes zoomInUp { 819 | from { 820 | opacity: 0; 821 | transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); 822 | animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); 823 | } 824 | 825 | 60% { 826 | opacity: 1; 827 | transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); 828 | animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); 829 | } 830 | } 831 | @media screen and (max-width: 470px) { 832 | .tp-syk{ 833 | display: none; 834 | } 835 | } -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | module.exports = { 3 | entry: './src/index.js', 4 | output: { 5 | filename: 'tplayer.js', 6 | path: path.resolve(__dirname, 'dist') 7 | },module: { 8 | rules:[ 9 | { 10 | test: /\.js$/, 11 | loader:"babel-loader", 12 | include: /src/, 13 | exclude: /node_modules/, 14 | options: { 15 | presets: ['es2015'] 16 | } 17 | },{ 18 | test: /\.css$/, 19 | loader: 'style-loader!css-loader', 20 | include: /src/, 21 | exclude: /node_modules/ 22 | },{ 23 | test: /\.(png|jpg)$/, 24 | loader: 'url-loader', 25 | include: /src/, 26 | exclude: /node_modules/ 27 | } 28 | 29 | ] 30 | } 31 | }; --------------------------------------------------------------------------------