@besovideo/webrtc-player 0.8.53 → 0.8.54
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.
- package/dist/main.browser.js +16 -6
- package/dist/main.es.js +16 -6
- package/dist/types/templates/icons.d.ts +1 -0
- package/package.json +1 -1
package/dist/main.browser.js
CHANGED
|
@@ -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.
|
|
108
|
+
define_processenv_default = { NODE_ENV: "production", SH_LIB_NAME: "@besovideo/webrtc-player", SH_LIB_VERSION: "0.8.54", PROJECT_NAMESPACE: "bvplayer" };
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
|
|
@@ -11204,6 +11204,7 @@ If you want to allow non-zero first timestamps, set firstTimestampBehavior: 'per
|
|
|
11204
11204
|
var PtzControl = () => /* @__PURE__ */ jsx.h(Icon, null, /* @__PURE__ */ jsx.h(SvgElementbvPlayerCorePtzControl, null));
|
|
11205
11205
|
var MikeOn = () => /* @__PURE__ */ jsx.h(Icon, null, /* @__PURE__ */ jsx.h(SvgElementbvPlayerCoreMikeOn, null));
|
|
11206
11206
|
var MikeOff = () => /* @__PURE__ */ jsx.h(Icon, null, /* @__PURE__ */ jsx.h(SvgElementbvPlayerCoreMikeOff, null));
|
|
11207
|
+
var MikeDoing = () => /* @__PURE__ */ jsx.h(Icon, null, /* @__PURE__ */ jsx.h("span", { style: `display: inline-block; --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='18' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.67' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.33' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='6' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='0' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3C!-- 1702453639037 --%3E%3C/svg%3E"); width: 20px; height: 20px; background-color: currentcolor; mask-image: var(--svg); mask-repeat: no-repeat; mask-size: 100% 100%;` }));
|
|
11207
11208
|
var directionDeg = {
|
|
11208
11209
|
top: {
|
|
11209
11210
|
value: 0,
|
|
@@ -11271,7 +11272,8 @@ If you want to allow non-zero first timestamps, set firstTimestampBehavior: 'per
|
|
|
11271
11272
|
Direction,
|
|
11272
11273
|
Operator,
|
|
11273
11274
|
MikeOn,
|
|
11274
|
-
MikeOff
|
|
11275
|
+
MikeOff,
|
|
11276
|
+
MikeDoing
|
|
11275
11277
|
};
|
|
11276
11278
|
var icons_default = Icons;
|
|
11277
11279
|
|
|
@@ -11481,7 +11483,7 @@ If you want to allow non-zero first timestamps, set firstTimestampBehavior: 'per
|
|
|
11481
11483
|
init_define_processenv();
|
|
11482
11484
|
init_jsx_shim();
|
|
11483
11485
|
init_jsx();
|
|
11484
|
-
var _onIcon, _offIcon, _isBusy, _talk, _intercom, _type, _onTalkStart, onTalkStart_fn, _onTalkEnd, onTalkEnd_fn;
|
|
11486
|
+
var _onIcon, _offIcon, _doingIcon, _isBusy, _talk, _intercom, _type, _onTalkStart, onTalkStart_fn, _onTalkEnd, onTalkEnd_fn;
|
|
11485
11487
|
var MikeButton = class extends HTMLElement {
|
|
11486
11488
|
constructor() {
|
|
11487
11489
|
super();
|
|
@@ -11490,6 +11492,7 @@ If you want to allow non-zero first timestamps, set firstTimestampBehavior: 'per
|
|
|
11490
11492
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields weakmep实现的私有变量
|
|
11491
11493
|
__privateAdd(this, _onIcon, core_default.dom.createByJsx(/* @__PURE__ */ jsx.h(icons_default.MikeOn, null)));
|
|
11492
11494
|
__privateAdd(this, _offIcon, core_default.dom.createByJsx(/* @__PURE__ */ jsx.h(icons_default.MikeOff, null)));
|
|
11495
|
+
__privateAdd(this, _doingIcon, core_default.dom.createByJsx(/* @__PURE__ */ jsx.h(icons_default.MikeDoing, null)));
|
|
11493
11496
|
__privateAdd(this, _isBusy, false);
|
|
11494
11497
|
//是否正在喊话
|
|
11495
11498
|
__privateAdd(this, _talk, false);
|
|
@@ -11513,9 +11516,13 @@ If you want to allow non-zero first timestamps, set firstTimestampBehavior: 'per
|
|
|
11513
11516
|
return;
|
|
11514
11517
|
if (!__privateGet(this, _isBusy)) {
|
|
11515
11518
|
__privateSet(this, _isBusy, true);
|
|
11516
|
-
__privateSet(this, _talk, state);
|
|
11517
11519
|
let pm;
|
|
11518
11520
|
pm = state ? __privateMethod(this, _onTalkStart, onTalkStart_fn).call(this) : __privateMethod(this, _onTalkEnd, onTalkEnd_fn).call(this);
|
|
11521
|
+
pm.then(() => {
|
|
11522
|
+
__privateSet(this, _talk, state);
|
|
11523
|
+
}).catch((e) => {
|
|
11524
|
+
__privateGet(this, _doingIcon).replaceWith(__privateGet(this, _offIcon));
|
|
11525
|
+
});
|
|
11519
11526
|
pm.finally(() => {
|
|
11520
11527
|
__privateSet(this, _isBusy, false);
|
|
11521
11528
|
});
|
|
@@ -11538,6 +11545,7 @@ If you want to allow non-zero first timestamps, set firstTimestampBehavior: 'per
|
|
|
11538
11545
|
};
|
|
11539
11546
|
_onIcon = new WeakMap();
|
|
11540
11547
|
_offIcon = new WeakMap();
|
|
11548
|
+
_doingIcon = new WeakMap();
|
|
11541
11549
|
_isBusy = new WeakMap();
|
|
11542
11550
|
_talk = new WeakMap();
|
|
11543
11551
|
_intercom = new WeakMap();
|
|
@@ -11548,16 +11556,18 @@ If you want to allow non-zero first timestamps, set firstTimestampBehavior: 'per
|
|
|
11548
11556
|
var _a;
|
|
11549
11557
|
if (!__privateGet(this, _intercom))
|
|
11550
11558
|
return;
|
|
11559
|
+
__privateGet(this, _offIcon).replaceWith(__privateGet(this, _doingIcon));
|
|
11551
11560
|
yield (_a = __privateGet(this, _intercom)) == null ? void 0 : _a.open(void 0, __privateGet(this, _type));
|
|
11552
|
-
__privateGet(this,
|
|
11561
|
+
__privateGet(this, _doingIcon).replaceWith(__privateGet(this, _onIcon));
|
|
11553
11562
|
});
|
|
11554
11563
|
};
|
|
11555
11564
|
_onTalkEnd = new WeakSet();
|
|
11556
11565
|
onTalkEnd_fn = function() {
|
|
11557
11566
|
return __async(this, null, function* () {
|
|
11558
11567
|
var _a;
|
|
11568
|
+
__privateGet(this, _onIcon).replaceWith(__privateGet(this, _doingIcon));
|
|
11559
11569
|
yield (_a = __privateGet(this, _intercom)) == null ? void 0 : _a.close();
|
|
11560
|
-
__privateGet(this,
|
|
11570
|
+
__privateGet(this, _doingIcon).replaceWith(__privateGet(this, _offIcon));
|
|
11561
11571
|
});
|
|
11562
11572
|
};
|
|
11563
11573
|
customElements.define("mike-button", MikeButton);
|
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.
|
|
102
|
+
define_processenv_default = { NODE_ENV: "production", SH_LIB_NAME: "@besovideo/webrtc-player", SH_LIB_VERSION: "0.8.54", PROJECT_NAMESPACE: "bvplayer" };
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
105
|
|
|
@@ -11190,6 +11190,7 @@ var Rotate = () => /* @__PURE__ */ jsx.h(Icon, null, /* @__PURE__ */ jsx.h(SvgEl
|
|
|
11190
11190
|
var PtzControl = () => /* @__PURE__ */ jsx.h(Icon, null, /* @__PURE__ */ jsx.h(SvgElementbvPlayerCorePtzControl, null));
|
|
11191
11191
|
var MikeOn = () => /* @__PURE__ */ jsx.h(Icon, null, /* @__PURE__ */ jsx.h(SvgElementbvPlayerCoreMikeOn, null));
|
|
11192
11192
|
var MikeOff = () => /* @__PURE__ */ jsx.h(Icon, null, /* @__PURE__ */ jsx.h(SvgElementbvPlayerCoreMikeOff, null));
|
|
11193
|
+
var MikeDoing = () => /* @__PURE__ */ jsx.h(Icon, null, /* @__PURE__ */ jsx.h("span", { style: `display: inline-block; --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='18' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.67' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.33' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='6' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='0' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3C!-- 1702453639037 --%3E%3C/svg%3E"); width: 20px; height: 20px; background-color: currentcolor; mask-image: var(--svg); mask-repeat: no-repeat; mask-size: 100% 100%;` }));
|
|
11193
11194
|
var directionDeg = {
|
|
11194
11195
|
top: {
|
|
11195
11196
|
value: 0,
|
|
@@ -11257,7 +11258,8 @@ var Icons = {
|
|
|
11257
11258
|
Direction,
|
|
11258
11259
|
Operator,
|
|
11259
11260
|
MikeOn,
|
|
11260
|
-
MikeOff
|
|
11261
|
+
MikeOff,
|
|
11262
|
+
MikeDoing
|
|
11261
11263
|
};
|
|
11262
11264
|
var icons_default = Icons;
|
|
11263
11265
|
|
|
@@ -11467,7 +11469,7 @@ init_logger();
|
|
|
11467
11469
|
init_define_processenv();
|
|
11468
11470
|
init_jsx_shim();
|
|
11469
11471
|
init_jsx();
|
|
11470
|
-
var _onIcon, _offIcon, _isBusy, _talk, _intercom, _type, _onTalkStart, onTalkStart_fn, _onTalkEnd, onTalkEnd_fn;
|
|
11472
|
+
var _onIcon, _offIcon, _doingIcon, _isBusy, _talk, _intercom, _type, _onTalkStart, onTalkStart_fn, _onTalkEnd, onTalkEnd_fn;
|
|
11471
11473
|
var MikeButton = class extends HTMLElement {
|
|
11472
11474
|
constructor() {
|
|
11473
11475
|
super();
|
|
@@ -11476,6 +11478,7 @@ var MikeButton = class extends HTMLElement {
|
|
|
11476
11478
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields weakmep实现的私有变量
|
|
11477
11479
|
__privateAdd(this, _onIcon, core_default.dom.createByJsx(/* @__PURE__ */ jsx.h(icons_default.MikeOn, null)));
|
|
11478
11480
|
__privateAdd(this, _offIcon, core_default.dom.createByJsx(/* @__PURE__ */ jsx.h(icons_default.MikeOff, null)));
|
|
11481
|
+
__privateAdd(this, _doingIcon, core_default.dom.createByJsx(/* @__PURE__ */ jsx.h(icons_default.MikeDoing, null)));
|
|
11479
11482
|
__privateAdd(this, _isBusy, false);
|
|
11480
11483
|
//是否正在喊话
|
|
11481
11484
|
__privateAdd(this, _talk, false);
|
|
@@ -11499,9 +11502,13 @@ var MikeButton = class extends HTMLElement {
|
|
|
11499
11502
|
return;
|
|
11500
11503
|
if (!__privateGet(this, _isBusy)) {
|
|
11501
11504
|
__privateSet(this, _isBusy, true);
|
|
11502
|
-
__privateSet(this, _talk, state);
|
|
11503
11505
|
let pm;
|
|
11504
11506
|
pm = state ? __privateMethod(this, _onTalkStart, onTalkStart_fn).call(this) : __privateMethod(this, _onTalkEnd, onTalkEnd_fn).call(this);
|
|
11507
|
+
pm.then(() => {
|
|
11508
|
+
__privateSet(this, _talk, state);
|
|
11509
|
+
}).catch((e) => {
|
|
11510
|
+
__privateGet(this, _doingIcon).replaceWith(__privateGet(this, _offIcon));
|
|
11511
|
+
});
|
|
11505
11512
|
pm.finally(() => {
|
|
11506
11513
|
__privateSet(this, _isBusy, false);
|
|
11507
11514
|
});
|
|
@@ -11524,6 +11531,7 @@ var MikeButton = class extends HTMLElement {
|
|
|
11524
11531
|
};
|
|
11525
11532
|
_onIcon = new WeakMap();
|
|
11526
11533
|
_offIcon = new WeakMap();
|
|
11534
|
+
_doingIcon = new WeakMap();
|
|
11527
11535
|
_isBusy = new WeakMap();
|
|
11528
11536
|
_talk = new WeakMap();
|
|
11529
11537
|
_intercom = new WeakMap();
|
|
@@ -11534,16 +11542,18 @@ onTalkStart_fn = function() {
|
|
|
11534
11542
|
var _a;
|
|
11535
11543
|
if (!__privateGet(this, _intercom))
|
|
11536
11544
|
return;
|
|
11545
|
+
__privateGet(this, _offIcon).replaceWith(__privateGet(this, _doingIcon));
|
|
11537
11546
|
yield (_a = __privateGet(this, _intercom)) == null ? void 0 : _a.open(void 0, __privateGet(this, _type));
|
|
11538
|
-
__privateGet(this,
|
|
11547
|
+
__privateGet(this, _doingIcon).replaceWith(__privateGet(this, _onIcon));
|
|
11539
11548
|
});
|
|
11540
11549
|
};
|
|
11541
11550
|
_onTalkEnd = new WeakSet();
|
|
11542
11551
|
onTalkEnd_fn = function() {
|
|
11543
11552
|
return __async(this, null, function* () {
|
|
11544
11553
|
var _a;
|
|
11554
|
+
__privateGet(this, _onIcon).replaceWith(__privateGet(this, _doingIcon));
|
|
11545
11555
|
yield (_a = __privateGet(this, _intercom)) == null ? void 0 : _a.close();
|
|
11546
|
-
__privateGet(this,
|
|
11556
|
+
__privateGet(this, _doingIcon).replaceWith(__privateGet(this, _offIcon));
|
|
11547
11557
|
});
|
|
11548
11558
|
};
|
|
11549
11559
|
customElements.define("mike-button", MikeButton);
|