@besovideo/webrtc-player 0.8.47 → 0.8.48

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.
@@ -822,6 +822,7 @@
822
822
  font-size: 12px;
823
823
  margin-bottom: 8px;
824
824
  margin-left: 16px;
825
+ position: absolute;
825
826
  }
826
827
  .bvplayer-player_info-modal_section_main {
827
828
  width: 100%;
@@ -105,7 +105,7 @@ var bvPlayerCore = (() => {
105
105
  var define_processenv_default;
106
106
  var init_define_processenv = __esm({
107
107
  "<define:processenv>"() {
108
- define_processenv_default = { NODE_ENV: "production", SH_LIB_NAME: "@besovideo/webrtc-player", SH_LIB_VERSION: "0.8.46", PROJECT_NAMESPACE: "bvplayer" };
108
+ define_processenv_default = { NODE_ENV: "production", SH_LIB_NAME: "@besovideo/webrtc-player", SH_LIB_VERSION: "0.8.48", PROJECT_NAMESPACE: "bvplayer" };
109
109
  }
110
110
  });
111
111
 
@@ -15609,7 +15609,6 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
15609
15609
  constructor(options) {
15610
15610
  super(PLUGIN_NAME_PLAYER, "div");
15611
15611
  this._lastTotalReceivedBytes = 0;
15612
- this._isInClose = false;
15613
15612
  this._video = new video_default({
15614
15613
  puOptions: options == null ? void 0 : options.puOptions
15615
15614
  });
@@ -15732,7 +15731,6 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
15732
15731
  prepareWebrtc() {
15733
15732
  return __async(this, null, function* () {
15734
15733
  var _a;
15735
- this._isInClose = false;
15736
15734
  if (this._mode !== "plugin" /* PLUGIN */)
15737
15735
  return;
15738
15736
  logger_default.debug("PuPlayer Plugin prepareWebrtc");
@@ -15762,17 +15760,12 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
15762
15760
  }
15763
15761
  close() {
15764
15762
  return __async(this, null, function* () {
15765
- if (!this._isInClose) {
15766
- this._isInClose = true;
15767
- this.dispatch("close");
15768
- this.closeWebrtc();
15769
- }
15763
+ this.dispatch("close");
15764
+ this.closeWebrtc();
15770
15765
  });
15771
15766
  }
15772
15767
  beforeDestroy() {
15773
- if (!this._isInClose) {
15774
- this.close();
15775
- }
15768
+ this.close();
15776
15769
  }
15777
15770
  // 应用和加载播放器设置
15778
15771
  loadPlayerConfig() {
@@ -16011,7 +16004,21 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
16011
16004
  const AudioSection = /* @__PURE__ */ jsx.h(infoList_default, { list: result.audios, factory: audioInfoFactory });
16012
16005
  const VideoSection = /* @__PURE__ */ jsx.h(infoList_default, { list: result.videos, factory: videoInfoFactory });
16013
16006
  logger_default.debug("audioInfoList", core_default.dom.createByJsx(AudioSection));
16014
- this._infoModal.content = /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_content", withNamespace: true }, /* @__PURE__ */ jsx.h("section", { className: "player_info-modal_section", withNamespace: true }, /* @__PURE__ */ jsx.h("span", { className: "player_info-modal_section_title", withNamespace: true }, t("audio")), /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_section_main", withNamespace: true }, AudioSection)), /* @__PURE__ */ jsx.h("section", { className: "player_info-modal_section", withNamespace: true }, /* @__PURE__ */ jsx.h("span", { className: "player_info-modal_section_title", withNamespace: true }, t("video")), /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_section_main", withNamespace: true }, VideoSection)));
16007
+ const transList = [
16008
+ {
16009
+ label: `${t("type")}:`,
16010
+ value: `webrtc`
16011
+ }
16012
+ ];
16013
+ const transListSection = /* @__PURE__ */ jsx.h(infoList_default, { list: transList });
16014
+ this._infoModal.content = /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_content", withNamespace: true }, /* @__PURE__ */ jsx.h("section", { className: "player_info-modal_section", withNamespace: true }, /* @__PURE__ */ jsx.h(
16015
+ "span",
16016
+ {
16017
+ className: "player_info-modal_section_title",
16018
+ withNamespace: true
16019
+ },
16020
+ t("transfer")
16021
+ ), /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_section_main", withNamespace: true }, transListSection)), /* @__PURE__ */ jsx.h("section", { className: "player_info-modal_section", withNamespace: true }, /* @__PURE__ */ jsx.h("span", { className: "player_info-modal_section_title", withNamespace: true }, t("audio")), /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_section_main", withNamespace: true }, AudioSection)), /* @__PURE__ */ jsx.h("section", { className: "player_info-modal_section", withNamespace: true }, /* @__PURE__ */ jsx.h("span", { className: "player_info-modal_section_title", withNamespace: true }, t("video")), /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_section_main", withNamespace: true }, VideoSection)));
16015
16022
  });
