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,171 +1,188 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useUIKit as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { isMobile as
|
|
7
|
-
import { _ as
|
|
8
|
-
const
|
|
1
|
+
import ce from "./AudioControl.js";
|
|
2
|
+
import { defineComponent as re, ref as h, onMounted as ue, onBeforeUnmount as ae, createBlock as y, openBlock as v, Transition as ie, withCtx as de, withDirectives as me, createElementVNode as r, normalizeClass as P, unref as t, createElementBlock as A, createCommentVNode as N, createVNode as p, vShow as ve } from "vue";
|
|
3
|
+
import { useUIKit as fe, IconPause as he, IconPlay as pe, IconPictureInPicture as ye, IconFullScreen as Pe, TUIToast as C, TOAST_TYPE as _ } from "@tencentcloud/uikit-base-component-vue3";
|
|
4
|
+
import Ce from "./MultiResolution.js";
|
|
5
|
+
import { usePlayerControlState as _e } from "./PlayerControlState.js";
|
|
6
|
+
import { isMobile as u } from "../../../utils/env.js";
|
|
7
|
+
import { _ as Ee } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
const Te = { class: "control-buttons" }, Le = ["title"], ge = { class: "right-controls" }, Ie = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "control-btn audio-control-btn"
|
|
11
|
+
}, Me = ["title"], we = ["title"], be = 3e3, Se = /* @__PURE__ */ re({
|
|
9
12
|
__name: "PlayerControl",
|
|
10
13
|
props: {
|
|
11
14
|
isLandscapeStyleMode: { type: Boolean }
|
|
12
15
|
},
|
|
13
|
-
setup(
|
|
16
|
+
setup(x) {
|
|
14
17
|
const {
|
|
15
|
-
isMuted:
|
|
16
|
-
isPlaying:
|
|
17
|
-
isFullscreen:
|
|
18
|
-
isPictureInPicture:
|
|
19
|
-
currentVolume:
|
|
20
|
-
pause:
|
|
21
|
-
resume:
|
|
22
|
-
requestPictureInPicture:
|
|
23
|
-
exitPictureInPicture:
|
|
24
|
-
requestFullscreen:
|
|
25
|
-
exitFullscreen:
|
|
26
|
-
setVolume:
|
|
27
|
-
setMute:
|
|
28
|
-
cleanup:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
18
|
+
isMuted: E,
|
|
19
|
+
isPlaying: a,
|
|
20
|
+
isFullscreen: T,
|
|
21
|
+
isPictureInPicture: c,
|
|
22
|
+
currentVolume: V,
|
|
23
|
+
pause: F,
|
|
24
|
+
resume: R,
|
|
25
|
+
requestPictureInPicture: z,
|
|
26
|
+
exitPictureInPicture: B,
|
|
27
|
+
requestFullscreen: D,
|
|
28
|
+
exitFullscreen: O,
|
|
29
|
+
setVolume: U,
|
|
30
|
+
setMute: X,
|
|
31
|
+
cleanup: Y,
|
|
32
|
+
isSafari: L,
|
|
33
|
+
isTcPlayer: g
|
|
34
|
+
} = _e(), q = x, { t: n } = fe(), s = h(), l = h(!1), i = h(null), H = () => {
|
|
35
|
+
if (c.value) {
|
|
36
|
+
C({
|
|
37
|
+
type: _.WARNING,
|
|
38
|
+
message: n('Not allow to "Pause" in picture-in-picture mode')
|
|
39
|
+
});
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
a.value ? F() : R();
|
|
43
|
+
}, K = async () => {
|
|
44
|
+
if (!a.value && !c.value) {
|
|
45
|
+
C({
|
|
46
|
+
type: _.WARNING,
|
|
47
|
+
message: n('Not allow to "Picture in Picture" in non-playing mode')
|
|
48
|
+
});
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
32
51
|
let e = !1;
|
|
33
|
-
|
|
34
|
-
type:
|
|
35
|
-
message:
|
|
52
|
+
c.value ? e = await B() : e = await z(), e || C({
|
|
53
|
+
type: _.ERROR,
|
|
54
|
+
message: n("The system does not support picture-in-picture mode")
|
|
36
55
|
});
|
|
37
|
-
},
|
|
38
|
-
console.log("handleFullscreen"),
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
await
|
|
56
|
+
}, G = () => {
|
|
57
|
+
console.log("handleFullscreen"), T.value ? O() : D();
|
|
58
|
+
}, W = async (e) => {
|
|
59
|
+
u && f(), await U(e);
|
|
60
|
+
}, j = async () => {
|
|
61
|
+
await X(!E.value);
|
|
62
|
+
}, f = () => {
|
|
63
|
+
d(), i.value = window.setTimeout(() => {
|
|
64
|
+
l.value = !1, i.value = null;
|
|
65
|
+
}, be);
|
|
43
66
|
}, d = () => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}, Y = () => {
|
|
54
|
-
if (!r && n.value) {
|
|
55
|
-
const { parentElement: e } = n.value;
|
|
56
|
-
e && (e.addEventListener("mouseover", y), e.addEventListener("mouseout", E));
|
|
67
|
+
i.value && (clearTimeout(i.value), i.value = null);
|
|
68
|
+
}, I = () => {
|
|
69
|
+
d(), l.value = !0;
|
|
70
|
+
}, M = () => {
|
|
71
|
+
f();
|
|
72
|
+
}, J = () => {
|
|
73
|
+
if (!u && s.value) {
|
|
74
|
+
const { parentElement: e } = s.value;
|
|
75
|
+
e && (e.addEventListener("mouseover", I), e.addEventListener("mouseout", M));
|
|
57
76
|
}
|
|
58
|
-
},
|
|
59
|
-
if (!
|
|
60
|
-
const { parentElement: e } =
|
|
61
|
-
e && (e.removeEventListener("mouseover",
|
|
77
|
+
}, Q = () => {
|
|
78
|
+
if (!u && s.value) {
|
|
79
|
+
const { parentElement: e } = s.value;
|
|
80
|
+
e && (e.removeEventListener("mouseover", I), e.removeEventListener("mouseout", M));
|
|
62
81
|
}
|
|
63
|
-
},
|
|
64
|
-
var
|
|
65
|
-
return ((
|
|
66
|
-
},
|
|
67
|
-
const
|
|
68
|
-
return (
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
},
|
|
82
|
+
}, m = h(null), Z = (e, o) => Math.sqrt((o.clientX - e.x) ** 2 + (o.clientY - e.y) ** 2), $ = (e) => {
|
|
83
|
+
var o;
|
|
84
|
+
return ((o = s.value) == null ? void 0 : o.contains(e)) || !1;
|
|
85
|
+
}, ee = (e) => {
|
|
86
|
+
const o = document.getElementById("live-core-view-container");
|
|
87
|
+
return (o == null ? void 0 : o.contains(e)) || !1;
|
|
88
|
+
}, te = () => {
|
|
89
|
+
d(), f();
|
|
90
|
+
}, oe = () => {
|
|
91
|
+
l.value = !l.value, l.value && f();
|
|
92
|
+
}, w = (e) => {
|
|
74
93
|
if (e.touches.length === 1) {
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
x:
|
|
78
|
-
y:
|
|
94
|
+
const o = e.touches[0];
|
|
95
|
+
m.value = {
|
|
96
|
+
x: o.clientX,
|
|
97
|
+
y: o.clientY
|
|
79
98
|
};
|
|
80
99
|
}
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
|
|
100
|
+
}, b = (e) => {
|
|
101
|
+
s.value && s.value.contains(e.target) && d();
|
|
102
|
+
}, S = (e) => {
|
|
103
|
+
if (!m.value)
|
|
84
104
|
return;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return;
|
|
89
|
-
const t = e.changedTouches[0];
|
|
90
|
-
if (H(i.value, t) > 20) {
|
|
91
|
-
i.value = null;
|
|
105
|
+
const o = e.changedTouches[0];
|
|
106
|
+
if (Z(m.value, o) > 20) {
|
|
107
|
+
m.value = null;
|
|
92
108
|
return;
|
|
93
109
|
}
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
|
|
110
|
+
const k = e.target;
|
|
111
|
+
$(k) ? te() : ee(k) ? oe() : l.value = !1, m.value = null;
|
|
112
|
+
}, ne = () => {
|
|
113
|
+
u && (document.addEventListener("touchstart", w, !0), document.addEventListener("touchmove", b, !0), document.addEventListener("touchend", S, !0));
|
|
114
|
+
}, se = () => {
|
|
115
|
+
u && (document.removeEventListener("touchstart", w, !0), document.removeEventListener("touchmove", b, !0), document.removeEventListener("touchend", S, !0));
|
|
116
|
+
}, le = () => {
|
|
117
|
+
se(), Q(), d();
|
|
102
118
|
};
|
|
103
|
-
return
|
|
104
|
-
|
|
105
|
-
}),
|
|
106
|
-
|
|
107
|
-
}), (e,
|
|
108
|
-
default:
|
|
109
|
-
|
|
119
|
+
return ue(() => {
|
|
120
|
+
ne(), J();
|
|
121
|
+
}), ae(() => {
|
|
122
|
+
le(), Y();
|
|
123
|
+
}), (e, o) => (v(), y(ie, { name: "player-control" }, {
|
|
124
|
+
default: de(() => [
|
|
125
|
+
me(r("div", {
|
|
110
126
|
ref_key: "playerControlRef",
|
|
111
|
-
ref:
|
|
112
|
-
class:
|
|
127
|
+
ref: s,
|
|
128
|
+
class: P([
|
|
113
129
|
"playback-controls",
|
|
114
|
-
|
|
115
|
-
{ "mobile-landscape-mode":
|
|
130
|
+
t(u) ? "mobile-mode" : "pc-mode",
|
|
131
|
+
{ "mobile-landscape-mode": q.isLandscapeStyleMode }
|
|
116
132
|
])
|
|
117
133
|
}, [
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
134
|
+
r("div", Te, [
|
|
135
|
+
!t(L) || !t(g) ? (v(), A("span", {
|
|
136
|
+
key: 0,
|
|
137
|
+
class: P(["control-btn play-pause-btn", { disabled: t(c) }]),
|
|
138
|
+
title: t(a) ? t(n)("Pause") : t(n)("Play"),
|
|
139
|
+
onClick: H
|
|
123
140
|
}, [
|
|
124
|
-
|
|
141
|
+
t(a) ? (v(), y(t(he), {
|
|
125
142
|
key: 0,
|
|
126
143
|
size: "20"
|
|
127
|
-
})) : (
|
|
144
|
+
})) : (v(), y(t(pe), {
|
|
128
145
|
key: 1,
|
|
129
146
|
size: "20"
|
|
130
147
|
}))
|
|
131
|
-
],
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
148
|
+
], 10, Le)) : N("", !0),
|
|
149
|
+
o[0] || (o[0] = r("div", { class: "center-controls" }, null, -1)),
|
|
150
|
+
r("div", ge, [
|
|
151
|
+
p(Ce),
|
|
152
|
+
!t(L) || !t(g) ? (v(), A("span", Ie, [
|
|
153
|
+
p(ce, {
|
|
137
154
|
class: "audio-control-icon",
|
|
138
155
|
"icon-size": 20,
|
|
139
|
-
volume:
|
|
140
|
-
"is-muted":
|
|
141
|
-
onVolumeChange:
|
|
142
|
-
onMuteChange:
|
|
156
|
+
volume: t(V),
|
|
157
|
+
"is-muted": t(E),
|
|
158
|
+
onVolumeChange: W,
|
|
159
|
+
onMuteChange: j
|
|
143
160
|
}, null, 8, ["volume", "is-muted"])
|
|
144
|
-
]),
|
|
145
|
-
|
|
146
|
-
class: "control-btn",
|
|
147
|
-
title:
|
|
148
|
-
onClick:
|
|
161
|
+
])) : N("", !0),
|
|
162
|
+
r("span", {
|
|
163
|
+
class: P(["control-btn", { disabled: !t(a) && !t(c) }]),
|
|
164
|
+
title: t(c) ? t(n)("Exit Picture in Picture") : t(n)("Picture in Picture"),
|
|
165
|
+
onClick: K
|
|
149
166
|
}, [
|
|
150
|
-
|
|
151
|
-
],
|
|
152
|
-
|
|
167
|
+
p(t(ye), { size: "20" })
|
|
168
|
+
], 10, Me),
|
|
169
|
+
r("span", {
|
|
153
170
|
class: "control-btn fullscreen-btn",
|
|
154
|
-
title:
|
|
155
|
-
onClick:
|
|
171
|
+
title: t(T) ? t(n)("Exit Fullscreen") : t(n)("Fullscreen"),
|
|
172
|
+
onClick: G
|
|
156
173
|
}, [
|
|
157
|
-
|
|
158
|
-
], 8,
|
|
174
|
+
p(t(Pe), { size: "20" })
|
|
175
|
+
], 8, we)
|
|
159
176
|
])
|
|
160
177
|
])
|
|
161
178
|
], 2), [
|
|
162
|
-
[
|
|
179
|
+
[ve, l.value]
|
|
163
180
|
])
|
|
164
181
|
]),
|
|
165
182
|
_: 1
|
|
166
183
|
}));
|
|
167
184
|
}
|
|
168
|
-
}),
|
|
185
|
+
}), De = /* @__PURE__ */ Ee(Se, [["__scopeId", "data-v-01f3a581"]]);
|
|
169
186
|
export {
|
|
170
|
-
|
|
187
|
+
De as default
|
|
171
188
|
};
|
|
@@ -7,10 +7,10 @@ export declare enum FillMode {
|
|
|
7
7
|
FILL = "fill"
|
|
8
8
|
}
|
|
9
9
|
export declare enum Resolution {
|
|
10
|
-
R360P,
|
|
11
|
-
R540P,
|
|
12
|
-
R720P,
|
|
13
|
-
R1080P
|
|
10
|
+
R360P = 1,
|
|
11
|
+
R540P = 2,
|
|
12
|
+
R720P = 3,
|
|
13
|
+
R1080P = 4
|
|
14
14
|
}
|
|
15
15
|
export interface PlayerControlState {
|
|
16
16
|
isPlaying: Ref<boolean>;
|
|
@@ -20,6 +20,8 @@ export interface PlayerControlState {
|
|
|
20
20
|
isPictureInPicture: Ref<boolean>;
|
|
21
21
|
currentVolume: Ref<number>;
|
|
22
22
|
isMuted: Ref<boolean>;
|
|
23
|
+
isSafari: Ref<boolean>;
|
|
24
|
+
isTcPlayer: Ref<boolean>;
|
|
23
25
|
resolutionList: Ref<Resolution[]>;
|
|
24
26
|
currentResolution: Ref<Resolution | undefined>;
|
|
25
27
|
resume: () => Promise<boolean>;
|