tuikit-atomicx-vue3 4.5.3 → 4.5.5

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.
Files changed (63) hide show
  1. package/dist/baseComp/Input/InputH5.vue.d.ts +1 -1
  2. package/dist/baseComp/Input/InputPC.vue.d.ts +1 -1
  3. package/dist/baseComp/Input/InputWX.vue.d.ts +1 -1
  4. package/dist/baseComp/Input/index.d.ts +15 -15
  5. package/dist/components/BarrageInput/TextEditor/TextEditor.vue.d.ts +1 -1
  6. package/dist/components/BarrageInput/index.d.ts +6 -6
  7. package/dist/components/ChatSetting/SettingItem/SettingItem.vue.d.ts +2 -2
  8. package/dist/components/ContactList/index.d.ts +6 -6
  9. package/dist/components/ConversationList/ConversationList.vue.d.ts +190 -190
  10. package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +82 -82
  11. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +16 -16
  12. package/dist/components/ConversationList/ConversationSearch/ConversationSearch.vue.d.ts +36 -36
  13. package/dist/components/ConversationList/index.d.ts +416 -416
  14. package/dist/components/LiveView/PlayerControl/PlayerControl.js +145 -128
  15. package/dist/components/LiveView/PlayerControl/PlayerControlState.d.ts +6 -4
  16. package/dist/components/LiveView/PlayerControl/PlayerControlState.js +148 -122
  17. package/dist/components/LiveView/PlayerControl/utils/domHelpers.d.ts +2 -1
  18. package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +7 -6
  19. package/dist/components/LiveView/i18n/en-US/index.d.ts +3 -0
  20. package/dist/components/LiveView/i18n/en-US/index.js +4 -1
  21. package/dist/components/LiveView/i18n/zh-CN/index.d.ts +3 -0
  22. package/dist/components/LiveView/i18n/zh-CN/index.js +4 -1
  23. package/dist/components/LiveView/index.js +78 -78
  24. package/dist/components/MessageInput/MessageInput.vue.d.ts +1 -1
  25. package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +1 -1
  26. package/dist/components/MessageInput/index.d.ts +30 -30
  27. package/dist/components/RoomParticipantList/useParticpantAction/useNameCardAction/index.d.ts +10 -2
  28. package/dist/components/Search/Search.vue.d.ts +12 -12
  29. package/dist/components/Search/index.d.ts +18 -18
  30. package/dist/components/StreamView/Layout/CustomLayout.vue.d.ts +2 -1
  31. package/dist/components/StreamView/Layout/FloatLayout.vue.d.ts +2 -1
  32. package/dist/components/StreamView/Layout/GridLayout.vue.d.ts +2 -1
  33. package/dist/components/StreamView/Layout/MeetingLayout.vue.d.ts +1 -1
  34. package/dist/components/StreamView/common/StreamList/index.vue.d.ts +1 -1
  35. package/dist/components/StreamView/common/StreamRegion/StreamRegionPC.vue.d.ts +2 -2
  36. package/dist/components/StreamView/index.d.ts +1 -1
  37. package/dist/components/StreamView/index.vue.d.ts +1 -1
  38. package/dist/hooks/useRoomEngine.d.ts +2 -2
  39. package/dist/hooks/useUserActions/index.d.ts +18 -2
  40. package/dist/hooks/useUserActions/useChangeNameCardAction/index.d.ts +9 -1
  41. package/dist/hooks/useUserActions/useKickUserAction.d.ts +9 -1
  42. package/dist/hooks/useUserActions/useTransferOwnerAction.d.ts +9 -1
  43. package/dist/hooks/useUserActions/useVideoAction.d.ts +9 -1
  44. package/dist/states/BarrageState/BarrageState.d.ts +2 -2
  45. package/dist/states/BattleState/BattleState.d.ts +5 -5
  46. package/dist/states/CoGuestState.d.ts +1 -1
  47. package/dist/states/LiveAudienceState.d.ts +4 -4
  48. package/dist/states/LiveListState/LiveListState.d.ts +2 -2
  49. package/dist/states/LiveSeatState/index.d.ts +6 -6
  50. package/dist/states/LiveSeatState/seatManager.d.ts +6 -6
  51. package/dist/states/SeatStore.d.ts +148 -16
  52. package/dist/states/UserState/userManager.d.ts +1 -1
  53. package/dist/styles/index.css +1 -1
  54. package/dist/subEntry/chat/chat.d.ts +457 -457
  55. package/dist/subEntry/live/server.d.ts +1 -1
  56. package/dist/subEntry/room/server.d.ts +1 -1
  57. package/package.json +3 -2
  58. package/src/components/LiveView/PlayerControl/PlayerControl.vue +39 -15
  59. package/src/components/LiveView/PlayerControl/PlayerControlState.ts +61 -18
  60. package/src/components/LiveView/PlayerControl/utils/domHelpers.ts +4 -4
  61. package/src/components/LiveView/i18n/en-US/index.ts +3 -0
  62. package/src/components/LiveView/i18n/zh-CN/index.ts +3 -0
  63. package/src/components/LiveView/index.vue +7 -3
