@besovideo/webrtc-player 0.10.29 → 0.10.30

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.
@@ -353,7 +353,6 @@
353
353
  .bvplayer-modal_title-bar {
354
354
  display: flex;
355
355
  justify-content: space-between;
356
- margin-bottom: 8px;
357
356
  font-size: 16px;
358
357
  }
359
358
  .bvplayer-modal_title-bar_close {
@@ -361,7 +360,6 @@
361
360
  pointer-events: auto;
362
361
  }
363
362
  .bvplayer-modal_body {
364
- padding: 8px;
365
363
  overflow: hidden;
366
364
  overflow-y: auto;
367
365
  }
@@ -899,8 +897,8 @@
899
897
  position: absolute;
900
898
  }
901
899
  .bvplayer-player .bvplayer-modal {
902
- min-width: 120px;
903
- min-height: 100px;
900
+ max-width: calc(100% - 40px);
901
+ max-height: calc(100% - 40px);
904
902
  }
905
903
  .bvplayer-player-fit--contain .bvplayer-video_screen {
906
904
  -o-object-fit: contain;
@@ -924,12 +922,11 @@
924
922
  }
925
923
  .bvplayer-player_info-modal_content {
926
924
  width: 280px;
927
- min-height: 180px;
928
925
  display: flex;
929
926
  flex-direction: column;
930
927
  }
931
928
  .bvplayer-player_info-modal_section:not(:last-child) {
932
- margin-bottom: 16px;
929
+ margin-bottom: 0px;
933
930
  }
934
931
  .bvplayer-player_info-modal_section_title {
935
932
  display: inline-block;
@@ -955,7 +952,7 @@
955
952
  white-space: nowrap;
956
953
  }
957
954
  .bvplayer-player_info-modal_list_item:not(:last-child) {
958
- margin-bottom: 8px;
955
+ margin-bottom: 2px;
959
956
  }
960
957
  .bvplayer-player_info-modal_list_item_label {
961
958
  display: inline-block;
@@ -1203,6 +1200,19 @@
1203
1200
  line-height: 30px;
1204
1201
  padding-left: 10px;
1205
1202
  }
