Apply compiled js file for commit 6e88dead8e

This commit is contained in:
Hadi Nategh 2021-09-09 16:38:32 +02:00
parent 9dfa960bf6
commit d6dde9e59b

View File

@ -71,6 +71,7 @@ var et2_video = /** @class */ (function (_super) {
*/ */
_this._previousTime = 0; _this._previousTime = 0;
_this.set_src_type(_this.options.src_type); _this.set_src_type(_this.options.src_type);
_this.options.starttime = isNaN(_this.options.starttime) ? 0 : _this.options.starttime;
return _this; return _this;
} }
et2_video.prototype.set_src_type = function (_type) { et2_video.prototype.set_src_type = function (_type) {
@ -170,7 +171,7 @@ var et2_video = /** @class */ (function (_super) {
et2_video.prototype.set_volume = function (_value) { et2_video.prototype.set_volume = function (_value) {
var value = _value > 100 ? 100 : _value; var value = _value > 100 ? 100 : _value;
if (value >= 0) { if (value >= 0) {
if (this._isYoutube() && this.youtube) { if (this._isYoutube() && this.youtube && typeof this.youtube.setVolume === 'function') {
this.youtube.setVolume(value); this.youtube.setVolume(value);
} }
else if (!this._isYoutube()) { else if (!this._isYoutube()) {
@ -390,7 +391,7 @@ var et2_video = /** @class */ (function (_super) {
return false; return false;
}; };
et2_video.prototype.videoLoadnigIsFinished = function () { et2_video.prototype.videoLoadnigIsFinished = function () {
if (this.options.starttime) { if (this.options.starttime >= 0) {
this.seek_video(this.options.starttime); this.seek_video(this.options.starttime);
// unfortunately, youtube api autoplays the video after seekTo on initiation // unfortunately, youtube api autoplays the video after seekTo on initiation
// and there's no way to stop that therefore we need to trick it by manually // and there's no way to stop that therefore we need to trick it by manually