@@ -1,13 +1,14 @@
1
- import { ref as o, computed as N, watch as B } from "vue";
2
- import { TUIVideoQuality as w } from "@tencentcloud/tuiroom-engine-js";
3
- import { useRoomEngine as K } from "../../../hooks/useRoomEngine.js";
4
- import { useLiveSeatState as W } from "../../../states/LiveSeatState/index.js";
5
- import { hadLandscapeRotationToUndo as Z, getDeviceType as ee, shouldRotateToLandscapeForFullscreen as te } from "./utils/deviceDetection.js";
6
- import { EventListenerManager as ne, DOMElementGetter as d } from "./utils/domHelpers.js";
7
- import { OrientationManager as P, StyleManager as M, FullscreenMode as S, FullscreenManager as b } from "./utils/fullscreenManager.js";
8
- import { useLiveListState as re } from "../../../states/LiveListState/LiveListState.js";
9
- var ae = /* @__PURE__ */ ((r) => (r.CONTAIN = "contain", r.COVER = "cover", r.FILL = "fill", r))(ae || {}), se = ((r) => (r[r.R360P = w.kVideoQuality_360p] = "R360P", r[r.R540P = w.kVideoQuality_540p] = "R540P", r[r.R720P = w.kVideoQuality_720p] = "R720P", r[r.R1080P = w.kVideoQuality_1080p] = "R1080P", r))(se || {});
10
- const l = {
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
- }, ie = {
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
- }, v = o(!0), V = o(
23
+ }, o = i(!1), F = i(
27
24
  "contain"
28
25
  /* CONTAIN */
29
- ), i = o(!1), E = o(!1), L = o(!1), m = o(l.DEFAULT_VOLUME), F = o(!1);
30
- let I = l.DEFAULT_VOLUME;
31
- const h = o([]), p = o(), u = K();
32
- function pe() {
33
- const { currentLive: r } = re(), { canvas: f } = W(), c = new ne(), R = `player-control-${Date.now()}`, g = N(
34
- () => f.value ? f.value.width > f.value.height : !1
35
- ), C = N(
36
- () => f.value ? f.value.width < f.value.height : !1
37
- ), y = ee(), a = async (e, t, n) => {
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 (s) {
41
- return console.error(`${t} operation failed:`, s), n;
37
+ } catch (a) {
38
+ return console.error(`${t} operation failed:`, a), n;
42
39
  }
43
- }, T = async () => a(async () => {
44
- var e;
45
- return await ((e = u.instance) == null ? void 0 : e.callExperimentalAPI(JSON.stringify({
46
- api: "resume",
47
- params: {}
48
- }))), v.value = !0, !0;
49
- }, "Resume playback", !1), D = async () => a(async () => {
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 = u.instance) == null ? void 0 : e.callExperimentalAPI(JSON.stringify({
64
+ return await ((e = c.instance) == null ? void 0 : e.callExperimentalAPI(JSON.stringify({
52
65
  api: "pause",
53
66
  params: {}
54
- }))), v.value = !1, !0;
55
- }, "Pause playback", !1), k = (e) => {
56
- if (!i.value || !g.value)
67
+ }))), o.value = !1, !0;
68
+ }, "Pause playback", !1), $ = (e) => {
69
+ if (!l.value || !P.value)
57
70
  return;
58
- const t = d.getAllElements();
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
- }, q = async () => a(async () => {
65
- const e = d.getAllElements(), t = d.validateElements(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 = te(y, g.value), s = await b.requestFullscreen(
81
+ const n = oe(p, P.value), a = await k.requestFullscreen(
69
82
  e.container,
70
83
  e.view,
71
- y,
72
- C.value,
84
+ p,
85
+ Q.value,
73
86
  n
74
87
  );
75
- return s.success ? i.value = !0 : console.error("Fullscreen request failed:", s.error), E.value = s.shouldRotateToLandscape, s;
76
- }, "Request fullscreen", { success: !1, mode: S.CSS_SIMULATED, shouldRotateToLandscape: !1 }), Q = async () => a(async () => {
77
- const e = d.getAllElements();
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 = Z(y, g.value), n = await b.exitFullscreen(
93
+ const t = ie(p, P.value), n = await k.exitFullscreen(
81
94
  e.view,
82
- y,
95
+ p,
83
96
  t
84
97
  );
85
- return n.mode === S.CSS_SIMULATED && (i.value = !1), n.success || console.error("Fullscreen exit failed:", n.error), E.value = !1, n;
86
- }, "Exit fullscreen", { success: !1, mode: S.CSS_SIMULATED, shouldRotateToLandscape: !1 }), X = async () => a(async () => {
87
- const e = d.getVideoElement();
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 U(), await e.requestPictureInPicture(), !0;
93
- }, "Request picture-in-picture", !1), $ = async () => a(async () => {
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) => a(async () => {
98
- if (!u.instance)
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 u.instance.callExperimentalAPI(
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
- ), v.value || (v.value = !0), p.value = e, !0;
109
- }, "Switch resolution", !1), z = async (e) => a(async () => {
110
- if (!u.instance)
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 u.instance.callExperimentalAPI(
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", []), J = async (e, t = !0) => {
133
+ }, "Get resolution list", []), K = async (e, t = !0) => {
121
134
  try {
122
- const n = await z(e);
123
- if (h.value = n, n.length === x.FIRST_INDEX) {
124
- console.warn("[Resolution] No resolutions available for room:", e), p.value = void 0;
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 s = n[x.FIRST_INDEX];
128
- p.value = s, t && await A(s);
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
- }, O = async (e) => a(async () => {
145
+ }, R = async (e) => s(async () => {
133
146
  var t;
134
- if (e < l.MIN_VOLUME || e > l.MAX_VOLUME)
135
- throw new Error(`Volume value must be between ${l.MIN_VOLUME}-${l.MAX_VOLUME}`);
136
- return await ((t = u.instance) == null ? void 0 : t.setAudioPlayoutVolume({ volume: e })), m.value = e, I = e, F.value = e == l.MUTE_VOLUME, !0;
137
- }, "Set volume", !1), G = async (e) => a(async () => {
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 = l.MUTE_VOLUME) : t = I || l.DEFAULT_VOLUME, await ((n = u.instance) == null ? void 0 : n.setAudioPlayoutVolume({ volume: t })), m.value = t, F.value = e, !0;
141
- }, "Set mute", !1), Y = async (e) => a(async () => (V.value = e, !0), "Change fill mode", !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 = d.getAllElements();
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), y !== "desktop" && P.unlockOrientation().catch(() => {
149
- }), E.value = !1;
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
- }, j = () => {
166
+ }, Z = () => {
154
167
  const e = () => {
155
- const n = !!document.fullscreenElement, s = i.value;
156
- i.value = n, s && !n && _();
168
+ const n = !!document.fullscreenElement, a = l.value;
169
+ l.value = n, a && !n && U();
157
170
  };
158
- c.addListener("fullscreenchange", document, "fullscreenchange", e), c.addListener("webkitfullscreenchange", document, "webkitfullscreenchange", e), c.addListener("mozfullscreenchange", document, "mozfullscreenchange", e), c.addListener("MSFullscreenChange", document, "MSFullscreenChange", e);
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" && i.value && (document.fullscreenElement || (i.value = !1, _()));
173
+ document.visibilityState === "visible" && l.value && (document.fullscreenElement || (l.value = !1, U()));
161
174
  };
162
- c.addListener("visibilitychange", document, "visibilitychange", t);
163
- }, U = () => {
164
- const e = d.getVideoElement();
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
- L.value = !0;
183
+ E.value = !0;
171
184
  }, n = () => {
172
- L.value = !1, setTimeout(T, ie.PIP_RESUME_DELAY);
185
+ E.value = !1;
173
186
  };
174
- c.addListener("enterpictureinpicture", e, "enterpictureinpicture", t), c.addListener("leavepictureinpicture", e, "leavepictureinpicture", n);
175
- }, H = () => {
176
- P.removeOrientationListener(R), c.removeAllListeners();
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 j(), U(), P.addOrientationListener(R, k), B(
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 && (v.value = !0, h.value = [], p.value = void 0, await O(m.value), await J(e, !1), console.log("[PlayerControl] State after entering room:", {
185
- isPlaying: v.value,
186
- currentFillMode: V.value,
187
- isFullscreen: i.value,
188
- isLandscapeStyleMode: E.value,
189
- isPictureInPicture: L.value,
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: h.value,
192
- currentResolution: p.value
193
- }));
213
+ resolutionList: L.value,
214
+ currentResolution: y.value
215
+ })));
194
216
  }
195
- ), {
196
- isPlaying: v,
197
- currentFillMode: V,
198
- isFullscreen: i,
199
- isLandscapeStyleMode: E,
200
- isPictureInPicture: L,
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: F,
203
- resolutionList: h,
204
- currentResolution: p,
205
- resume: T,
206
- pause: D,
207
- requestFullscreen: q,
208
- exitFullscreen: Q,
209
- requestPictureInPicture: X,
210
- exitPictureInPicture: $,
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: O,
213
- setMute: G,
214
- changeFillMode: Y,
215
- cleanup: H
238
+ setVolume: R,
239
+ setMute: Y,
240
+ changeFillMode: W,
241
+ cleanup: ee
216
242
  };
217
243
  }
218
244
  export {
219
- ae as FillMode,
220
- se as Resolution,
221
- pe as usePlayerControlState
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"), e.video === null && t.push("video"), {
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 l of v)
104
- l.type === "childList" && l.addedNodes.forEach((a) => {
105
- if (a.nodeName === "VIDEO") {
106
- const n = a, u = n.onvolumechange;
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