16016
16023
  refresh();
16017
16024
  this._infoModal.visible = true;
@@ -17108,7 +17115,9 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
17108
17115
  "lost-connection": "lost connection",
17109
17116
  "video-closed": "video closed",
17110
17117
  connecting: "connecting",
17111
- connected: "connected"
17118
+ connected: "connected",
17119
+ transfer: "transfer",
17120
+ type: "type"
17112
17121
  };
17113
17122
 
17114
17123
  // src/locales/zh.json
@@ -17143,7 +17152,9 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
17143
17152
  "lost-connection": "\u8FDE\u63A5\u65AD\u5F00",
17144
17153
  "video-closed": "\u89C6\u9891\u5DF2\u5173\u95ED",
17145
17154
  connecting: "\u8FDE\u63A5\u4E2D",
17146
- connected: "\u5DF2\u8FDE\u63A5"
17155
+ connected: "\u5DF2\u8FDE\u63A5",
17156
+ transfer: "\u4F20\u8F93",
17157
+ type: "\u65B9\u5F0F"
17147
17158
  };
17148
17159
 
17149
17160
  // src/locales/i18n.ts
@@ -18632,9 +18643,23 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
18632
18643
  value: `${hplayer.getVideoInfo().width} x ${hplayer.getVideoInfo().height}`
18633
18644
  }
18634
18645
  ];
18646
+ const transList = [
18647
+ {
18648
+ label: `${t("type")}:`,
18649
+ value: `bvrtc`
18650
+ }
18651
+ ];
18635
18652
  const AudioSection = /* @__PURE__ */ jsx.h(infoList_default, { list: audioList });
18636
18653
  const VideoSection = /* @__PURE__ */ jsx.h(infoList_default, { list: videoList });
18654
+ const transListSection = /* @__PURE__ */ jsx.h(infoList_default, { list: transList });
18637
18655
  infoModal.content = /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_content", withNamespace: true }, /* @__PURE__ */ jsx.h("section", { className: "player_info-modal_section", withNamespace: true }, /* @__PURE__ */ jsx.h(
18656
+ "span",
18657
+ {
18658
+ className: "player_info-modal_section_title",
18659
+ withNamespace: true
18660
+ },
18661
+ t("transfer")
18662
+ ), /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_section_main", withNamespace: true }, transListSection)), /* @__PURE__ */ jsx.h("section", { className: "player_info-modal_section", withNamespace: true }, /* @__PURE__ */ jsx.h(
18638
18663
  "span",
18639
18664
  {
18640
18665
  className: "player_info-modal_section_title",
package/dist/main.es.css CHANGED
@@ -822,6 +822,7 @@
822
822
  font-size: 12px;
823
823
  margin-bottom: 8px;
824
824
  margin-left: 16px;
825
+ position: absolute;
825
826
  }
