@flexem/fc-gui 3.0.0-alpha.179 → 3.0.0-alpha.180

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41752,6 +41752,13 @@ class video_element_VideoElement extends conditional_display_element_Conditional
41752
41752
  });
41753
41753
  }
41754
41754
  initVideo(videoUrl, videoId) {
41755
+ // FLEXCLOUD-4155: 诊断日志,排查"长时间放置后卡死"问题,记录每次重建播放器的时间点
41756
+ console.log(`[FLEXCLOUD-4155] initVideo called at ${new Date().toISOString()}, videoId=${videoId}, videoUrl=${videoUrl}`);
41757
+ // FLEXCLOUD-4155: 强制清理旧的 video 元素,避免残留元素的错误蒙层
41758
+ const oldVideoElement = document.getElementById(videoId);
41759
+ if (oldVideoElement) {
41760
+ oldVideoElement.remove();
41761
+ }
41755
41762
  const patt = /https:.+.m3u8/;
41756
41763
  if (videoUrl.indexOf('http:') !== -1) {
41757
41764
  videoUrl = videoUrl.replace('http:', 'https:');
@@ -41815,10 +41822,17 @@ class video_element_VideoElement extends conditional_display_element_Conditional
41815
41822
  this.videoPlayer.play();
41816
41823
  });
41817
41824
  }
41818
- this.startTimeUpdateWatchdog(videoId);
41819
41825
  }
41820
41826
  catch (err) {
41821
- console.log(err);
41827
+ // FLEXCLOUD-4155: EZUIPlayer 内部对 opt.width 做 .replace 时可能因类型不是字符串而抛错,
41828
+ // 但此时 hls.js/video 实际播放不受影响,不应因此中断 watchdog 的启动
41829
+ console.error(`[FLEXCLOUD-4155] initVideo setTimeout callback error at ${new Date().toISOString()}, videoId=${videoId}:`, err);
41830
+ }
41831
+ finally {
41832
+ // FLEXCLOUD-4155: 无论 EZUIPlayer 初始化是否抛错,watchdog 都必须启动,
41833
+ // 否则后续真正的播放卡死(currentTime 停止推进)将无法被检测和自愈
41834
+ this.startTimeUpdateWatchdog(videoId);
41835
+ console.log(`[FLEXCLOUD-4155] watchdog started at ${new Date().toISOString()}, videoId=${videoId}`);
41822
41836
  }
41823
41837
  }, 1000);
41824
41838
  const style = document.createElement('style');
@@ -41903,6 +41917,8 @@ class video_element_VideoElement extends conditional_display_element_Conditional
41903
41917
  }
41904
41918
  initVisibilityHandler() {
41905
41919
  this.visibilityChangeHandler = () => {
41920
+ // FLEXCLOUD-4155: 诊断日志,记录每次 visibilitychange 触发时的状态
41921
+ console.log(`[FLEXCLOUD-4155] visibilitychange fired at ${new Date().toISOString()}, hidden=${document.hidden}, videoId=${this.videoId}`);
41906
41922
  if (!document.hidden && this.videoUrl && this.videoId) {
41907
41923
  this.initVideo(this.videoUrl, this.videoId);
41908
41924
  }
@@ -41919,15 +41935,19 @@ class video_element_VideoElement extends conditional_display_element_Conditional
41919
41935
  });
41920
41936
  }
41921
41937
  this.timeUpdateWatchdog = setInterval(() => {
41938
+ const idleMs = Date.now() - this.lastTimeUpdate;
41922
41939
  if (document.hidden)
41923
41940
  return;
41924
- if (Date.now() - this.lastTimeUpdate > 30000) {
41941
+ if (idleMs > 30000) {
41942
+ console.warn(`[FLEXCLOUD-4155] watchdog detected stall (idleMs=${idleMs}), triggering initVideo at ${new Date().toISOString()}, videoId=${videoId}`);
41925
41943
  this.initVideo(this.videoUrl, this.videoId);
41926
41944
  }
41927
41945
  }, 30000);
41928
41946
  }
