Skip to content

Commit

Permalink
core: use import
Browse files Browse the repository at this point in the history
  • Loading branch information
micooz committed Jul 28, 2017
1 parent 339baea commit 5f9e1a3
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/DPlayer.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
console.log('\n %c DPlayer 1.5.0 %c http://dplayer.js.org \n\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');

require('./DPlayer.scss');
const utils = require('./utils.js');
const svg = require('./svg.js');
const handleOption = require('./option.js');
const i18n = require('./i18n.js');
const html = require('./html.js');
const Video = require('./video.js');
const isMobile = /mobile/i.test(window.navigator.userAgent);
import './DPlayer.scss';

import utils, {isMobile} from './utils';
import svg from './svg';
import handleOption from './option';
import i18n from './i18n';
import html from './html';
import Video from './video';

let index = 0;

Expand Down Expand Up @@ -160,7 +160,7 @@ class DPlayer {
const clearCheckLoadingTime = () => {
clearInterval(this.checkLoading);
};

this.animationFrame = () => {
if (this.playedTime) {
this.updateBar('played', this.video.currentTime() / this.video.duration, 'width');
Expand Down Expand Up @@ -933,7 +933,6 @@ class DPlayer {
* Read danmaku from API
*/
readDanmaku () {
const isMobile = /mobile/i.test(window.navigator.userAgent);
let apiurl;
if (this.option.danmaku.maximum) {
apiurl = `${this.option.danmaku.api}?id=${this.option.danmaku.id}&max=${this.option.danmaku.maximum}`;
Expand Down

0 comments on commit 5f9e1a3

Please sign in to comment.