826
827
  .bvplayer-player_info-modal_section_main {
827
828
  width: 100%;
package/dist/main.es.js CHANGED
@@ -99,7 +99,7 @@ var __async = (__this, __arguments, generator) => {
99
99
  var define_processenv_default;
100
100
  var init_define_processenv = __esm({
101
101
  "<define:processenv>"() {
102
- define_processenv_default = { NODE_ENV: "production", SH_LIB_NAME: "@besovideo/webrtc-player", SH_LIB_VERSION: "0.8.46", PROJECT_NAMESPACE: "bvplayer" };
102
+ define_processenv_default = { NODE_ENV: "production", SH_LIB_NAME: "@besovideo/webrtc-player", SH_LIB_VERSION: "0.8.48", PROJECT_NAMESPACE: "bvplayer" };
103
103
  }
104
104
  });
105
105
 
@@ -15595,7 +15595,6 @@ var PlayerPlugin = class extends Plugin {
15595
15595
  constructor(options) {
15596
15596
  super(PLUGIN_NAME_PLAYER, "div");
15597
15597
  this._lastTotalReceivedBytes = 0;
15598
- this._isInClose = false;
15599
15598
  this._video = new video_default({
15600
15599
  puOptions: options == null ? void 0 : options.puOptions
15601
15600
  });
@@ -15718,7 +15717,6 @@ var PlayerPlugin = class extends Plugin {
15718
15717
  prepareWebrtc() {
15719
15718
  return __async(this, null, function* () {
15720
15719
  var _a;
15721
- this._isInClose = false;
15722
15720
  if (this._mode !== "plugin" /* PLUGIN */)
15723
15721
  return;
15724
15722
  logger_default.debug("PuPlayer Plugin prepareWebrtc");
@@ -15748,17 +15746,12 @@ var PlayerPlugin = class extends Plugin {
15748
15746
  }
15749
15747
  close() {
15750
15748
  return __async(this, null, function* () {
15751
- if (!this._isInClose) {
15752
- this._isInClose = true;
15753
- this.dispatch("close");
15754
- this.closeWebrtc();
15755
- }
15749
+ this.dispatch("close");
15750
+ this.closeWebrtc();
15756
15751
  });
15757
15752
  }
15758
15753
  beforeDestroy() {
15759
- if (!this._isInClose) {
15760
- this.close();
15761
- }
15754
+ this.close();
15762
15755
  }
15763
15756
  // 应用和加载播放器设置
15764
15757
  loadPlayerConfig() {
@@ -15997,7 +15990,21 @@ var PlayerPlugin = class extends Plugin {
15997
15990
  const AudioSection = /* @__PURE__ */ jsx.h(infoList_default, { list: result.audios, factory: audioInfoFactory });
15998
15991
  const VideoSection = /* @__PURE__ */ jsx.h(infoList_default, { list: result.videos, factory: videoInfoFactory });
15999
15992
  logger_default.debug("audioInfoList", core_default.dom.createByJsx(AudioSection));
16000
- this._infoModal.content = /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_content", withNamespace: true }, /* @__PURE__ */ jsx.h("section", { className: "player_info-modal_section", withNamespace: true }, /* @__PURE__ */ jsx.h("span", { className: "player_info-modal_section_title", withNamespace: true }, t("audio")), /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_section_main", withNamespace: true }, AudioSection)), /* @__PURE__ */ jsx.h("section", { className: "player_info-modal_section", withNamespace: true }, /* @__PURE__ */ jsx.h("span", { className: "player_info-modal_section_title", withNamespace: true }, t("video")), /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_section_main", withNamespace: true }, VideoSection)));
15993
+ const transList = [
15994
+ {
15995
+ label: `${t("type")}:`,
15996
+ value: `webrtc`
15997
+ }
15998
+ ];
15999
+ const transListSection = /* @__PURE__ */ jsx.h(infoList_default, { list: transList });
16000
+ this._infoModal.content = /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_content", withNamespace: true }, /* @__PURE__ */ jsx.h("section", { className: "player_info-modal_section", withNamespace: true }, /* @__PURE__ */ jsx.h(
16001
+ "span",
16002
+ {
16003
+ className: "player_info-modal_section_title",
16004
+ withNamespace: true
16005
+ },
16006
+ t("transfer")
16007
+ ), /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_section_main", withNamespace: true }, transListSection)), /* @__PURE__ */ jsx.h("section", { className: "player_info-modal_section", withNamespace: true }, /* @__PURE__ */ jsx.h("span", { className: "player_info-modal_section_title", withNamespace: true }, t("audio")), /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_section_main", withNamespace: true }, AudioSection)), /* @__PURE__ */ jsx.h("section", { className: "player_info-modal_section", withNamespace: true }, /* @__PURE__ */ jsx.h("span", { className: "player_info-modal_section_title", withNamespace: true }, t("video")), /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_section_main", withNamespace: true }, VideoSection)));
16001
16008
  });
16002
16009
  refresh();
16003
16010
  this._infoModal.visible = true;
@@ -17094,7 +17101,9 @@ var en_default = {
17094
17101
  "lost-connection": "lost connection",
17095
17102
  "video-closed": "video closed",
17096
17103
  connecting: "connecting",
17097
- connected: "connected"
17104
+ connected: "connected",
17105
+ transfer: "transfer",
17106
+ type: "type"
17098
17107
  };
17099
17108
 
17100
17109
  // src/locales/zh.json
@@ -17129,7 +17138,9 @@ var zh_default = {
17129
17138
  "lost-connection": "\u8FDE\u63A5\u65AD\u5F00",
17130
17139
  "video-closed": "\u89C6\u9891\u5DF2\u5173\u95ED",
17131
17140
  connecting: "\u8FDE\u63A5\u4E2D",
17132
- connected: "\u5DF2\u8FDE\u63A5"
17141
+ connected: "\u5DF2\u8FDE\u63A5",
17142
+ transfer: "\u4F20\u8F93",
17143
+ type: "\u65B9\u5F0F"
17133
17144
  };
17134
17145
 
17135
17146
  // src/locales/i18n.ts
@@ -18618,9 +18629,23 @@ var PuPlayer = (props) => {
18618
18629
  value: `${hplayer.getVideoInfo().width} x ${hplayer.getVideoInfo().height}`
18619
18630
  }
18620
18631
  ];
18632
+ const transList = [
18633
+ {
18634
+ label: `${t("type")}:`,
18635
+ value: `bvrtc`
18636
+ }
18637
+ ];
18621
18638
  const AudioSection = /* @__PURE__ */ jsx.h(infoList_default, { list: audioList });
18622
18639
  const VideoSection = /* @__PURE__ */ jsx.h(infoList_default, { list: videoList });
18640
+ const transListSection = /* @__PURE__ */ jsx.h(infoList_default, { list: transList });
18623
18641
  infoModal.content = /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_content", withNamespace: true }, /* @__PURE__ */ jsx.h("section", { className: "player_info-modal_section", withNamespace: true }, /* @__PURE__ */ jsx.h(
18642
+ "span",
18643
+ {
18644
+ className: "player_info-modal_section_title",
18645
+ withNamespace: true
18646
+ },
18647
+ t("transfer")
18648
+ ), /* @__PURE__ */ jsx.h("div", { className: "player_info-modal_section_main", withNamespace: true }, transListSection)), /* @__PURE__ */ jsx.h("section", { className: "player_info-modal_section", withNamespace: true }, /* @__PURE__ */ jsx.h(
18624
18649
  "span",
18625
18650
  {
18626
18651
  className: "player_info-modal_section_title",
@@ -83,7 +83,6 @@ declare class PlayerPlugin extends Plugin<HTMLDivElement, IPlayerPluginEventMap>
83
83
  setProductRemoteSdp(productRemoteSdp: (localDescription: RTCSessionDescription) => Promise<string | undefined>): void;
84
84
  prepareWebrtc(): Promise<void>;
85
85
  close(): Promise<void>;
86
- private _isInClose;
87
86
  protected beforeDestroy(): void;
88
87
  private loadPlayerConfig;
89
88
  private initEvents;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@besovideo/webrtc-player",
3
- "version": "0.8.47",
3
+ "version": "0.8.48",
4
4
  "description": "@besovideo/webrtc-player desc",
5
5
  "type": "module",
6
6
  "types": "./dist/types/main.d.ts",