41929
41947
  clearTimeUpdateWatchdog() {
41930
41948
  if (this.timeUpdateWatchdog) {
41949
+ // FLEXCLOUD-4155: 诊断日志,记录 watchdog 何时被清除,排查是否有清除后未重建的空窗期
41950
+ console.log(`[FLEXCLOUD-4155] watchdog cleared at ${new Date().toISOString()}`);
41931
41951
  clearInterval(this.timeUpdateWatchdog);
41932
41952
  this.timeUpdateWatchdog = null;
41933
41953
  }
@@ -44993,11 +45013,6 @@ let WriteValueModalComponent = class WriteValueModalComponent {
44993
45013
  get invalidErrorText() {
44994
45014
  return this.localization.loadFailed;
44995
45015
  }
44996
- get isEnglish() {
44997
- var _a, _b, _c, _d, _e;
44998
- const language = ((_c = (_b = (_a = window.abp) === null || _a === void 0 ? void 0 : _a.localization) === null || _b === void 0 ? void 0 : _b.currentLanguage) === null || _c === void 0 ? void 0 : _c.name) || ((_e = (_d = this.localization.localizationService) === null || _d === void 0 ? void 0 : _d.translate) === null || _e === void 0 ? void 0 : _e.currentLang);
44999
- return !!language && !language.toLowerCase().startsWith('zh');
45000
- }
45001
45016
  ngOnInit() {
45002
45017
  this.initData(this.args);
45003
45018
  this.validate();
@@ -45232,7 +45247,7 @@ __decorate([
45232
45247
  WriteValueModalComponent = __decorate([
45233
45248
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
45234
45249
  selector: 'writeValueModal',
45235
- template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}{{isEnglish ? ' ' : ''}}</span> <span>{{displayVariableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">&times;</span> </button> </div> <div class=\"modal-body\"> <span class=\"write-value-range\">{{localization.writeValueRange}}:</span> <span> {{writeValueRangeText}} <span *ngIf=\"valueType\">({{valueType}})</span> </span> <input type=\"text\" name=\"valueInput\" autoFocus [class.form-control-write]=\"!isMobileMode\" class=\"form-control write-value\" [(ngModel)]=\"value\" (keyup)=\"validate($event)\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\" [class.modal-footer-write]=\"!isMobileMode\"> <button type=\"submit\" [class.btn-primary-write]=\"!isMobileMode\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError || isSubmitting\"> <ng-container *ngIf=\"!isSubmitting\">{{localization.submit}}</ng-container> <ng-container *ngIf=\"isSubmitting\">{{localization.submitting}}</ng-container> </button> </div> </form> ",
45250
+ template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{displayVariableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">&times;</span> </button> </div> <div class=\"modal-body\"> <span class=\"write-value-range\">{{localization.writeValueRange}}:</span> <span> {{writeValueRangeText}} <span *ngIf=\"valueType\">({{valueType}})</span> </span> <input type=\"text\" name=\"valueInput\" autoFocus [class.form-control-write]=\"!isMobileMode\" class=\"form-control write-value\" [(ngModel)]=\"value\" (keyup)=\"validate($event)\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\" [class.modal-footer-write]=\"!isMobileMode\"> <button type=\"submit\" [class.btn-primary-write]=\"!isMobileMode\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError || isSubmitting\"> <ng-container *ngIf=\"!isSubmitting\">{{localization.submit}}</ng-container> <ng-container *ngIf=\"isSubmitting\">{{localization.submitting}}</ng-container> </button> </div> </form> ",
45236
45251
  styles: [".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; padding-top: 10px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .form-control-write { margin: 0 20px; width: 585px; } .modal-footer { padding: 10px 5px 20px 5px !important; text-align: right; border-color: transparent; } .modal-footer-write { margin-right: 4px; padding: 10px 5px 20px 5px !important; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 5px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .btn-primary-write { width: 585px; margin: 0 15px 0 0; } .write-value-range { color: #7f939e; font-size: 14px; margin-left: 15px; } .write-value { padding-left: 8px; margin-left: 16px; height: 32px; } "]
45237
45252
  }),
45238
45253
  __param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_1__[/* LOCALIZATION */ "b"]))
@@ -45276,11 +45291,6 @@ let WriteCharacterModalComponent = class WriteCharacterModalComponent {
45276
45291
  get invalidErrorText() {
45277
45292
  return this.localization.loadFailed;
45278
45293
  }
45279
- get isEnglish() {
45280
- var _a, _b, _c, _d, _e;
45281
- const language = ((_c = (_b = (_a = window.abp) === null || _a === void 0 ? void 0 : _a.localization) === null || _b === void 0 ? void 0 : _b.currentLanguage) === null || _c === void 0 ? void 0 : _c.name) || ((_e = (_d = this.localization.localizationService) === null || _d === void 0 ? void 0 : _d.translate) === null || _e === void 0 ? void 0 : _e.currentLang);
45282
- return !!language && !language.toLowerCase().startsWith('zh');
45283
- }
45284
45294
  ngOnInit() {
45285
45295
  this.variableName = this.args.variableName;
45286
45296
  this.isPassword = this.args.isPassword ? this.args.isPassword : false;
@@ -45320,7 +45330,7 @@ __decorate([
45320
45330
  WriteCharacterModalComponent = __decorate([
45321
45331
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
45322
45332
  selector: 'writeCharacterModal',
45323
- template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}{{isEnglish ? ' ' : ''}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">&times;</span> </button> </div> <div class=\"modal-body\"> <input type=\"text\" name=\"characterInput\" autoFocus [class.form-control-write]=\"!isMobileMode\" class=\"form-control write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"!isPassword\" autocomplete=\"off\"> <input type=\"password\" name=\"passwordInput\" autoFocus [class.form-control-write]=\"!isMobileMode\" class=\"form-control write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"isPassword\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\" [class.modal-footer-write]=\"!isMobileMode\"> <button type=\"submit\" [class.btn-primary-write]=\"!isMobileMode\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError\">{{localization.submit}}</button> </div> </form> ",
45333
+ template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">&times;</span> </button> </div> <div class=\"modal-body\"> <input type=\"text\" name=\"characterInput\" autoFocus [class.form-control-write]=\"!isMobileMode\" class=\"form-control write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"!isPassword\" autocomplete=\"off\"> <input type=\"password\" name=\"passwordInput\" autoFocus [class.form-control-write]=\"!isMobileMode\" class=\"form-control write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"isPassword\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\" [class.modal-footer-write]=\"!isMobileMode\"> <button type=\"submit\" [class.btn-primary-write]=\"!isMobileMode\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError\">{{localization.submit}}</button> </div> </form> ",
45324
45334
  styles: [".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .modal-footer { padding: 10px 4px 20px 5px !important; text-align: right; border-color: transparent; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 10px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .write-character-value { padding-left: 8px; height: 32px; margin-left: 16px; } .modal-footer-write { margin-right: 4px; padding: 10px 5px 20px 5px !important; } .btn-primary-write { width: 585px; margin: 0 15px 0 0; } .form-control-write { margin: 0 16px; width: 585px; } "]
45325
45335
  }),
45326
45336
  __param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_2__[/* LOCALIZATION */ "b"]))