|
@@ -1,5 +1,6 @@
|
|
import Icons from './icons';
|
|
import Icons from './icons';
|
|
import tplPlayer from '../template/player.art';
|
|
import tplPlayer from '../template/player.art';
|
|
|
|
+import utils from './utils';
|
|
|
|
|
|
class Template {
|
|
class Template {
|
|
constructor(options) {
|
|
constructor(options) {
|
|
@@ -16,6 +17,7 @@ class Template {
|
|
index: this.index,
|
|
index: this.index,
|
|
tran: this.tran,
|
|
tran: this.tran,
|
|
icons: Icons,
|
|
icons: Icons,
|
|
|
|
+ mobile: utils.isMobile,
|
|
video: {
|
|
video: {
|
|
current: true,
|
|
current: true,
|
|
pic: this.options.video.pic,
|
|
pic: this.options.video.pic,
|
|
@@ -41,6 +43,7 @@ class Template {
|
|
this.video = this.container.querySelector('.dplayer-video-current');
|
|
this.video = this.container.querySelector('.dplayer-video-current');
|
|
this.bezel = this.container.querySelector('.dplayer-bezel-icon');
|
|
this.bezel = this.container.querySelector('.dplayer-bezel-icon');
|
|
this.playButton = this.container.querySelector('.dplayer-play-icon');
|
|
this.playButton = this.container.querySelector('.dplayer-play-icon');
|
|
|
|
+ this.mobilePlayButton = this.container.querySelector('.dplayer-mobile-play');
|
|
this.videoWrap = this.container.querySelector('.dplayer-video-wrap');
|
|
this.videoWrap = this.container.querySelector('.dplayer-video-wrap');
|
|
this.controllerMask = this.container.querySelector('.dplayer-controller-mask');
|
|
this.controllerMask = this.container.querySelector('.dplayer-controller-mask');
|
|
this.ptime = this.container.querySelector('.dplayer-ptime');
|
|
this.ptime = this.container.querySelector('.dplayer-ptime');
|