@epiclabs/epic-video-player
Version:
Video player wrapper to support different video sources with an unified interface
41 lines (40 loc) • 1.47 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PlayerNative = void 0;
var tslib_1 = require("tslib");
var player_1 = require("./player");
var PlayerNative = /** @class */ (function (_super) {
tslib_1.__extends(PlayerNative, _super);
function PlayerNative(url, htmlPlayer, config) {
return _super.call(this, url, htmlPlayer, config) || this;
}
PlayerNative.prototype.load = function () {
this.reset();
this.player = this.htmlPlayer;
this.htmlPlayer.src = this.url;
this.playerType = 'NATIVE';
this.initListeners();
};
PlayerNative.prototype.destroy = function () {
this.htmlPlayer.pause();
this.htmlPlayer.removeAttribute('src');
this.htmlPlayer.load();
this.playerType = undefined;
this.reset();
};
PlayerNative.prototype.getRenditions = function () {
// no renditions information is provided by native browser player
return [];
};
PlayerNative.prototype.setRendition = function (rendition, // eslint-disable-line
immediately) {
// no renditions capabilities are provided by native browser player
return;
};
PlayerNative.prototype.getCurrentRendition = function () {
// no renditions capabilities are provided by native browser player
return undefined;
};
return PlayerNative;
}(player_1.Player));
exports.PlayerNative = PlayerNative;