Skip to content

Commit

Permalink
0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
weizhenye committed Oct 15, 2017
1 parent d8f8287 commit 564dea8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
8 changes: 2 additions & 6 deletions dist/ass.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1805,6 +1805,7 @@ function init(source, video, options) {

this.scale = 1;

// private variables
this._ = {
index: 0,
stagings: [],
Expand Down Expand Up @@ -1862,8 +1863,6 @@ function init(source, video, options) {
document.head.appendChild($style);
}

this._.inited = true;

resize.call(this);

return this;
Expand All @@ -1882,9 +1881,6 @@ function hide() {
function destroy() {
var this$1 = this;

if (!this._ || !this._.inited) {
return this;
}
pause.call(this);
clear.call(this);
unbindEvents.call(this, this._.listener);
Expand Down Expand Up @@ -1923,7 +1919,7 @@ function setter(r) {
}

var ASS = function ASS(source, video, options) {
if ((this._ && this._.inited) || !video || video.nodeName !== 'VIDEO') {
if (typeof source !== 'string' || !video || video.nodeName !== 'VIDEO') {
return this;
}
return init.call(this, source, video, options);
Expand Down
8 changes: 2 additions & 6 deletions dist/ass.js
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,7 @@ function init(source, video, options) {

this.scale = 1;

// private variables
this._ = {
index: 0,
stagings: [],
Expand Down Expand Up @@ -1868,8 +1869,6 @@ function init(source, video, options) {
document.head.appendChild($style);
}

this._.inited = true;

resize.call(this);

return this;
Expand All @@ -1888,9 +1887,6 @@ function hide() {
function destroy() {
var this$1 = this;

if (!this._ || !this._.inited) {
return this;
}
pause.call(this);
clear.call(this);
unbindEvents.call(this, this._.listener);
Expand Down Expand Up @@ -1929,7 +1925,7 @@ function setter(r) {
}

var ASS = function ASS(source, video, options) {
if ((this._ && this._.inited) || !video || video.nodeName !== 'VIDEO') {
if (typeof source !== 'string' || !video || video.nodeName !== 'VIDEO') {
return this;
}
return init.call(this, source, video, options);
Expand Down
2 changes: 1 addition & 1 deletion dist/ass.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "assjs",
"version": "0.0.0",
"version": "0.0.1",
"description": "A JavaScript ASS subtitle format renderer",
"main": "dist/ass.js",
"module": "dist/ass.esm.js",
Expand Down

0 comments on commit 564dea8

Please sign in to comment.