Fix youtube video not being played for after initiation

This commit is contained in:
Hadi Nategh 2021-02-26 10:16:02 +01:00
parent 14dbd3d1f3
commit 925285d370
2 changed files with 3 additions and 4 deletions

View File

@ -24,6 +24,7 @@ var __extends = (this && this.__extends) || (function () {
}; };
})(); })();
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.et2_video = void 0;
/*egw:uses /*egw:uses
/vendor/bower-asset/jquery/dist/jquery.js; /vendor/bower-asset/jquery/dist/jquery.js;
et2_core_interfaces; et2_core_interfaces;
@ -335,8 +336,7 @@ var et2_video = /** @class */ (function (_super) {
et2_video.prototype._onStateChangeYoutube = function (_data) { et2_video.prototype._onStateChangeYoutube = function (_data) {
switch (_data.data) { switch (_data.data) {
case et2_video.youtube_player_states.unstarted: case et2_video.youtube_player_states.unstarted:
// do not start the video on initiation // do nothing
this.pause_video();
break; break;
case et2_video.youtube_player_states.playing: case et2_video.youtube_player_states.playing:
this._youtubeOntimeUpdateIntrv = window.setInterval(jQuery.proxy(this._onTimeUpdate, this), 100); this._youtubeOntimeUpdateIntrv = window.setInterval(jQuery.proxy(this._onTimeUpdate, this), 100);

View File

@ -480,8 +480,7 @@ export class et2_video extends et2_baseWidget implements et2_IDOMNode
switch (_data.data) switch (_data.data)
{ {
case et2_video.youtube_player_states.unstarted: case et2_video.youtube_player_states.unstarted:
// do not start the video on initiation // do nothing
this.pause_video();
break; break;
case et2_video.youtube_player_states.playing: case et2_video.youtube_player_states.playing:
this._youtubeOntimeUpdateIntrv = window.setInterval(jQuery.proxy(this._onTimeUpdate, this), 100); this._youtubeOntimeUpdateIntrv = window.setInterval(jQuery.proxy(this._onTimeUpdate, this), 100);