tuikit-atomicx-vue3 4.5.2 → 4.5.4
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/baseComp/Input/InputH5.vue.d.ts +1 -1
- package/dist/baseComp/Input/InputPC.vue.d.ts +1 -1
- package/dist/baseComp/Input/InputWX.vue.d.ts +1 -1
- package/dist/baseComp/Input/index.d.ts +15 -15
- package/dist/components/BarrageInput/TextEditor/TextEditor.vue.d.ts +1 -1
- package/dist/components/BarrageInput/index.d.ts +6 -6
- package/dist/components/ChatSetting/SettingItem/SettingItem.vue.d.ts +2 -2
- package/dist/components/ContactList/index.d.ts +6 -6
- package/dist/components/ConversationList/ConversationList.vue.d.ts +190 -190
- package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +82 -82
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +16 -16
- package/dist/components/ConversationList/ConversationSearch/ConversationSearch.vue.d.ts +36 -36
- package/dist/components/ConversationList/index.d.ts +416 -416
- package/dist/components/LiveView/PlayerControl/PlayerControl.js +145 -128
- package/dist/components/LiveView/PlayerControl/PlayerControlState.d.ts +6 -4
- package/dist/components/LiveView/PlayerControl/PlayerControlState.js +148 -122
- package/dist/components/LiveView/PlayerControl/utils/domHelpers.d.ts +2 -1
- package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +7 -6
- package/dist/components/LiveView/i18n/en-US/index.d.ts +3 -0
- package/dist/components/LiveView/i18n/en-US/index.js +4 -1
- package/dist/components/LiveView/i18n/zh-CN/index.d.ts +3 -0
- package/dist/components/LiveView/i18n/zh-CN/index.js +4 -1
- package/dist/components/LiveView/index.js +78 -78
- package/dist/components/MessageInput/MessageInput.vue.d.ts +1 -1
- package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +1 -1
- package/dist/components/MessageInput/index.d.ts +30 -30
- package/dist/components/RoomParticipantList/useParticpantAction/useNameCardAction/index.d.ts +10 -2
- package/dist/components/Search/Search.vue.d.ts +12 -12
- package/dist/components/Search/index.d.ts +18 -18
- package/dist/components/StreamView/Layout/CustomLayout.vue.d.ts +2 -1
- package/dist/components/StreamView/Layout/FloatLayout.vue.d.ts +2 -1
- package/dist/components/StreamView/Layout/GridLayout.vue.d.ts +2 -1
- package/dist/components/StreamView/Layout/MeetingLayout.vue.d.ts +1 -1
- package/dist/components/StreamView/common/StreamList/index.vue.d.ts +1 -1
- package/dist/components/StreamView/common/StreamRegion/StreamRegionPC.vue.d.ts +2 -2
- package/dist/components/StreamView/index.d.ts +1 -1
- package/dist/components/StreamView/index.vue.d.ts +1 -1
- package/dist/hooks/useRoomEngine.d.ts +2 -2
- package/dist/hooks/useUserActions/index.d.ts +18 -2
- package/dist/hooks/useUserActions/useChangeNameCardAction/index.d.ts +9 -1
- package/dist/hooks/useUserActions/useKickUserAction.d.ts +9 -1
- package/dist/hooks/useUserActions/useTransferOwnerAction.d.ts +9 -1
- package/dist/hooks/useUserActions/useVideoAction.d.ts +9 -1
- package/dist/states/BarrageState/BarrageState.d.ts +2 -2
- package/dist/states/BattleState/BattleState.d.ts +5 -5
- package/dist/states/CoGuestState.d.ts +1 -1
- package/dist/states/LiveAudienceState.d.ts +4 -4
- package/dist/states/LiveListState/LiveListState.d.ts +2 -2
- package/dist/states/LiveSeatState/index.d.ts +6 -6
- package/dist/states/LiveSeatState/seatManager.d.ts +6 -6
- package/dist/states/RoomState/roomManager.d.ts +1 -0
- package/dist/states/RoomState/roomManager.js +38 -29
- package/dist/states/RoomState/scheduleManager.js +19 -25
- package/dist/states/SeatStore.d.ts +148 -16
- package/dist/states/UserState/userManager.d.ts +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/subEntry/chat/chat.d.ts +457 -457
- package/dist/subEntry/live/server.d.ts +1 -1
- package/dist/subEntry/room/server.d.ts +1 -1
- package/package.json +3 -2
- package/src/components/LiveView/PlayerControl/PlayerControl.vue +39 -15
- package/src/components/LiveView/PlayerControl/PlayerControlState.ts +61 -18
- package/src/components/LiveView/PlayerControl/utils/domHelpers.ts +4 -4
- package/src/components/LiveView/i18n/en-US/index.ts +3 -0
- package/src/components/LiveView/i18n/zh-CN/index.ts +3 -0
- package/src/components/LiveView/index.vue +7 -3
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { TUIVideoQuality as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { ref as i, computed as N, watch as C } from "vue";
|
|
2
|
+
import { TUIVideoQuality as h } from "@tencentcloud/tuiroom-engine-js";
|
|
3
|
+
import { useUIKit as te, TUIMessageBox as ne } from "@tencentcloud/uikit-base-component-vue3";
|
|
4
|
+
import { useRoomEngine as ae } from "../../../hooks/useRoomEngine.js";
|
|
5
|
+
import { useLiveSeatState as re } from "../../../states/LiveSeatState/index.js";
|
|
6
|
+
import { isSafariBrowser as se, hadLandscapeRotationToUndo as ie, getDeviceType as le, shouldRotateToLandscapeForFullscreen as oe } from "./utils/deviceDetection.js";
|
|
7
|
+
import { EventListenerManager as ce, DOMElementGetter as f, waitForVideoMounted as ue } from "./utils/domHelpers.js";
|
|
8
|
+
import { OrientationManager as S, StyleManager as M, FullscreenMode as V, FullscreenManager as k } from "./utils/fullscreenManager.js";
|
|
9
|
+
import { useLiveListState as de } from "../../../states/LiveListState/LiveListState.js";
|
|
10
|
+
var fe = /* @__PURE__ */ ((r) => (r.CONTAIN = "contain", r.COVER = "cover", r.FILL = "fill", r))(fe || {}), ve = ((r) => (r[r.R360P = h.kVideoQuality_360p] = "R360P", r[r.R540P = h.kVideoQuality_540p] = "R540P", r[r.R720P = h.kVideoQuality_720p] = "R720P", r[r.R1080P = h.kVideoQuality_1080p] = "R1080P", r))(ve || {});
|
|
11
|
+
const u = {
|
|
11
12
|
// Default volume level when component initializes (100% volume)
|
|
12
13
|
DEFAULT_VOLUME: 100,
|
|
13
14
|
// Minimum allowed volume level (silent)
|
|
@@ -16,88 +17,100 @@ const l = {
|
|
|
16
17
|
MAX_VOLUME: 100,
|
|
17
18
|
// Volume level when muted (silent)
|
|
18
19
|
MUTE_VOLUME: 0
|
|
19
|
-
},
|
|
20
|
-
// Delay in milliseconds before resuming playback after leaving picture-in-picture
|
|
21
|
-
// Allows browser to handle state transitions naturally
|
|
22
|
-
PIP_RESUME_DELAY: 300
|
|
23
|
-
}, x = {
|
|
20
|
+
}, D = {
|
|
24
21
|
// Index of the first element in an array
|
|
25
22
|
FIRST_INDEX: 0
|
|
26
|
-
},
|
|
23
|
+
}, o = i(!1), F = i(
|
|
27
24
|
"contain"
|
|
28
25
|
/* CONTAIN */
|
|
29
|
-
),
|
|
30
|
-
let I =
|
|
31
|
-
const
|
|
32
|
-
function
|
|
33
|
-
const { currentLive: r } =
|
|
34
|
-
() =>
|
|
35
|
-
),
|
|
36
|
-
() =>
|
|
37
|
-
),
|
|
26
|
+
), l = i(!1), w = i(!1), E = i(!1), m = i(u.DEFAULT_VOLUME), T = i(!1), me = i(se()), g = i(!1);
|
|
27
|
+
let I = u.DEFAULT_VOLUME;
|
|
28
|
+
const L = i([]), y = i(), c = ae(), { t: q } = te();
|
|
29
|
+
function Me() {
|
|
30
|
+
const { currentLive: r } = de(), { canvas: v } = re(), d = new ce(), O = `player-control-${Date.now()}`, P = N(
|
|
31
|
+
() => v.value ? v.value.width > v.value.height : !1
|
|
32
|
+
), Q = N(
|
|
33
|
+
() => v.value ? v.value.width < v.value.height : !1
|
|
34
|
+
), p = le(), s = async (e, t, n) => {
|
|
38
35
|
try {
|
|
39
36
|
return await e();
|
|
40
|
-
} catch (
|
|
41
|
-
return console.error(`${t} operation failed:`,
|
|
37
|
+
} catch (a) {
|
|
38
|
+
return console.error(`${t} operation failed:`, a), n;
|
|
42
39
|
}
|
|
43
|
-
},
|
|
44
|
-
var e;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
}, J = async () => s(async () => {
|
|
41
|
+
var e, t, n;
|
|
42
|
+
try {
|
|
43
|
+
return await ((e = c.instance) == null ? void 0 : e.callExperimentalAPI(JSON.stringify({
|
|
44
|
+
api: "resume",
|
|
45
|
+
params: {}
|
|
46
|
+
}))), o.value = !0, !0;
|
|
47
|
+
} catch (a) {
|
|
48
|
+
if ((a == null ? void 0 : a.name) === "NotAllowedError" && ((t = a == null ? void 0 : a.message) != null && t.includes("user agent") || (n = a == null ? void 0 : a.message) != null && n.includes("denied permission")))
|
|
49
|
+
return ne.alert({
|
|
50
|
+
content: q("Content is ready. Click the button to start playback"),
|
|
51
|
+
confirmText: q("Play"),
|
|
52
|
+
callback: async () => {
|
|
53
|
+
var x;
|
|
54
|
+
await ((x = c.instance) == null ? void 0 : x.callExperimentalAPI(JSON.stringify({
|
|
55
|
+
api: "resume",
|
|
56
|
+
params: {}
|
|
57
|
+
}))), o.value = !0;
|
|
58
|
+
}
|
|
59
|
+
}), !1;
|
|
60
|
+
throw a;
|
|
61
|
+
}
|
|
62
|
+
}, "Resume playback", !1), X = async () => s(async () => {
|
|
50
63
|
var e;
|
|
51
|
-
return await ((e =
|
|
64
|
+
return await ((e = c.instance) == null ? void 0 : e.callExperimentalAPI(JSON.stringify({
|
|
52
65
|
api: "pause",
|
|
53
66
|
params: {}
|
|
54
|
-
}))),
|
|
55
|
-
}, "Pause playback", !1),
|
|
56
|
-
if (!
|
|
67
|
+
}))), o.value = !1, !0;
|
|
68
|
+
}, "Pause playback", !1), $ = (e) => {
|
|
69
|
+
if (!l.value || !P.value)
|
|
57
70
|
return;
|
|
58
|
-
const t =
|
|
71
|
+
const t = f.getAllElements();
|
|
59
72
|
if (!t.view) {
|
|
60
73
|
console.warn("live-core-view element not found for orientation change handling");
|
|
61
74
|
return;
|
|
62
75
|
}
|
|
63
76
|
M.smartApplyLandscapeStyles(t.view, e);
|
|
64
|
-
},
|
|
65
|
-
const e =
|
|
77
|
+
}, z = async () => s(async () => {
|
|
78
|
+
const e = f.getAllElements(), t = f.validateElements(e);
|
|
66
79
|
if (!t.isValid)
|
|
67
80
|
throw new Error(`Missing required DOM elements: ${t.missingElements.join(", ")}`);
|
|
68
|
-
const n =
|
|
81
|
+
const n = oe(p, P.value), a = await k.requestFullscreen(
|
|
69
82
|
e.container,
|
|
70
83
|
e.view,
|
|
71
|
-
|
|
72
|
-
|
|
84
|
+
p,
|
|
85
|
+
Q.value,
|
|
73
86
|
n
|
|
74
87
|
);
|
|
75
|
-
return
|
|
76
|
-
}, "Request fullscreen", { success: !1, mode:
|
|
77
|
-
const e =
|
|
88
|
+
return a.success ? l.value = !0 : console.error("Fullscreen request failed:", a.error), w.value = a.shouldRotateToLandscape, a;
|
|
89
|
+
}, "Request fullscreen", { success: !1, mode: V.CSS_SIMULATED, shouldRotateToLandscape: !1 }), B = async () => s(async () => {
|
|
90
|
+
const e = f.getAllElements();
|
|
78
91
|
if (!e.view)
|
|
79
92
|
throw new Error("live-core-view element not found");
|
|
80
|
-
const t =
|
|
93
|
+
const t = ie(p, P.value), n = await k.exitFullscreen(
|
|
81
94
|
e.view,
|
|
82
|
-
|
|
95
|
+
p,
|
|
83
96
|
t
|
|
84
97
|
);
|
|
85
|
-
return n.mode ===
|
|
86
|
-
}, "Exit fullscreen", { success: !1, mode:
|
|
87
|
-
const e =
|
|
98
|
+
return n.mode === V.CSS_SIMULATED && (l.value = !1), n.success || console.error("Fullscreen exit failed:", n.error), w.value = !1, n;
|
|
99
|
+
}, "Exit fullscreen", { success: !1, mode: V.CSS_SIMULATED, shouldRotateToLandscape: !1 }), G = async () => s(async () => {
|
|
100
|
+
const e = f.getVideoElement();
|
|
88
101
|
if (!e)
|
|
89
102
|
throw new Error("Video element not found");
|
|
90
103
|
if (!e.requestPictureInPicture)
|
|
91
104
|
throw new Error("Picture-in-picture not supported in current environment");
|
|
92
|
-
return
|
|
93
|
-
}, "Request picture-in-picture", !1),
|
|
105
|
+
return _(), await e.requestPictureInPicture(), !0;
|
|
106
|
+
}, "Request picture-in-picture", !1), j = async () => s(async () => {
|
|
94
107
|
if (!document.exitPictureInPicture)
|
|
95
108
|
throw new Error("Exit picture-in-picture not supported in current environment");
|
|
96
109
|
return await document.exitPictureInPicture(), !0;
|
|
97
|
-
}, "Exit picture-in-picture", !1), A = async (e) =>
|
|
98
|
-
if (!
|
|
110
|
+
}, "Exit picture-in-picture", !1), A = async (e) => s(async () => {
|
|
111
|
+
if (!c.instance)
|
|
99
112
|
throw new Error("Room engine instance not available");
|
|
100
|
-
return console.debug("Switching to resolution:", e), await
|
|
113
|
+
return console.debug("Switching to resolution:", e), await c.instance.callExperimentalAPI(
|
|
101
114
|
JSON.stringify({
|
|
102
115
|
api: "switchPlaybackQuality",
|
|
103
116
|
params: {
|
|
@@ -105,11 +118,11 @@ function pe() {
|
|
|
105
118
|
autoSwitch: !1
|
|
106
119
|
}
|
|
107
120
|
})
|
|
108
|
-
),
|
|
109
|
-
}, "Switch resolution", !1),
|
|
110
|
-
if (!
|
|
121
|
+
), o.value || (o.value = !0), y.value = e, !0;
|
|
122
|
+
}, "Switch resolution", !1), H = async (e) => s(async () => {
|
|
123
|
+
if (!c.instance)
|
|
111
124
|
throw new Error("Room engine instance not available");
|
|
112
|
-
return await
|
|
125
|
+
return await c.instance.callExperimentalAPI(
|
|
113
126
|
JSON.stringify({
|
|
114
127
|
api: "queryPlaybackQualityList",
|
|
115
128
|
params: {
|
|
@@ -117,106 +130,119 @@ function pe() {
|
|
|
117
130
|
}
|
|
118
131
|
})
|
|
119
132
|
) || [];
|
|
120
|
-
}, "Get resolution list", []),
|
|
133
|
+
}, "Get resolution list", []), K = async (e, t = !0) => {
|
|
121
134
|
try {
|
|
122
|
-
const n = await
|
|
123
|
-
if (
|
|
124
|
-
console.warn("[Resolution] No resolutions available for room:", e),
|
|
135
|
+
const n = await H(e);
|
|
136
|
+
if (L.value = n, n.length === D.FIRST_INDEX) {
|
|
137
|
+
console.warn("[Resolution] No resolutions available for room:", e), y.value = void 0;
|
|
125
138
|
return;
|
|
126
139
|
}
|
|
127
|
-
const
|
|
128
|
-
|
|
140
|
+
const a = n[D.FIRST_INDEX];
|
|
141
|
+
y.value = a, t && await A(a);
|
|
129
142
|
} catch (n) {
|
|
130
143
|
console.error("[Resolution] Failed to initialize resolution:", n);
|
|
131
144
|
}
|
|
132
|
-
},
|
|
145
|
+
}, R = async (e) => s(async () => {
|
|
133
146
|
var t;
|
|
134
|
-
if (e <
|
|
135
|
-
throw new Error(`Volume value must be between ${
|
|
136
|
-
return await ((t =
|
|
137
|
-
}, "Set volume", !1),
|
|
147
|
+
if (e < u.MIN_VOLUME || e > u.MAX_VOLUME)
|
|
148
|
+
throw new Error(`Volume value must be between ${u.MIN_VOLUME}-${u.MAX_VOLUME}`);
|
|
149
|
+
return await ((t = c.instance) == null ? void 0 : t.setAudioPlayoutVolume({ volume: e })), m.value = e, I = e, T.value = e == u.MUTE_VOLUME, !0;
|
|
150
|
+
}, "Set volume", !1), Y = async (e) => s(async () => {
|
|
138
151
|
var n;
|
|
139
152
|
let t;
|
|
140
|
-
return e ? (I = m.value, t =
|
|
141
|
-
}, "Set mute", !1),
|
|
153
|
+
return e ? (I = m.value, t = u.MUTE_VOLUME) : t = I || u.DEFAULT_VOLUME, await ((n = c.instance) == null ? void 0 : n.setAudioPlayoutVolume({ volume: t })), m.value = t, T.value = e, !0;
|
|
154
|
+
}, "Set mute", !1), W = async (e) => s(async () => (F.value = e, !0), "Change fill mode", !1), U = () => {
|
|
142
155
|
try {
|
|
143
|
-
const e =
|
|
156
|
+
const e = f.getAllElements();
|
|
144
157
|
if (!e.view) {
|
|
145
158
|
console.warn("View element not found for fullscreen exit cleanup");
|
|
146
159
|
return;
|
|
147
160
|
}
|
|
148
|
-
M.removeFullscreenStyles(e.view), M.removeLandscapeStyles(e.view),
|
|
149
|
-
}),
|
|
161
|
+
M.removeFullscreenStyles(e.view), M.removeLandscapeStyles(e.view), p !== "desktop" && S.unlockOrientation().catch(() => {
|
|
162
|
+
}), w.value = !1;
|
|
150
163
|
} catch (e) {
|
|
151
164
|
console.error("Fullscreen exit cleanup failed:", e);
|
|
152
165
|
}
|
|
153
|
-
},
|
|
166
|
+
}, Z = () => {
|
|
154
167
|
const e = () => {
|
|
155
|
-
const n = !!document.fullscreenElement,
|
|
156
|
-
|
|
168
|
+
const n = !!document.fullscreenElement, a = l.value;
|
|
169
|
+
l.value = n, a && !n && U();
|
|
157
170
|
};
|
|
158
|
-
|
|
171
|
+
d.addListener("fullscreenchange", document, "fullscreenchange", e), d.addListener("webkitfullscreenchange", document, "webkitfullscreenchange", e), d.addListener("mozfullscreenchange", document, "mozfullscreenchange", e), d.addListener("MSFullscreenChange", document, "MSFullscreenChange", e);
|
|
159
172
|
const t = () => {
|
|
160
|
-
document.visibilityState === "visible" &&
|
|
173
|
+
document.visibilityState === "visible" && l.value && (document.fullscreenElement || (l.value = !1, U()));
|
|
161
174
|
};
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
const e =
|
|
175
|
+
d.addListener("visibilitychange", document, "visibilitychange", t);
|
|
176
|
+
}, _ = () => {
|
|
177
|
+
const e = f.getVideoElement();
|
|
165
178
|
if (!e) {
|
|
166
179
|
console.warn("Video element not found for setting up event listeners");
|
|
167
180
|
return;
|
|
168
181
|
}
|
|
169
182
|
const t = () => {
|
|
170
|
-
|
|
183
|
+
E.value = !0;
|
|
171
184
|
}, n = () => {
|
|
172
|
-
|
|
185
|
+
E.value = !1;
|
|
173
186
|
};
|
|
174
|
-
|
|
175
|
-
},
|
|
176
|
-
|
|
187
|
+
d.addListener("enterpictureinpicture", e, "enterpictureinpicture", t), d.addListener("leavepictureinpicture", e, "leavepictureinpicture", n);
|
|
188
|
+
}, ee = () => {
|
|
189
|
+
S.removeOrientationListener(O), d.removeAllListeners();
|
|
190
|
+
};
|
|
191
|
+
Z(), _(), S.addOrientationListener(O, $);
|
|
192
|
+
const b = async () => {
|
|
193
|
+
try {
|
|
194
|
+
await ue();
|
|
195
|
+
} finally {
|
|
196
|
+
const e = f.hasTcPlayerElement();
|
|
197
|
+
e !== g.value && (g.value = e, console.log("[PlayerControl] isTcPlayer:", g.value));
|
|
198
|
+
}
|
|
177
199
|
};
|
|
178
|
-
return
|
|
200
|
+
return C(
|
|
179
201
|
() => {
|
|
180
202
|
var e;
|
|
181
203
|
return (e = r.value) == null ? void 0 : e.liveId;
|
|
182
204
|
},
|
|
183
205
|
async (e) => {
|
|
184
|
-
e && (
|
|
185
|
-
isPlaying:
|
|
186
|
-
currentFillMode:
|
|
187
|
-
isFullscreen:
|
|
188
|
-
isLandscapeStyleMode:
|
|
189
|
-
isPictureInPicture:
|
|
206
|
+
e && (o.value = !0, E.value = !1, l.value = !1, L.value = [], y.value = void 0, await R(m.value), await K(e, !1), b(), console.log("[PlayerControl] State after entering room:", JSON.stringify({
|
|
207
|
+
isPlaying: o.value,
|
|
208
|
+
currentFillMode: F.value,
|
|
209
|
+
isFullscreen: l.value,
|
|
210
|
+
isLandscapeStyleMode: w.value,
|
|
211
|
+
isPictureInPicture: E.value,
|
|
190
212
|
currentVolume: m.value,
|
|
191
|
-
resolutionList:
|
|
192
|
-
currentResolution:
|
|
193
|
-
}));
|
|
213
|
+
resolutionList: L.value,
|
|
214
|
+
currentResolution: y.value
|
|
215
|
+
})));
|
|
194
216
|
}
|
|
195
|
-
), {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
217
|
+
), C(() => o.value, (e) => {
|
|
218
|
+
e && b();
|
|
219
|
+
}, { immediate: !0 }), {
|
|
220
|
+
isPlaying: o,
|
|
221
|
+
currentFillMode: F,
|
|
222
|
+
isFullscreen: l,
|
|
223
|
+
isLandscapeStyleMode: w,
|
|
224
|
+
isPictureInPicture: E,
|
|
201
225
|
currentVolume: m,
|
|
202
|
-
isMuted:
|
|
203
|
-
resolutionList:
|
|
204
|
-
currentResolution:
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
226
|
+
isMuted: T,
|
|
227
|
+
resolutionList: L,
|
|
228
|
+
currentResolution: y,
|
|
229
|
+
isSafari: me,
|
|
230
|
+
isTcPlayer: g,
|
|
231
|
+
resume: J,
|
|
232
|
+
pause: X,
|
|
233
|
+
requestFullscreen: z,
|
|
234
|
+
exitFullscreen: B,
|
|
235
|
+
requestPictureInPicture: G,
|
|
236
|
+
exitPictureInPicture: j,
|
|
211
237
|
switchResolution: A,
|
|
212
|
-
setVolume:
|
|
213
|
-
setMute:
|
|
214
|
-
changeFillMode:
|
|
215
|
-
cleanup:
|
|
238
|
+
setVolume: R,
|
|
239
|
+
setMute: Y,
|
|
240
|
+
changeFillMode: W,
|
|
241
|
+
cleanup: ee
|
|
216
242
|
};
|
|
217
243
|
}
|
|
218
244
|
export {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
245
|
+
fe as FillMode,
|
|
246
|
+
ve as Resolution,
|
|
247
|
+
Me as usePlayerControlState
|
|
222
248
|
};
|
|
@@ -40,7 +40,8 @@ export declare class DOMElementGetter {
|
|
|
40
40
|
*/
|
|
41
41
|
static getTcPlayerElement(): HTMLElement | null;
|
|
42
42
|
/**
|
|
43
|
-
* Validate if elements exist
|
|
43
|
+
* Validate if required elements exist for fullscreen
|
|
44
|
+
* Note: video element is optional because canvas rendering (TRTC SDK) doesn't use video
|
|
44
45
|
*/
|
|
45
46
|
static validateElements(elements: {
|
|
46
47
|
container?: HTMLElement | null;
|
|
@@ -51,11 +51,12 @@ class s {
|
|
|
51
51
|
return e ? e.querySelector(c.TCPLAYER_ELEMENT) : null;
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
|
-
* Validate if elements exist
|
|
54
|
+
* Validate if required elements exist for fullscreen
|
|
55
|
+
* Note: video element is optional because canvas rendering (TRTC SDK) doesn't use video
|
|
55
56
|
*/
|
|
56
57
|
static validateElements(e) {
|
|
57
58
|
const t = [];
|
|
58
|
-
return e.container === null && t.push("live-core-view-container"), e.view === null && t.push("live-core-view"),
|
|
59
|
+
return e.container === null && t.push("live-core-view-container"), e.view === null && t.push("live-core-view"), {
|
|
59
60
|
isValid: t.length === 0,
|
|
60
61
|
missingElements: t
|
|
61
62
|
};
|
|
@@ -100,10 +101,10 @@ const g = (i = 3e3) => new Promise((e) => {
|
|
|
100
101
|
}
|
|
101
102
|
let r = null;
|
|
102
103
|
const o = new MutationObserver((v) => {
|
|
103
|
-
for (const
|
|
104
|
-
|
|
105
|
-
if (
|
|
106
|
-
const n =
|
|
104
|
+
for (const a of v)
|
|
105
|
+
a.type === "childList" && a.addedNodes.forEach((l) => {
|
|
106
|
+
if (l.nodeName === "VIDEO") {
|
|
107
|
+
const n = l, u = n.onvolumechange;
|
|
107
108
|
n.onvolumechange = null;
|
|
108
109
|
const E = () => {
|
|
109
110
|
r && clearTimeout(r), o.disconnect(), n.removeEventListener("loadeddata", E), setTimeout(() => {
|
|
@@ -10,6 +10,7 @@ export declare const resource: {
|
|
|
10
10
|
'Open Speaker': string;
|
|
11
11
|
'Close Speaker': string;
|
|
12
12
|
'The system does not support picture-in-picture mode': string;
|
|
13
|
+
'Content is ready. Click the button to start playback': string;
|
|
13
14
|
'co-Hosting': string;
|
|
14
15
|
'In battle': string;
|
|
15
16
|
'360P': string;
|
|
@@ -17,4 +18,6 @@ export declare const resource: {
|
|
|
17
18
|
'720P': string;
|
|
18
19
|
'1080P': string;
|
|
19
20
|
Connecting: string;
|
|
21
|
+
'Not allow to "Pause" in picture-in-picture mode': string;
|
|
22
|
+
'Not allow to "Picture in Picture" in non-playing mode': string;
|
|
20
23
|
};
|
|
@@ -10,13 +10,16 @@ const e = {
|
|
|
10
10
|
"Open Speaker": "Open Speaker",
|
|
11
11
|
"Close Speaker": "Close Speaker",
|
|
12
12
|
"The system does not support picture-in-picture mode": "The system does not support picture-in-picture mode",
|
|
13
|
+
"Content is ready. Click the button to start playback": "Content is ready. Click the button to start playback",
|
|
13
14
|
"co-Hosting": "co-Hosting",
|
|
14
15
|
"In battle": "In battle",
|
|
15
16
|
"360P": "360P",
|
|
16
17
|
"540P": "540P",
|
|
17
18
|
"720P": "720P",
|
|
18
19
|
"1080P": "1080P",
|
|
19
|
-
Connecting: "Connecting"
|
|
20
|
+
Connecting: "Connecting",
|
|
21
|
+
'Not allow to "Pause" in picture-in-picture mode': 'Not allow to "Pause" in picture-in-picture mode',
|
|
22
|
+
'Not allow to "Picture in Picture" in non-playing mode': 'Not allow to "Picture in Picture" in non-playing mode'
|
|
20
23
|
};
|
|
21
24
|
export {
|
|
22
25
|
e as resource
|
|
@@ -10,6 +10,7 @@ export declare const resource: {
|
|
|
10
10
|
'Open Speaker': string;
|
|
11
11
|
'Close Speaker': string;
|
|
12
12
|
'The system does not support picture-in-picture mode': string;
|
|
13
|
+
'Content is ready. Click the button to start playback': string;
|
|
13
14
|
'co-Hosting': string;
|
|
14
15
|
'In battle': string;
|
|
15
16
|
'360P': string;
|
|
@@ -17,4 +18,6 @@ export declare const resource: {
|
|
|
17
18
|
'720P': string;
|
|
18
19
|
'1080P': string;
|
|
19
20
|
Connecting: string;
|
|
21
|
+
'Not allow to "Pause" in picture-in-picture mode': string;
|
|
22
|
+
'Not allow to "Picture in Picture" in non-playing mode': string;
|
|
20
23
|
};
|
|
@@ -10,13 +10,16 @@ const e = {
|
|
|
10
10
|
"Open Speaker": "取消静音",
|
|
11
11
|
"Close Speaker": "静音",
|
|
12
12
|
"The system does not support picture-in-picture mode": "系统不支持画中画模式",
|
|
13
|
+
"Content is ready. Click the button to start playback": "画面已准备好,点击播放按钮开始播放",
|
|
13
14
|
"co-Hosting": "连线中",
|
|
14
15
|
"In battle": "PK中",
|
|
15
16
|
"360P": "低清",
|
|
16
17
|
"540P": "标清",
|
|
17
18
|
"720P": "高清",
|
|
18
19
|
"1080P": "超清",
|
|
19
|
-
Connecting: "连线中"
|
|
20
|
+
Connecting: "连线中",
|
|
21
|
+
'Not allow to "Pause" in picture-in-picture mode': "画中画模式下不允许暂停操作",
|
|
22
|
+
'Not allow to "Picture in Picture" in non-playing mode': "暂停状态下不允许进入画中画模式"
|
|
20
23
|
};
|
|
21
24
|
export {
|
|
22
25
|
e as resource
|