danmuku
Version:
Display danmu (flying comments) on HTML5 video.
18 lines (16 loc) • 368 B
JavaScript
import play from '../internal/play.js';
import seek from '../internal/seek.js';
export default function(Danmuku) {
Danmuku.prototype.show = function() {
if (this.visible) {
return this;
}
this.visible = true;
if (this._hasMedia && this.media.paused) {
return this;
}
seek.call(this);
play.call(this);
return this;
};
}