@besovideo/webrtc-player 0.8.50 → 0.8.51
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.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* sass-plugin-0:
|
|
1
|
+
/* sass-plugin-0:E:\codeGit\bvweb-player\node_modules\tippy.js\dist\tippy.css */
|
|
2
2
|
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
3
3
|
opacity: 0;
|
|
4
4
|
}
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
z-index: 1;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
/* sass-plugin-0:
|
|
84
|
+
/* sass-plugin-0:E:\codeGit\bvweb-player\node_modules\tippy.js\animations\shift-away.css */
|
|
85
85
|
.tippy-box[data-animation=shift-away][data-state=hidden] {
|
|
86
86
|
opacity: 0;
|
|
87
87
|
}
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
transform: translateX(-10px);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
/* sass-plugin-0:
|
|
101
|
+
/* sass-plugin-0:E:\codeGit\bvweb-player\src\styles\contextmenu.css */
|
|
102
102
|
.cm_container {
|
|
103
103
|
position: absolute;
|
|
104
104
|
opacity: 0;
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
background-color: inherit;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
/* sass-plugin-0:
|
|
195
|
+
/* sass-plugin-0:E:\codeGit\bvweb-player\src\styles\main.scss */
|
|
196
196
|
.bvplayer-common-flex-space {
|
|
197
197
|
display: inline-block;
|
|
198
198
|
flex: 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.50", PROJECT_NAMESPACE: "bvplayer" };
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
|
|
@@ -11479,7 +11479,7 @@ If you want to allow non-zero first timestamps, set firstTimestampBehavior: 'per
|
|
|
11479
11479
|
// src/components/subComponent/mikeButton.tsx
|
|
11480
11480
|
init_define_processenv();
|
|
11481
11481
|
init_jsx_shim();
|
|
11482
|
-
var _onIcon, _offIcon, _talk, _intercom, _onTalkStart, onTalkStart_fn, _onTalkEnd, onTalkEnd_fn;
|
|
11482
|
+
var _onIcon, _offIcon, _talk, _intercom, _type, _onTalkStart, onTalkStart_fn, _onTalkEnd, onTalkEnd_fn;
|
|
11483
11483
|
var MikeButton = class extends HTMLElement {
|
|
11484
11484
|
constructor() {
|
|
11485
11485
|
super();
|
|
@@ -11492,6 +11492,8 @@ If you want to allow non-zero first timestamps, set firstTimestampBehavior: 'per
|
|
|
11492
11492
|
__privateAdd(this, _talk, false);
|
|
11493
11493
|
// 麦克风实例
|
|
11494
11494
|
__privateAdd(this, _intercom, void 0);
|
|
11495
|
+
// 协议类型
|
|
11496
|
+
__privateAdd(this, _type, void 0);
|
|
11495
11497
|
this.attachShadow({ mode: "open" });
|
|
11496
11498
|
this.addEventListener("click", () => {
|
|
11497
11499
|
this.talking = !this.talking;
|
|
@@ -11514,6 +11516,9 @@ If you want to allow non-zero first timestamps, set firstTimestampBehavior: 'per
|
|
|
11514
11516
|
set intercom(ins) {
|
|
11515
11517
|
__privateSet(this, _intercom, ins);
|
|
11516
11518
|
}
|
|
11519
|
+
set type(type) {
|
|
11520
|
+
__privateSet(this, _type, type);
|
|
11521
|
+
}
|
|
11517
11522
|
connectedCallback() {
|
|
11518
11523
|
this.render();
|
|
11519
11524
|
}
|
|
@@ -11527,12 +11532,13 @@ If you want to allow non-zero first timestamps, set firstTimestampBehavior: 'per
|
|
|
11527
11532
|
_offIcon = new WeakMap();
|
|
11528
11533
|
_talk = new WeakMap();
|
|
11529
11534
|
_intercom = new WeakMap();
|
|
11535
|
+
_type = new WeakMap();
|
|
11530
11536
|
_onTalkStart = new WeakSet();
|
|
11531
11537
|
onTalkStart_fn = function() {
|
|
11532
11538
|
var _a;
|
|
11533
11539
|
if (!__privateGet(this, _intercom))
|
|
11534
11540
|
return;
|
|
11535
|
-
(_a = __privateGet(this, _intercom)) == null ? void 0 : _a.open();
|
|
11541
|
+
(_a = __privateGet(this, _intercom)) == null ? void 0 : _a.open(void 0, __privateGet(this, _type));
|
|
11536
11542
|
__privateGet(this, _offIcon).replaceWith(__privateGet(this, _onIcon));
|
|
11537
11543
|
};
|
|
11538
11544
|
_onTalkEnd = new WeakSet();
|
|
@@ -17689,8 +17695,10 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
|
|
|
17689
17695
|
enableController: false
|
|
17690
17696
|
});
|
|
17691
17697
|
const instance2 = __spreadProps(__spreadValues({}, bvWebrtcComponentInstance), {
|
|
17692
|
-
open: (..._0) => __async(void 0, [..._0], function* (protocol = type) {
|
|
17698
|
+
open: (..._0) => __async(void 0, [..._0], function* (protocol = type, mikeButtonType) {
|
|
17693
17699
|
var _a, _b, _c;
|
|
17700
|
+
if (mikeButtonType)
|
|
17701
|
+
protocol = mikeButtonType;
|
|
17694
17702
|
const player = bvWebrtcComponentInstance.__dangerGetPlayer();
|
|
17695
17703
|
let hplayer = null;
|
|
17696
17704
|
try {
|
|
@@ -18604,8 +18612,10 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
|
|
|
18604
18612
|
audioWaveShow.setMediaStream(player.video.srcObject);
|
|
18605
18613
|
audioWaveShow.setEle(playerEl);
|
|
18606
18614
|
}
|
|
18607
|
-
if (player.mikeBtn)
|
|
18615
|
+
if (player.mikeBtn) {
|
|
18608
18616
|
player.mikeBtn.intercom = intercom == null ? void 0 : intercom.instance;
|
|
18617
|
+
player.mikeBtn.type = this.protocol;
|
|
18618
|
+
}
|
|
18609
18619
|
} catch (e) {
|
|
18610
18620
|
try {
|
|
18611
18621
|
let DisplayVolumn2 = function(volume) {
|
|
@@ -18696,7 +18706,10 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
|
|
|
18696
18706
|
player.spinner.spin = false;
|
|
18697
18707
|
player.addEventListener("close", () => __async(this, null, function* () {
|
|
18698
18708
|
var _a3;
|
|
18699
|
-
(_a3 = player.panel) == null ? void 0 : _a3.controller.removeEventListener(
|
|
18709
|
+
(_a3 = player.panel) == null ? void 0 : _a3.controller.removeEventListener(
|
|
18710
|
+
"volume",
|
|
18711
|
+
updateVolumeWrapper
|
|
18712
|
+
);
|
|
18700
18713
|
player.clearEventListener("recordStart");
|
|
18701
18714
|
player.clearEventListener("recordStop");
|
|
18702
18715
|
player.clearEventListener("screenshot");
|
|
@@ -18803,7 +18816,10 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
|
|
|
18803
18816
|
let updateVolumeWrapper = () => {
|
|
18804
18817
|
updateVolumeButton();
|
|
18805
18818
|
};
|
|
18806
|
-
player.panel.controller.addEventListener(
|
|
18819
|
+
player.panel.controller.addEventListener(
|
|
18820
|
+
"volume",
|
|
18821
|
+
updateVolumeWrapper
|
|
18822
|
+
);
|
|
18807
18823
|
const volumeSlider = player.panel.controller.VolumeSlider;
|
|
18808
18824
|
if (volumeSlider) {
|
|
18809
18825
|
volumeSlider.percent = hplayer.getVolume();
|
|
@@ -18817,8 +18833,10 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
|
|
|
18817
18833
|
DisplayVolumn2(Number(e2 == null ? void 0 : e2.percent));
|
|
18818
18834
|
});
|
|
18819
18835
|
}
|
|
18820
|
-
if (player.mikeBtn)
|
|
18836
|
+
if (player.mikeBtn) {
|
|
18821
18837
|
player.mikeBtn.intercom = intercom == null ? void 0 : intercom.instance;
|
|
18838
|
+
player.mikeBtn.type = this.protocol;
|
|
18839
|
+
}
|
|
18822
18840
|
} catch (e2) {
|
|
18823
18841
|
player.mask.visible = true;
|
|
18824
18842
|
player.mask.text = t("connect-failed");
|
package/dist/main.es.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* sass-plugin-1:
|
|
1
|
+
/* sass-plugin-1:E:\codeGit\bvweb-player\node_modules\tippy.js\dist\tippy.css */
|
|
2
2
|
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
3
3
|
opacity: 0;
|
|
4
4
|
}
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
z-index: 1;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
/* sass-plugin-1:
|
|
84
|
+
/* sass-plugin-1:E:\codeGit\bvweb-player\node_modules\tippy.js\animations\shift-away.css */
|
|
85
85
|
.tippy-box[data-animation=shift-away][data-state=hidden] {
|
|
86
86
|
opacity: 0;
|
|
87
87
|
}
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
transform: translateX(-10px);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
/* sass-plugin-1:
|
|
101
|
+
/* sass-plugin-1:E:\codeGit\bvweb-player\src\styles\contextmenu.css */
|
|
102
102
|
.cm_container {
|
|
103
103
|
position: absolute;
|
|
104
104
|
opacity: 0;
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
background-color: inherit;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
/* sass-plugin-1:
|
|
195
|
+
/* sass-plugin-1:E:\codeGit\bvweb-player\src\styles\main.scss */
|
|
196
196
|
.bvplayer-common-flex-space {
|
|
197
197
|
display: inline-block;
|
|
198
198
|
flex: 1;
|
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.50", PROJECT_NAMESPACE: "bvplayer" };
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
105
|
|
|
@@ -11465,7 +11465,7 @@ init_logger();
|
|
|
11465
11465
|
// src/components/subComponent/mikeButton.tsx
|
|
11466
11466
|
init_define_processenv();
|
|
11467
11467
|
init_jsx_shim();
|
|
11468
|
-
var _onIcon, _offIcon, _talk, _intercom, _onTalkStart, onTalkStart_fn, _onTalkEnd, onTalkEnd_fn;
|
|
11468
|
+
var _onIcon, _offIcon, _talk, _intercom, _type, _onTalkStart, onTalkStart_fn, _onTalkEnd, onTalkEnd_fn;
|
|
11469
11469
|
var MikeButton = class extends HTMLElement {
|
|
11470
11470
|
constructor() {
|
|
11471
11471
|
super();
|
|
@@ -11478,6 +11478,8 @@ var MikeButton = class extends HTMLElement {
|
|
|
11478
11478
|
__privateAdd(this, _talk, false);
|
|
11479
11479
|
// 麦克风实例
|
|
11480
11480
|
__privateAdd(this, _intercom, void 0);
|
|
11481
|
+
// 协议类型
|
|
11482
|
+
__privateAdd(this, _type, void 0);
|
|
11481
11483
|
this.attachShadow({ mode: "open" });
|
|
11482
11484
|
this.addEventListener("click", () => {
|
|
11483
11485
|
this.talking = !this.talking;
|
|
@@ -11500,6 +11502,9 @@ var MikeButton = class extends HTMLElement {
|
|
|
11500
11502
|
set intercom(ins) {
|
|
11501
11503
|
__privateSet(this, _intercom, ins);
|
|
11502
11504
|
}
|
|
11505
|
+
set type(type) {
|
|
11506
|
+
__privateSet(this, _type, type);
|
|
11507
|
+
}
|
|
11503
11508
|
connectedCallback() {
|
|
11504
11509
|
this.render();
|
|
11505
11510
|
}
|
|
@@ -11513,12 +11518,13 @@ _onIcon = new WeakMap();
|
|
|
11513
11518
|
_offIcon = new WeakMap();
|
|
11514
11519
|
_talk = new WeakMap();
|
|
11515
11520
|
_intercom = new WeakMap();
|
|
11521
|
+
_type = new WeakMap();
|
|
11516
11522
|
_onTalkStart = new WeakSet();
|
|
11517
11523
|
onTalkStart_fn = function() {
|
|
11518
11524
|
var _a;
|
|
11519
11525
|
if (!__privateGet(this, _intercom))
|
|
11520
11526
|
return;
|
|
11521
|
-
(_a = __privateGet(this, _intercom)) == null ? void 0 : _a.open();
|
|
11527
|
+
(_a = __privateGet(this, _intercom)) == null ? void 0 : _a.open(void 0, __privateGet(this, _type));
|
|
11522
11528
|
__privateGet(this, _offIcon).replaceWith(__privateGet(this, _onIcon));
|
|
11523
11529
|
};
|
|
11524
11530
|
_onTalkEnd = new WeakSet();
|
|
@@ -17675,8 +17681,10 @@ var AudioPlayer = (props) => {
|
|
|
17675
17681
|
enableController: false
|
|
17676
17682
|
});
|
|
17677
17683
|
const instance2 = __spreadProps(__spreadValues({}, bvWebrtcComponentInstance), {
|
|
17678
|
-
open: (..._0) => __async(void 0, [..._0], function* (protocol = type) {
|
|
17684
|
+
open: (..._0) => __async(void 0, [..._0], function* (protocol = type, mikeButtonType) {
|
|
17679
17685
|
var _a, _b, _c;
|
|
17686
|
+
if (mikeButtonType)
|
|
17687
|
+
protocol = mikeButtonType;
|
|
17680
17688
|
const player = bvWebrtcComponentInstance.__dangerGetPlayer();
|
|
17681
17689
|
let hplayer = null;
|
|
17682
17690
|
try {
|
|
@@ -18590,8 +18598,10 @@ var PuPlayer = (props) => {
|
|
|
18590
18598
|
audioWaveShow.setMediaStream(player.video.srcObject);
|
|
18591
18599
|
audioWaveShow.setEle(playerEl);
|
|
18592
18600
|
}
|
|
18593
|
-
if (player.mikeBtn)
|
|
18601
|
+
if (player.mikeBtn) {
|
|
18594
18602
|
player.mikeBtn.intercom = intercom == null ? void 0 : intercom.instance;
|
|
18603
|
+
player.mikeBtn.type = this.protocol;
|
|
18604
|
+
}
|
|
18595
18605
|
} catch (e) {
|
|
18596
18606
|
try {
|
|
18597
18607
|
let DisplayVolumn2 = function(volume) {
|
|
@@ -18682,7 +18692,10 @@ var PuPlayer = (props) => {
|
|
|
18682
18692
|
player.spinner.spin = false;
|
|
18683
18693
|
player.addEventListener("close", () => __async(this, null, function* () {
|
|
18684
18694
|
var _a3;
|
|
18685
|
-
(_a3 = player.panel) == null ? void 0 : _a3.controller.removeEventListener(
|
|
18695
|
+
(_a3 = player.panel) == null ? void 0 : _a3.controller.removeEventListener(
|
|
18696
|
+
"volume",
|
|
18697
|
+
updateVolumeWrapper
|
|
18698
|
+
);
|
|
18686
18699
|
player.clearEventListener("recordStart");
|
|
18687
18700
|
player.clearEventListener("recordStop");
|
|
18688
18701
|
player.clearEventListener("screenshot");
|
|
@@ -18789,7 +18802,10 @@ var PuPlayer = (props) => {
|
|
|
18789
18802
|
let updateVolumeWrapper = () => {
|
|
18790
18803
|
updateVolumeButton();
|
|
18791
18804
|
};
|
|
18792
|
-
player.panel.controller.addEventListener(
|
|
18805
|
+
player.panel.controller.addEventListener(
|
|
18806
|
+
"volume",
|
|
18807
|
+
updateVolumeWrapper
|
|
18808
|
+
);
|
|
18793
18809
|
const volumeSlider = player.panel.controller.VolumeSlider;
|
|
18794
18810
|
if (volumeSlider) {
|
|
18795
18811
|
volumeSlider.percent = hplayer.getVolume();
|
|
@@ -18803,8 +18819,10 @@ var PuPlayer = (props) => {
|
|
|
18803
18819
|
DisplayVolumn2(Number(e2 == null ? void 0 : e2.percent));
|
|
18804
18820
|
});
|
|
18805
18821
|
}
|
|
18806
|
-
if (player.mikeBtn)
|
|
18822
|
+
if (player.mikeBtn) {
|
|
18807
18823
|
player.mikeBtn.intercom = intercom == null ? void 0 : intercom.instance;
|
|
18824
|
+
player.mikeBtn.type = this.protocol;
|
|
18825
|
+
}
|
|
18808
18826
|
} catch (e2) {
|
|
18809
18827
|
player.mask.visible = true;
|
|
18810
18828
|
player.mask.text = t("connect-failed");
|
|
@@ -16,7 +16,7 @@ export interface IBvWebrtcComponentProps extends Props {
|
|
|
16
16
|
enableController?: boolean;
|
|
17
17
|
}
|
|
18
18
|
export interface IBvWebrtcComponentInstance extends IComponentInstance {
|
|
19
|
-
open(protocol?: "auto" | "webrtc" | "ws-bvrtc"): Promise<any>;
|
|
19
|
+
open(protocol?: "auto" | "webrtc" | "ws-bvrtc", mikeButtonType?: "auto" | "webrtc" | "ws-bvrtc"): Promise<any>;
|
|
20
20
|
close(): Promise<any>;
|
|
21
21
|
destroy(): void;
|
|
22
22
|
setOption?(option: any): void;
|
|
@@ -5,6 +5,7 @@ export declare class MikeButton extends HTMLElement {
|
|
|
5
5
|
get talking(): boolean;
|
|
6
6
|
set talking(state: boolean);
|
|
7
7
|
set intercom(ins: IIntercomInstance | undefined);
|
|
8
|
+
set type(type: "auto" | "webrtc" | "ws-bvrtc" | undefined);
|
|
8
9
|
connectedCallback(): void;
|
|
9
10
|
render(): void;
|
|
10
11
|
}
|