From 925285d37000b8763e21bdca1f41a45480499ff7 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 26 Feb 2021 10:16:02 +0100 Subject: [PATCH] Fix youtube video not being played for after initiation --- api/js/etemplate/et2_widget_video.js | 4 ++-- api/js/etemplate/et2_widget_video.ts | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/api/js/etemplate/et2_widget_video.js b/api/js/etemplate/et2_widget_video.js index 0e36799ec9..105038a0de 100644 --- a/api/js/etemplate/et2_widget_video.js +++ b/api/js/etemplate/et2_widget_video.js @@ -24,6 +24,7 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); +exports.et2_video = void 0; /*egw:uses /vendor/bower-asset/jquery/dist/jquery.js; et2_core_interfaces; @@ -335,8 +336,7 @@ var et2_video = /** @class */ (function (_super) { et2_video.prototype._onStateChangeYoutube = function (_data) { switch (_data.data) { case et2_video.youtube_player_states.unstarted: - // do not start the video on initiation - this.pause_video(); + // do nothing break; case et2_video.youtube_player_states.playing: this._youtubeOntimeUpdateIntrv = window.setInterval(jQuery.proxy(this._onTimeUpdate, this), 100); diff --git a/api/js/etemplate/et2_widget_video.ts b/api/js/etemplate/et2_widget_video.ts index dae7bb129c..fb1d960774 100644 --- a/api/js/etemplate/et2_widget_video.ts +++ b/api/js/etemplate/et2_widget_video.ts @@ -480,8 +480,7 @@ export class et2_video extends et2_baseWidget implements et2_IDOMNode switch (_data.data) { case et2_video.youtube_player_states.unstarted: - // do not start the video on initiation - this.pause_video(); + // do nothing break; case et2_video.youtube_player_states.playing: this._youtubeOntimeUpdateIntrv = window.setInterval(jQuery.proxy(this._onTimeUpdate, this), 100);