1203
+ .videoCall_dialogPanel .switchType {
1204
+ border: 1px solid #c4c4c4;
1205
+ border-radius: 4px;
1206
+ cursor: pointer;
1207
+ padding: 1px;
1208
+ position: absolute;
1209
+ right: 180px;
1210
+ top: 2px;
1211
+ color: #8d8d8d;
1212
+ }
1213
+ .videoCall_dialogPanel .switchType:hover {
1214
+ color: #636363;
1215
+ }
1206
1216
  .videoCall_dialogPanel .remoteView {
1207
1217
  display: inline-block;
1208
1218
  vertical-align: top;
@@ -124,7 +124,7 @@ var bvPlayerCore = (() => {
124
124
  var define_processenv_default;
125
125
  var init_define_processenv = __esm({
126
126
  "<define:processenv>"() {
127
- define_processenv_default = { NODE_ENV: "production", SH_LIB_NAME: "@besovideo/webrtc-player", SH_LIB_VERSION: "0.10.29", PROJECT_NAMESPACE: "bvplayer" };
127
+ define_processenv_default = { NODE_ENV: "production", SH_LIB_NAME: "@besovideo/webrtc-player", SH_LIB_VERSION: "0.10.30", PROJECT_NAMESPACE: "bvplayer" };
128
128
  }
129
129
  });
130
130
 
@@ -22010,7 +22010,7 @@ padding: 2px 5px;
22010
22010
  logger_default.api("device media bvrtc open dialog: ", { params, resData });
22011
22011
  if (!resData || resData.code !== 0 || !((_a = resData.data) == null ? void 0 : _a.dialogid)) {
22012
22012
  if (resData.code == 7) {
22013
- throw new OpenDialogError(`${t("hui-fang-wen-jian-bu-cun-zai")}`);
22013
+ throw new OpenDialogError(`${t("X_CODE_7")}`);
22014
22014
  }
22015
22015
  throw new OpenDialogError(
22016
22016
  `${t("da-kai-chuan-shu-tong-dao-shi-bai")}: ${resData.msg}`
@@ -29705,7 +29705,7 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
29705
29705
  value: audio.codec.clockRate + "Hz@" + audio.rtp.sampleRates
29706
29706
  },
29707
29707
  ...Number.isNaN(audio.rtp.bitRate) ? [] : [{
29708
- label: t("data-received") + audio.rtp.bitRate,
29708
+ label: t("data-received"),
29709
29709
  value: audio.rtp.bitRate.toFixed(0) + " kbps, loss" + audio.rtp.packageLostTotal
29710
29710
  }],
29711
29711
  ...Number.isNaN(audio.rtp.avaragePackageLostRate) ? [] : [
@@ -29729,7 +29729,7 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
29729
29729
  value: `${video.codec.width}x${video.codec.height}@${video.rtp.sampleRates.toFixed(0)}fps`
29730
29730
  },
29731
29731
  ...Number.isNaN(video.rtp.bitRate) ? [] : [{
29732
- label: t("data-received") + video.rtp.bitRate,
29732
+ label: t("data-received"),
29733
29733
  value: String(video.rtp.bitRate.toFixed(0)) + " kbps, loss" + video.rtp.packageLostTotal
29734
29734
  }],
29735
29735
  ...Number.isNaN(video.rtp.avaragePackageLostRate) ? [] : [
@@ -35413,7 +35413,16 @@ a=fmtp:${pt} x-google-start-bitrate=${bitrate}`
35413
35413
  }
35414
35414
  let remoteUserTitle = core_default.dom.create("div", "remoteUserTitle");
35415
35415
  let localUserTitle = core_default.dom.create("div", "localUserTitle");
35416
- const dialog = core_default.dom.createByJsx(/* @__PURE__ */ jsx_default.h(jsx_default.Fragment, null, /* @__PURE__ */ jsx_default.h("div", { className: `${clsName}_dialogPanel` }, /* @__PURE__ */ jsx_default.h("div", { className: "titleBar" }, titleBar, closeBtn), statusSpan, mainStatusSpan, /* @__PURE__ */ jsx_default.h("div", { className: `full-view` }, myVideo), /* @__PURE__ */ jsx_default.h("div", { className: `mini-view` }, remoteVideo, remoteUserTitle), /* @__PURE__ */ jsx_default.h("div", { className: "localUserDiv" }, localUserTitle))));
35416
+ const toggleViewType = () => {
35417
+ if (myVideo.parentElement && myVideo.parentElement.className.includes("mini-view")) {
35418
+ SetViewType("localFull", true);
35419
+ } else {
35420
+ SetViewType("remoteFull", true);
35421
+ }
35422
+ };
35423
+ const dialog = core_default.dom.createByJsx(/* @__PURE__ */ jsx_default.h(jsx_default.Fragment, null, /* @__PURE__ */ jsx_default.h("div", { className: `${clsName}_dialogPanel` }, /* @__PURE__ */ jsx_default.h("div", { className: "titleBar" }, titleBar, closeBtn), statusSpan, mainStatusSpan, /* @__PURE__ */ jsx_default.h("div", { className: `full-view` }, myVideo), /* @__PURE__ */ jsx_default.h("div", { className: `mini-view` }, remoteVideo, remoteUserTitle), /* @__PURE__ */ jsx_default.h("div", { className: "localUserDiv", style: "position: relative;" }, localUserTitle, /* @__PURE__ */ jsx_default.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", class: "switchType", onclick: () => {
35424
+ toggleViewType();
35425
+ } }, /* @__PURE__ */ jsx_default.h("path", { d: "M0 0h24v24H0z", fill: "none" }), /* @__PURE__ */ jsx_default.h("path", { fill: "currentColor", d: "M14.293 2.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.414-1.414L16.586 8H5a1 1 0 0 1 0-2h11.586l-2.293-2.293a1 1 0 0 1 0-1.414m-4.586 10a1 1 0 0 1 0 1.414L7.414 16H19a1 1 0 1 1 0 2H7.414l2.293 2.293a1 1 0 0 1-1.414 1.414l-4-4a1 1 0 0 1 0-1.414l4-4a1 1 0 0 1 1.414 0" }))))));
35417
35426
  core_default.dom.append(callContainer, dialog);
35418
35427
  const titleBarCancelMove = EnableMoveEle(titleBar.parentElement, callContainer);
35419
35428
  if (!beCall) {
@@ -35438,13 +35447,15 @@ a=fmtp:${pt} x-google-start-bitrate=${bitrate}`
35438
35447
  }
35439
35448
  const gUserInfo = {
35440
35449
  localName: "",
35450
+ localId: "",
35441
35451
  remoteName: "",
35452
+ remoteId: "",
35442
35453
  localResolution: "",
35443
35454
  remoteResolution: ""
35444
35455
  };
35445
35456
  function updateUserTitle() {
35446
- const localTitle = gUserInfo.localName + ` ${gUserInfo.localResolution}`;
35447
- const remoteTitle = gUserInfo.remoteName + ` ${gUserInfo.remoteResolution}`;
35457
+ const localTitle = gUserInfo.localName + ` (${gUserInfo.localId})`;
35458
+ const remoteTitle = gUserInfo.remoteName + ` (${gUserInfo.remoteId})`;
35448
35459
  if (localUserTitle.innerText != localTitle) {
35449
35460
  localUserTitle.innerText = localTitle;
35450
35461
  }
@@ -35454,7 +35465,9 @@ a=fmtp:${pt} x-google-start-bitrate=${bitrate}`
35454
35465
  }
35455
35466
  function setUserInfo(userInfo) {
35456
35467
  gUserInfo.localName = userInfo.localName;
35468
+ gUserInfo.localId = userInfo.localId;
35457
35469
  gUserInfo.remoteName = userInfo.remoteName;
35470
+ gUserInfo.remoteId = userInfo.remoteId;
35458
35471
  updateUserTitle();
35459
35472
  }
35460
35473
  function setTitie(title) {
@@ -35765,11 +35778,13 @@ a=fmtp:${pt} x-google-start-bitrate=${bitrate}`
35765
35778
  try {
35766
35779
  const useInfo = yield user_default.info(createParams.token);
35767
35780
  dialogPanelHandle.setUserInfo({
35781
+ localId: useInfo.data.id,
35768
35782
  localName: useInfo.data.name,
35783
+ remoteId: openParams.user || "",
35769
35784
  remoteName: openParams.name
35770
35785
  });
35771
35786
  processHandle.setRc("PUSH_LOCAL_MEDIA_ERROR", t("tui-song-ben-di-mei-ti-shi-bai"));
35772
- dialogPanelHandle.SetViewType("localFull");
35787
+ dialogPanelHandle.SetViewType("remoteFull", true);
35773
35788
  let currentSecond = Date.now();
35774
35789
  const intervalHandle = () => {
35775
35790
  const pastSeconds = Math.floor((Date.now() - currentSecond) / 1e3);
package/dist/main.es.css CHANGED
@@ -353,7 +353,6 @@
353
353
  .bvplayer-modal_title-bar {
354
354
  display: flex;
355
355
  justify-content: space-between;
356
- margin-bottom: 8px;
357
356
  font-size: 16px;
358
357
  }
359
358
  .bvplayer-modal_title-bar_close {
@@ -361,7 +360,6 @@
361
360
  pointer-events: auto;
362
361
  }
363
362
  .bvplayer-modal_body {
364
- padding: 8px;
365
363
  overflow: hidden;
366
364
  overflow-y: auto;
367
365
  }
@@ -899,8 +897,8 @@
899
897
  position: absolute;
900
898
  }
901
899
  .bvplayer-player .bvplayer-modal {
902
- min-width: 120px;
903
- min-height: 100px;
900
+ max-width: calc(100% - 40px);
901
+ max-height: calc(100% - 40px);
904
902
  }
905
903
  .bvplayer-player-fit--contain .bvplayer-video_screen {
906
904
  -o-object-fit: contain;
@@ -924,12 +922,11 @@
924
922
  }
925
923
  .bvplayer-player_info-modal_content {
926
924
  width: 280px;
927
- min-height: 180px;
928
925
  display: flex;
929
926
  flex-direction: column;
930
927
  }
931
928
  .bvplayer-player_info-modal_section:not(:last-child) {
932
- margin-bottom: 16px;
929
+ margin-bottom: 0px;
933
930
  }
934
931
  .bvplayer-player_info-modal_section_title {
935
932
  display: inline-block;
@@ -955,7 +952,7 @@
955
952
  white-space: nowrap;
956
953
  }
957
954
  .bvplayer-player_info-modal_list_item:not(:last-child) {
958
- margin-bottom: 8px;
955
+ margin-bottom: 2px;
959
956
  }
960
957
  .bvplayer-player_info-modal_list_item_label {
961
958
  display: inline-block;
@@ -1203,6 +1200,19 @@
1203
1200
  line-height: 30px;
1204
1201
  padding-left: 10px;
1205
1202
  }
1203
+ .videoCall_dialogPanel .switchType {
1204
+ border: 1px solid #c4c4c4;
1205
+ border-radius: 4px;
1206
+ cursor: pointer;
1207
+ padding: 1px;
1208
+ position: absolute;
1209
+ right: 180px;
1210
+ top: 2px;
1211
+ color: #8d8d8d;
1212
+ }
1213
+ .videoCall_dialogPanel .switchType:hover {
1214
+ color: #636363;
1215
+ }
1206
1216
  .videoCall_dialogPanel .remoteView {
1207
1217
  display: inline-block;
1208
1218
  vertical-align: top;
package/dist/main.es.js CHANGED
@@ -118,7 +118,7 @@ var __async = (__this, __arguments, generator) => {
118
118
  var define_processenv_default;
119
119
  var init_define_processenv = __esm({
120
120
  "<define:processenv>"() {
121
- define_processenv_default = { NODE_ENV: "production", SH_LIB_NAME: "@besovideo/webrtc-player", SH_LIB_VERSION: "0.10.29", PROJECT_NAMESPACE: "bvplayer" };
121
+ define_processenv_default = { NODE_ENV: "production", SH_LIB_NAME: "@besovideo/webrtc-player", SH_LIB_VERSION: "0.10.30", PROJECT_NAMESPACE: "bvplayer" };
122
122
  }
123
123
  });
124
124
 
@@ -21992,7 +21992,7 @@ var getPlaybackBvrtc = (param, token, signal) => __async(void 0, null, function*
21992
21992
  logger_default.api("device media bvrtc open dialog: ", { params, resData });
21993
21993
  if (!resData || resData.code !== 0 || !((_a = resData.data) == null ? void 0 : _a.dialogid)) {
21994
21994
  if (resData.code == 7) {
21995
- throw new OpenDialogError(`${t("hui-fang-wen-jian-bu-cun-zai")}`);
21995
+ throw new OpenDialogError(`${t("X_CODE_7")}`);
21996
21996
  }
21997
21997
  throw new OpenDialogError(
21998
21998
  `${t("da-kai-chuan-shu-tong-dao-shi-bai")}: ${resData.msg}`
@@ -29687,7 +29687,7 @@ var PlayerPlugin = class extends Plugin {
29687
29687
  value: audio.codec.clockRate + "Hz@" + audio.rtp.sampleRates
29688
29688
  },
29689
29689
  ...Number.isNaN(audio.rtp.bitRate) ? [] : [{
29690
- label: t("data-received") + audio.rtp.bitRate,
29690
+ label: t("data-received"),
29691
29691
  value: audio.rtp.bitRate.toFixed(0) + " kbps, loss" + audio.rtp.packageLostTotal
29692
29692
  }],
29693
29693
  ...Number.isNaN(audio.rtp.avaragePackageLostRate) ? [] : [
@@ -29711,7 +29711,7 @@ var PlayerPlugin = class extends Plugin {
29711
29711
  value: `${video.codec.width}x${video.codec.height}@${video.rtp.sampleRates.toFixed(0)}fps`
29712
29712
  },
29713
29713
  ...Number.isNaN(video.rtp.bitRate) ? [] : [{
29714
- label: t("data-received") + video.rtp.bitRate,
29714
+ label: t("data-received"),
29715
29715
  value: String(video.rtp.bitRate.toFixed(0)) + " kbps, loss" + video.rtp.packageLostTotal
29716
29716
  }],
29717
29717
  ...Number.isNaN(video.rtp.avaragePackageLostRate) ? [] : [
@@ -35395,7 +35395,16 @@ function CreateDialogPanel(container, events, beCall) {
35395
35395
  }
35396
35396
  let remoteUserTitle = core_default.dom.create("div", "remoteUserTitle");
35397
35397
  let localUserTitle = core_default.dom.create("div", "localUserTitle");
35398
- const dialog = core_default.dom.createByJsx(/* @__PURE__ */ jsx_default.h(jsx_default.Fragment, null, /* @__PURE__ */ jsx_default.h("div", { className: `${clsName}_dialogPanel` }, /* @__PURE__ */ jsx_default.h("div", { className: "titleBar" }, titleBar, closeBtn), statusSpan, mainStatusSpan, /* @__PURE__ */ jsx_default.h("div", { className: `full-view` }, myVideo), /* @__PURE__ */ jsx_default.h("div", { className: `mini-view` }, remoteVideo, remoteUserTitle), /* @__PURE__ */ jsx_default.h("div", { className: "localUserDiv" }, localUserTitle))));
35398
+ const toggleViewType = () => {
35399
+ if (myVideo.parentElement && myVideo.parentElement.className.includes("mini-view")) {
35400
+ SetViewType("localFull", true);
35401
+ } else {
35402
+ SetViewType("remoteFull", true);
35403
+ }
35404
+ };
35405
+ const dialog = core_default.dom.createByJsx(/* @__PURE__ */ jsx_default.h(jsx_default.Fragment, null, /* @__PURE__ */ jsx_default.h("div", { className: `${clsName}_dialogPanel` }, /* @__PURE__ */ jsx_default.h("div", { className: "titleBar" }, titleBar, closeBtn), statusSpan, mainStatusSpan, /* @__PURE__ */ jsx_default.h("div", { className: `full-view` }, myVideo), /* @__PURE__ */ jsx_default.h("div", { className: `mini-view` }, remoteVideo, remoteUserTitle), /* @__PURE__ */ jsx_default.h("div", { className: "localUserDiv", style: "position: relative;" }, localUserTitle, /* @__PURE__ */ jsx_default.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", class: "switchType", onclick: () => {
35406
+ toggleViewType();
35407
+ } }, /* @__PURE__ */ jsx_default.h("path", { d: "M0 0h24v24H0z", fill: "none" }), /* @__PURE__ */ jsx_default.h("path", { fill: "currentColor", d: "M14.293 2.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.414-1.414L16.586 8H5a1 1 0 0 1 0-2h11.586l-2.293-2.293a1 1 0 0 1 0-1.414m-4.586 10a1 1 0 0 1 0 1.414L7.414 16H19a1 1 0 1 1 0 2H7.414l2.293 2.293a1 1 0 0 1-1.414 1.414l-4-4a1 1 0 0 1 0-1.414l4-4a1 1 0 0 1 1.414 0" }))))));
35399
35408
  core_default.dom.append(callContainer, dialog);
35400
35409
  const titleBarCancelMove = EnableMoveEle(titleBar.parentElement, callContainer);
35401
35410
  if (!beCall) {
@@ -35420,13 +35429,15 @@ function CreateDialogPanel(container, events, beCall) {
35420
35429
  }
35421
35430
  const gUserInfo = {
35422
35431
  localName: "",
35432
+ localId: "",
35423
35433
  remoteName: "",
35434
+ remoteId: "",
35424
35435
  localResolution: "",
35425
35436
  remoteResolution: ""
35426
35437
  };
35427
35438
  function updateUserTitle() {
35428
- const localTitle = gUserInfo.localName + ` ${gUserInfo.localResolution}`;
35429
- const remoteTitle = gUserInfo.remoteName + ` ${gUserInfo.remoteResolution}`;
35439
+ const localTitle = gUserInfo.localName + ` (${gUserInfo.localId})`;
35440
+ const remoteTitle = gUserInfo.remoteName + ` (${gUserInfo.remoteId})`;
35430
35441
  if (localUserTitle.innerText != localTitle) {
35431
35442
  localUserTitle.innerText = localTitle;
35432
35443
  }
@@ -35436,7 +35447,9 @@ function CreateDialogPanel(container, events, beCall) {
35436
35447
  }
35437
35448
  function setUserInfo(userInfo) {
35438
35449
  gUserInfo.localName = userInfo.localName;
35450
+ gUserInfo.localId = userInfo.localId;
35439
35451
  gUserInfo.remoteName = userInfo.remoteName;
35452
+ gUserInfo.remoteId = userInfo.remoteId;
35440
35453
  updateUserTitle();
35441
35454
  }
35442
35455
  function setTitie(title) {
@@ -35747,11 +35760,13 @@ function CreateCallEndPoint(createParams) {
35747
35760
  try {
35748
35761
  const useInfo = yield user_default.info(createParams.token);
35749
35762
  dialogPanelHandle.setUserInfo({
35763
+ localId: useInfo.data.id,
35750
35764
  localName: useInfo.data.name,
35765
+ remoteId: openParams.user || "",
35751
35766
  remoteName: openParams.name
35752
35767
  });
35753
35768
  processHandle.setRc("PUSH_LOCAL_MEDIA_ERROR", t("tui-song-ben-di-mei-ti-shi-bai"));
35754
- dialogPanelHandle.SetViewType("localFull");
35769
+ dialogPanelHandle.SetViewType("remoteFull", true);
35755
35770
  let currentSecond = Date.now();
35756
35771
  const intervalHandle = () => {
35757
35772
  const pastSeconds = Math.floor((Date.now() - currentSecond) / 1e3);
@@ -4,6 +4,7 @@ declare const userApi: {
4
4
  code: number;
5
5
  data: {
6
6
  name: string;
7
+ id: string;
7
8
  };
8
9
  }>;
9
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@besovideo/webrtc-player",
3
- "version": "0.10.29",
3
+ "version": "0.10.30",
4
4
  "description": "@besovideo/webrtc-player desc",
5
5
  "type": "module",
6
6
  "types": "./dist/types/main.d.ts",