@realsee/live 0.5.0-alpha.10 → 0.5.0-alpha.13
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/live/createLiveReact.d.ts +2 -2
- package/dist/realsee-live.cjs.development.js +19 -19
- package/dist/realsee-live.cjs.development.js.map +1 -1
- package/dist/realsee-live.cjs.production.js +1 -1
- package/dist/realsee-live.cjs.production.js.map +1 -1
- package/dist/realsee-live.esm.js +19 -19
- package/dist/realsee-live.esm.js.map +1 -1
- package/dist/realsee-live.umd.development.js +494 -413
- package/dist/realsee-live.umd.development.js.map +1 -1
- package/dist/realsee-live.umd.production.js +1 -1
- package/dist/realsee-live.umd.production.js.map +1 -1
- package/docs/modules.html +5 -5
- package/package.json +1 -1
package/dist/realsee-live.esm.js
CHANGED
|
@@ -2255,11 +2255,11 @@ function createLiveReact(options) {
|
|
|
2255
2255
|
* @deprecated
|
|
2256
2256
|
* @returns
|
|
2257
2257
|
*/
|
|
2258
|
-
const unsafe__useLiveInstance = () =>
|
|
2258
|
+
const unsafe__useLiveInstance = () => live;
|
|
2259
2259
|
/**
|
|
2260
2260
|
* 使用rtc实例
|
|
2261
2261
|
*/
|
|
2262
|
-
const useRTCInstance = () =>
|
|
2262
|
+
const useRTCInstance = () => live.$RTC;
|
|
2263
2263
|
/**
|
|
2264
2264
|
* 不建议这样使用
|
|
2265
2265
|
* @deprecated
|
|
@@ -2269,7 +2269,7 @@ function createLiveReact(options) {
|
|
|
2269
2269
|
/**
|
|
2270
2270
|
* 带看连接操作
|
|
2271
2271
|
*/
|
|
2272
|
-
const useConnect = (options) => __awaiter(this, void 0, void 0, function* () { return yield
|
|
2272
|
+
const useConnect = () => (options) => __awaiter(this, void 0, void 0, function* () { return yield live.connect(options); });
|
|
2273
2273
|
/**
|
|
2274
2274
|
*
|
|
2275
2275
|
* @param name
|
|
@@ -2293,17 +2293,17 @@ function createLiveReact(options) {
|
|
|
2293
2293
|
*/
|
|
2294
2294
|
function useLiveAction() {
|
|
2295
2295
|
const live = useLiveInstance();
|
|
2296
|
-
const connect =
|
|
2297
|
-
const toggleMicro =
|
|
2298
|
-
const broadcast =
|
|
2299
|
-
const exit =
|
|
2300
|
-
const kick =
|
|
2301
|
-
const forbidMicro =
|
|
2302
|
-
const forbidSync =
|
|
2303
|
-
const getFramesByKey =
|
|
2304
|
-
const sendKeyframe =
|
|
2305
|
-
const setSelfInfo =
|
|
2306
|
-
const updateStatus =
|
|
2296
|
+
const connect = (options) => __awaiter(this, void 0, void 0, function* () { return yield live.connect(options); });
|
|
2297
|
+
const toggleMicro = (microStatus) => live.toggleMicro(microStatus);
|
|
2298
|
+
const broadcast = (data, toUserIds, timeout = 0) => __awaiter(this, void 0, void 0, function* () { return yield live.broadcast(data, toUserIds, timeout); });
|
|
2299
|
+
const exit = () => __awaiter(this, void 0, void 0, function* () { return yield live.exit(); });
|
|
2300
|
+
const kick = (toUserIds) => __awaiter(this, void 0, void 0, function* () { return yield live.kick(toUserIds); });
|
|
2301
|
+
const forbidMicro = (micro, toUserIds = []) => __awaiter(this, void 0, void 0, function* () { return yield live.forbidMicro(micro, toUserIds); });
|
|
2302
|
+
const forbidSync = (sync, toUserIds = []) => live.forbidSync(sync, toUserIds);
|
|
2303
|
+
const getFramesByKey = (key) => live.getFramesByKey(key);
|
|
2304
|
+
const sendKeyframe = (key, frame) => live.sendKeyframe(key, frame);
|
|
2305
|
+
const setSelfInfo = (userInfo) => live.setSelfInfo(userInfo);
|
|
2306
|
+
const updateStatus = (evtType, atnType, status, toUserIds) => live.updateStatus(evtType, atnType, status, toUserIds);
|
|
2307
2307
|
return {
|
|
2308
2308
|
connect,
|
|
2309
2309
|
broadcast,
|
|
@@ -2357,11 +2357,11 @@ function createLiveReact(options) {
|
|
|
2357
2357
|
}
|
|
2358
2358
|
function useRTCAction() {
|
|
2359
2359
|
const live = useLiveInstance();
|
|
2360
|
-
const join =
|
|
2361
|
-
const quit =
|
|
2362
|
-
const shock =
|
|
2363
|
-
const toggleMicro =
|
|
2364
|
-
const detectMicro =
|
|
2360
|
+
const join = (options) => live.$RTC.join(options);
|
|
2361
|
+
const quit = () => live.$RTC.quit();
|
|
2362
|
+
const shock = () => { var _a, _b; return (_b = (_a = live.$RTC).shock) === null || _b === void 0 ? void 0 : _b.call(_a); };
|
|
2363
|
+
const toggleMicro = (flag) => live.$RTC.toggleMicro(flag);
|
|
2364
|
+
const detectMicro = () => live.$RTC.detectMicro();
|
|
2365
2365
|
return {
|
|
2366
2366
|
join,
|
|
2367
2367
|
quit,
|