@realsee/live 0.7.3 → 0.7.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.
- package/README.md +209 -87
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +644 -87
- package/dist/index.es.js.map +1 -1
- package/dist/live/controller.d.ts +163 -42
- package/dist/live/createLive.d.ts +35 -3
- package/dist/live/createLiveReact.d.ts +51 -3
- package/dist/live/live.d.ts +501 -50
- package/dist/rtc/BrowserRTC.d.ts +63 -0
- package/dist/rtc/BrowserRTC4Chime.d.ts +38 -2
- package/dist/rtc/CoreRTC.d.ts +65 -1
- package/dist/rtc/VRWebViewRTC.d.ts +56 -6
- package/dist/typings/live/EventType.d.ts +58 -10
- package/dist/typings/live/GetVoiceSign.d.ts +27 -7
- package/dist/typings/live/UserInfo.d.ts +70 -0
- package/dist/typings/rtc/eventType.d.ts +55 -8
- package/dist/utils/appendUri.d.ts +17 -0
- package/dist/utils/uuid.d.ts +11 -1
- package/docs/assets/highlight.css +34 -6
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/BrowserRTC.html +50 -22
- package/docs/classes/BrowserRTC4Chime.html +51 -23
- package/docs/classes/CoreRTC.html +28 -23
- package/docs/classes/Live.html +197 -41
- package/docs/classes/Subscribe.html +36 -0
- package/docs/classes/VRWebViewRTC.html +32 -13
- package/docs/enums/MemUserStatus.html +10 -2
- package/docs/functions/GetVoiceSignFn.html +20 -4
- package/docs/functions/createLive.html +9 -2
- package/docs/functions/createLiveReact.html +110 -17
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +80 -118
- package/docs/interfaces/LiveOptions.html +20 -4
- package/docs/interfaces/Permission.html +18 -2
- package/docs/interfaces/RTCProtocol.html +6 -6
- package/docs/interfaces/SubscribeMixinType.emit.html +1 -0
- package/docs/interfaces/SubscribeMixinType.hasListener.html +1 -0
- package/docs/interfaces/SubscribeMixinType.off.html +1 -0
- package/docs/interfaces/SubscribeMixinType.on.html +1 -0
- package/docs/interfaces/SubscribeMixinType.once.html +1 -0
- package/docs/interfaces/VRWebViewRTCOptions.html +20 -4
- package/docs/modules/SubscribeMixinType.html +6 -0
- package/docs/modules.html +4 -1
- package/docs/types/EventMap.html +1 -0
- package/docs/types/EventType.html +1 -1
- package/docs/types/GetVoiceSign.html +2 -1
- package/docs/types/KeyframeEventType.html +1 -1
- package/docs/types/LiveEventType.html +38 -12
- package/docs/types/LiveProviderPropTypes.html +5 -1
- package/docs/types/RTCEventType.html +29 -7
- package/docs/types/UserInfo.html +1 -1
- package/docs/types/UserInfoExt.html +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,41 @@
|
|
|
1
1
|
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LiveEventType | 如视 Live SDK</title><meta name="description" content="Documentation for 如视 Live SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视 Live SDK</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">如视 Live SDK</a></li><li><a href="LiveEventType.html">LiveEventType</a></li></ul><h1> Type AliasLiveEventType<KeyframesSnapshot></h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Live<wbr/>Event<wbr/>Type</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="LiveEventType.html#KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-call-signature">broadcast</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">evtMsg</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span>, <span class="tsd-kind-parameter">frontRequestId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">builtinEvent</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">builtinMsg</span><span class="tsd-signature-symbol">: </span><a href="BuiltinMsg.html" class="tsd-signature-type tsd-kind-type-alias">BuiltinMsg</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">error</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">liveMsg</span><span class="tsd-signature-symbol">: </span><a href="LiveMsg.html" class="tsd-signature-type tsd-kind-type-alias">LiveMsg</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">keyframes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">keyframes</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="LiveEventType.html#KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">></span>, <span class="tsd-kind-parameter">frontRequestId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">kickOut</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">readyKeyframeSync</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">lastKeyframe</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="LiveEventType.html#KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">roomChange</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">builtinMsg</span><span class="tsd-signature-symbol">: </span><a href="BuiltinMsg.html" class="tsd-signature-type tsd-kind-type-alias">BuiltinMsg</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">selfInfoUpdate</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">userInfo</span><span class="tsd-signature-symbol">: </span><a href="UserInfo.html" class="tsd-signature-type tsd-kind-type-alias">UserInfo</a>, <span class="tsd-kind-parameter">frontRequestId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">stateChange</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">state</span><span class="tsd-signature-symbol">: </span><a href="../enums/LiveState.html" class="tsd-signature-type tsd-kind-enum">LiveState</a>, <span class="tsd-kind-parameter">prevState</span><span class="tsd-signature-symbol">?: </span><a href="../enums/LiveState.html" class="tsd-signature-type tsd-kind-enum">LiveState</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">userChange</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">builtinMsg</span><span class="tsd-signature-symbol">: </span><a href="BuiltinMsg.html" class="tsd-signature-type tsd-kind-type-alias">BuiltinMsg</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">userListUpdate</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">userList</span><span class="tsd-signature-symbol">: </span><a href="UserInfo.html" class="tsd-signature-type tsd-kind-type-alias">UserInfo</a><span class="tsd-signature-symbol">[]</span>, <span class="tsd-kind-parameter">frontRequestId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-comment tsd-typography"><p>带看事件列表</p>
|
|
2
|
-
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="KeyframesSnapshot" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">KeyframesSnapshot</span></span></li></ul></section><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-method">broadcast</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.broadcast.broadcast-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">broadcast</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">evtMsg</span>, <span class="tsd-kind-parameter">frontRequestId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.broadcast.broadcast-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p
|
|
3
|
-
|
|
4
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">
|
|
5
|
-
</div><div class="tsd-
|
|
6
|
-
</div><div class="tsd-
|
|
7
|
-
</
|
|
2
|
+
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="KeyframesSnapshot" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">KeyframesSnapshot</span></span></li></ul></section><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-method">broadcast</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.broadcast.broadcast-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">broadcast</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">evtMsg</span>, <span class="tsd-kind-parameter">frontRequestId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.broadcast.broadcast-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>收到其他用户的广播消息事件</p>
|
|
3
|
+
<p>当收到其他用户通过 broadcast 方法发送的自定义消息时触发。</p>
|
|
4
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">evtMsg</span>: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></span><div class="tsd-comment tsd-typography"><p>广播消息数据对象</p>
|
|
5
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">frontRequestId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>前端请求ID,用于匹配请求和响应</p>
|
|
6
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example" class="tsd-anchor"></a>Example<a href="#Example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-5">live</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">'broadcast'</span><span class="hl-2">, (</span><span class="hl-5">data</span><span class="hl-2">, </span><span class="hl-5">requestId</span><span class="hl-2">) </span><span class="hl-6">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">'收到广播:'</span><span class="hl-2">, </span><span class="hl-5">data</span><span class="hl-2">, </span><span class="hl-3">'请求ID:'</span><span class="hl-2">, </span><span class="hl-5">requestId</span><span class="hl-2">)</span><br/><span class="hl-2">})</span>
|
|
7
|
+
</code><button type="button">Copy</button></pre>
|
|
8
|
+
|
|
9
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in typings/live/EventType.ts:86</li></ul></aside></li></ul></li><li class="tsd-parameter"><h5><span class="tsd-kind-method">builtin<wbr/>Event</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.builtinEvent.builtinEvent-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">builtin<wbr/>Event</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">builtinMsg</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.builtinEvent.builtinEvent-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>内置消息事件</p>
|
|
10
|
+
<p>当收到任何内置消息时触发,包括用户变化和房间变化。</p>
|
|
11
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">builtinMsg</span>: <a href="BuiltinMsg.html" class="tsd-signature-type tsd-kind-type-alias">BuiltinMsg</a></span><div class="tsd-comment tsd-typography"><p>内置消息对象</p>
|
|
12
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-1" class="tsd-anchor"></a>Example<a href="#Example-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-5">live</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">'builtinEvent'</span><span class="hl-2">, (</span><span class="hl-5">msg</span><span class="hl-2">) </span><span class="hl-6">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">'内置消息:'</span><span class="hl-2">, </span><span class="hl-5">msg</span><span class="hl-2">.</span><span class="hl-5">event_type</span><span class="hl-2">, </span><span class="hl-5">msg</span><span class="hl-2">.</span><span class="hl-5">action</span><span class="hl-2">)</span><br/><span class="hl-2">})</span>
|
|
13
|
+
</code><button type="button">Copy</button></pre>
|
|
14
|
+
|
|
15
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in typings/live/EventType.ts:36</li></ul></aside></li></ul></li><li class="tsd-parameter"><h5><span class="tsd-kind-method">error</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.error.error-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">error</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">liveMsg</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.error.error-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>异常消息:不符合规范。</p>
|
|
16
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">liveMsg</span>: <a href="LiveMsg.html" class="tsd-signature-type tsd-kind-type-alias">LiveMsg</a></span><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/EventType.ts:117</li></ul></aside></li></ul></li><li class="tsd-parameter"><h5><span class="tsd-kind-method">keyframes</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.keyframes.keyframes-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">keyframes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">keyframes</span>, <span class="tsd-kind-parameter">frontRequestId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.keyframes.keyframes-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>获取其他用户输送的帧数据:根据此帧数据更新UI状态。</p>
|
|
17
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">keyframes</span>: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="LiveEventType.html#KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">></span></span><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">frontRequestId</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/EventType.ts:98</li></ul></aside></li></ul></li><li class="tsd-parameter"><h5><span class="tsd-kind-method">kick<wbr/>Out</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.kickOut.kickOut-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">kick<wbr/>Out</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.kickOut.kickOut-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>被踢出房间</p>
|
|
18
|
+
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/EventType.ts:112</li></ul></aside></li></ul></li><li class="tsd-parameter"><h5><span class="tsd-kind-method">ready<wbr/>Keyframe<wbr/>Sync</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.readyKeyframeSync.readyKeyframeSync-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">ready<wbr/>Keyframe<wbr/>Sync</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">lastKeyframe</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.readyKeyframeSync.readyKeyframeSync-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>带看已经就绪,可以发送帧数据。</p>
|
|
8
19
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">lastKeyframe</span>: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="LiveEventType.html#KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">></span></span><div class="tsd-comment tsd-typography"><p>带看最后一帧数据(链接切换、断网等重连恢复上次会话帧状态),你可以通过此数据拉齐当前UI状态。</p>
|
|
9
20
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Deprecated"><h4 class="tsd-anchor-link"><a id="Deprecated" class="tsd-anchor"></a>Deprecated<a href="#Deprecated" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>此事件已废弃,请使用 <code>keyframes</code> 事件替代,最后的帧数据会通过 <code>keyframes</code> 事件发送,同时 keyframes 对象在 ready 后会自动更新。</p>
|
|
10
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in typings/live/EventType.ts:
|
|
11
|
-
|
|
12
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">
|
|
13
|
-
</div><div class="tsd-
|
|
14
|
-
</
|
|
15
|
-
|
|
21
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in typings/live/EventType.ts:93</li></ul></aside></li></ul></li><li class="tsd-parameter"><h5><span class="tsd-kind-method">room<wbr/>Change</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.roomChange.roomChange-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">room<wbr/>Change</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">builtinMsg</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.roomChange.roomChange-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>房间信息改变事件</p>
|
|
22
|
+
<p>当房间信息发生变化时触发,是 builtinEvent 的子集。</p>
|
|
23
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">builtinMsg</span>: <a href="BuiltinMsg.html" class="tsd-signature-type tsd-kind-type-alias">BuiltinMsg</a></span><div class="tsd-comment tsd-typography"><p>内置消息对象,event_type 为 RoomChange</p>
|
|
24
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-2" class="tsd-anchor"></a>Example<a href="#Example-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-5">live</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">'roomChange'</span><span class="hl-2">, (</span><span class="hl-5">msg</span><span class="hl-2">) </span><span class="hl-6">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">if</span><span class="hl-2"> (</span><span class="hl-5">msg</span><span class="hl-2">.</span><span class="hl-5">action</span><span class="hl-2"> === </span><span class="hl-5">BuiltinActionType</span><span class="hl-2">.</span><span class="hl-5">RoomClose</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">'房间已关闭'</span><span class="hl-2">)</span><br/><span class="hl-2"> }</span><br/><span class="hl-2">})</span>
|
|
25
|
+
</code><button type="button">Copy</button></pre>
|
|
26
|
+
|
|
27
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in typings/live/EventType.ts:70</li></ul></aside></li></ul></li><li class="tsd-parameter"><h5><span class="tsd-kind-method">self<wbr/>Info<wbr/>Update</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.selfInfoUpdate.selfInfoUpdate-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">self<wbr/>Info<wbr/>Update</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">userInfo</span>, <span class="tsd-kind-parameter">frontRequestId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.selfInfoUpdate.selfInfoUpdate-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>个人信息发生更新。</p>
|
|
28
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">userInfo</span>: <a href="UserInfo.html" class="tsd-signature-type tsd-kind-type-alias">UserInfo</a></span><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">frontRequestId</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/EventType.ts:103</li></ul></aside></li></ul></li><li class="tsd-parameter"><h5><span class="tsd-kind-method">state<wbr/>Change</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.stateChange.stateChange-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">state<wbr/>Change</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">state</span>, <span class="tsd-kind-parameter">prevState</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.stateChange.stateChange-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>带看连接状态变化事件</p>
|
|
29
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">state</span>: <a href="../enums/LiveState.html" class="tsd-signature-type tsd-kind-enum">LiveState</a></span><div class="tsd-comment tsd-typography"><p>当前连接状态</p>
|
|
30
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">prevState</span>: <a href="../enums/LiveState.html" class="tsd-signature-type tsd-kind-enum">LiveState</a></span><div class="tsd-comment tsd-typography"><p>之前的连接状态(可选)</p>
|
|
31
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-3" class="tsd-anchor"></a>Example<a href="#Example-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-5">live</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">'stateChange'</span><span class="hl-2">, (</span><span class="hl-5">state</span><span class="hl-2">, </span><span class="hl-5">prevState</span><span class="hl-2">) </span><span class="hl-6">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">`状态从 </span><span class="hl-6">${</span><span class="hl-5">prevState</span><span class="hl-6">}</span><span class="hl-3"> 变为 </span><span class="hl-6">${</span><span class="hl-5">state</span><span class="hl-6">}</span><span class="hl-3">`</span><span class="hl-2">)</span><br/><span class="hl-2">})</span>
|
|
32
|
+
</code><button type="button">Copy</button></pre>
|
|
33
|
+
|
|
34
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in typings/live/EventType.ts:21</li></ul></aside></li></ul></li><li class="tsd-parameter"><h5><span class="tsd-kind-method">user<wbr/>Change</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.userChange.userChange-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">user<wbr/>Change</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">builtinMsg</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.userChange.userChange-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>用户信息改变事件</p>
|
|
35
|
+
<p>当用户信息发生变化时触发,是 builtinEvent 的子集。</p>
|
|
36
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">builtinMsg</span>: <a href="BuiltinMsg.html" class="tsd-signature-type tsd-kind-type-alias">BuiltinMsg</a></span><div class="tsd-comment tsd-typography"><p>内置消息对象,event_type 为 UserChange</p>
|
|
37
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-4" class="tsd-anchor"></a>Example<a href="#Example-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-5">live</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">'userChange'</span><span class="hl-2">, (</span><span class="hl-5">msg</span><span class="hl-2">) </span><span class="hl-6">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">if</span><span class="hl-2"> (</span><span class="hl-5">msg</span><span class="hl-2">.</span><span class="hl-5">action</span><span class="hl-2"> === </span><span class="hl-5">BuiltinActionType</span><span class="hl-2">.</span><span class="hl-5">UserMicroStatus</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">'麦克风状态变化:'</span><span class="hl-2">, </span><span class="hl-5">msg</span><span class="hl-2">.</span><span class="hl-5">data</span><span class="hl-2">.</span><span class="hl-5">status</span><span class="hl-2">)</span><br/><span class="hl-2"> }</span><br/><span class="hl-2">})</span>
|
|
38
|
+
</code><button type="button">Copy</button></pre>
|
|
39
|
+
|
|
40
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in typings/live/EventType.ts:53</li></ul></aside></li></ul></li><li class="tsd-parameter"><h5><span class="tsd-kind-method">user<wbr/>List<wbr/>Update</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.userListUpdate.userListUpdate-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">user<wbr/>List<wbr/>Update</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">userList</span>, <span class="tsd-kind-parameter">frontRequestId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.userListUpdate.userListUpdate-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>用户列表更新。</p>
|
|
41
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">userList</span>: <a href="UserInfo.html" class="tsd-signature-type tsd-kind-type-alias">UserInfo</a><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">frontRequestId</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/EventType.ts:108</li></ul></aside></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/EventType.ts:8</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>如视 Live SDK</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer></footer><div class="overlay"></div></body></html>
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LiveProviderPropTypes | 如视 Live SDK</title><meta name="description" content="Documentation for 如视 Live SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视 Live SDK</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">如视 Live SDK</a></li><li><a href="LiveProviderPropTypes.html">LiveProviderPropTypes</a></li></ul><h1> Type AliasLiveProviderPropTypes<KeyframesSnapshot></h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Live<wbr/>Provider<wbr/>Prop<wbr/>Types</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="LiveProviderPropTypes.html#KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">children</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">React.ReactNode</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">live</span><span class="tsd-signature-symbol">?: </span><a href="../classes/Live.html" class="tsd-signature-type tsd-kind-class">Live</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="LiveProviderPropTypes.html#KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LiveProviderPropTypes | 如视 Live SDK</title><meta name="description" content="Documentation for 如视 Live SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视 Live SDK</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">如视 Live SDK</a></li><li><a href="LiveProviderPropTypes.html">LiveProviderPropTypes</a></li></ul><h1> Type AliasLiveProviderPropTypes<KeyframesSnapshot></h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Live<wbr/>Provider<wbr/>Prop<wbr/>Types</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="LiveProviderPropTypes.html#KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">children</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">React.ReactNode</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">live</span><span class="tsd-signature-symbol">?: </span><a href="../classes/Live.html" class="tsd-signature-type tsd-kind-class">Live</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="LiveProviderPropTypes.html#KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-comment tsd-typography"><p>LiveProvider 组件的属性类型</p>
|
|
2
|
+
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="KeyframesSnapshot" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">KeyframesSnapshot</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></span><div class="tsd-comment tsd-typography"><p>帧数据快照类型</p>
|
|
3
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></section><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">children</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">React.ReactNode</span></h5><div class="tsd-comment tsd-typography"><p>子组件</p>
|
|
4
|
+
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">live</span><span class="tsd-signature-symbol">?: </span><a href="../classes/Live.html" class="tsd-signature-type tsd-kind-class">Live</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="LiveProviderPropTypes.html#KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">></span></h5><div class="tsd-comment tsd-typography"><p>自定义 Live 实例(可选,默认使用内部创建的实例)</p>
|
|
5
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in live/createLiveReact.ts:24</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>如视 Live SDK</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer></footer><div class="overlay"></div></body></html>
|
|
@@ -1,7 +1,29 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>RTCEventType | 如视 Live SDK</title><meta name="description" content="Documentation for 如视 Live SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视 Live SDK</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">如视 Live SDK</a></li><li><a href="RTCEventType.html">RTCEventType</a></li></ul><h1> Type AliasRTCEventType</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">RTCEvent<wbr/>Type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-call-signature">error</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/RTCJoinedInfo.html" class="tsd-signature-type tsd-kind-interface">RTCJoinedInfo</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">joined</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">joinWillStart</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">userVolumes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">userVolumes</span><span class="tsd-signature-symbol">: </span><a href="UserVolume.html" class="tsd-signature-type tsd-kind-type-alias">UserVolume</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">weakNetwork</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-comment tsd-typography"><p>RTC
|
|
2
|
-
|
|
3
|
-
</div><div class="tsd-
|
|
4
|
-
</div><
|
|
5
|
-
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"
|
|
6
|
-
</
|
|
7
|
-
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>RTCEventType | 如视 Live SDK</title><meta name="description" content="Documentation for 如视 Live SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视 Live SDK</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">如视 Live SDK</a></li><li><a href="RTCEventType.html">RTCEventType</a></li></ul><h1> Type AliasRTCEventType</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">RTCEvent<wbr/>Type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-call-signature">error</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/RTCJoinedInfo.html" class="tsd-signature-type tsd-kind-interface">RTCJoinedInfo</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">joined</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">joinWillStart</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">userVolumes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">userVolumes</span><span class="tsd-signature-symbol">: </span><a href="UserVolume.html" class="tsd-signature-type tsd-kind-type-alias">UserVolume</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-call-signature">weakNetwork</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-comment tsd-typography"><p>RTC 异步事件类型</p>
|
|
2
|
+
<p>定义了 RTC 实例可以触发的所有事件类型</p>
|
|
3
|
+
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-method">error</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.error.error-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">error</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.error.error-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>RTC 错误或异常事件</p>
|
|
4
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">error</span>: <a href="../interfaces/RTCJoinedInfo.html" class="tsd-signature-type tsd-kind-interface">RTCJoinedInfo</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Error</span></span><div class="tsd-comment tsd-typography"><p>错误对象或加入房间信息</p>
|
|
5
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example" class="tsd-anchor"></a>Example<a href="#Example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-5">rtc</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">'error'</span><span class="hl-2">, (</span><span class="hl-5">error</span><span class="hl-2">) </span><span class="hl-6">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">error</span><span class="hl-2">(</span><span class="hl-3">'RTC 错误:'</span><span class="hl-2">, </span><span class="hl-5">error</span><span class="hl-2">)</span><br/><span class="hl-2">})</span>
|
|
6
|
+
</code><button type="button">Copy</button></pre>
|
|
7
|
+
|
|
8
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in typings/rtc/eventType.ts:21</li></ul></aside></li></ul></li><li class="tsd-parameter"><h5><span class="tsd-kind-method">joined</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.joined.joined-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">joined</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.joined.joined-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>成功加入语音房间事件</p>
|
|
9
|
+
<p>当成功加入语音房间时触发。</p>
|
|
10
|
+
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-1" class="tsd-anchor"></a>Example<a href="#Example-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-5">rtc</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">'joined'</span><span class="hl-2">, () </span><span class="hl-6">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">'已成功加入语音房间'</span><span class="hl-2">)</span><br/><span class="hl-2">})</span>
|
|
11
|
+
</code><button type="button">Copy</button></pre>
|
|
12
|
+
|
|
13
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in typings/rtc/eventType.ts:48</li></ul></aside></li></ul></li><li class="tsd-parameter"><h5><span class="tsd-kind-method">join<wbr/>Will<wbr/>Start</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.joinWillStart.joinWillStart-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">join<wbr/>Will<wbr/>Start</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.joinWillStart.joinWillStart-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>即将加入房间事件</p>
|
|
14
|
+
<p>在开始加入房间流程时触发。</p>
|
|
15
|
+
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-2" class="tsd-anchor"></a>Example<a href="#Example-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-5">rtc</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">'joinWillStart'</span><span class="hl-2">, () </span><span class="hl-6">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">'开始加入房间...'</span><span class="hl-2">)</span><br/><span class="hl-2">})</span>
|
|
16
|
+
</code><button type="button">Copy</button></pre>
|
|
17
|
+
|
|
18
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in typings/rtc/eventType.ts:35</li></ul></aside></li></ul></li><li class="tsd-parameter"><h5><span class="tsd-kind-method">user<wbr/>Volumes</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.userVolumes.userVolumes-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">user<wbr/>Volumes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">userVolumes</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.userVolumes.userVolumes-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>用户音量事件</p>
|
|
19
|
+
<p>当收到用户音量信息时触发,用于显示用户说话状态。</p>
|
|
20
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">userVolumes</span>: <a href="UserVolume.html" class="tsd-signature-type tsd-kind-type-alias">UserVolume</a><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>用户音量数组,包含每个用户的音量信息</p>
|
|
21
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-3" class="tsd-anchor"></a>Example<a href="#Example-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-5">rtc</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">'userVolumes'</span><span class="hl-2">, (</span><span class="hl-5">volumes</span><span class="hl-2">) </span><span class="hl-6">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">volumes</span><span class="hl-2">.</span><span class="hl-1">forEach</span><span class="hl-2">(</span><span class="hl-5">volume</span><span class="hl-2"> </span><span class="hl-6">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">`用户 </span><span class="hl-6">${</span><span class="hl-5">volume</span><span class="hl-10">.</span><span class="hl-5">userId</span><span class="hl-6">}</span><span class="hl-3"> 音量: </span><span class="hl-6">${</span><span class="hl-5">volume</span><span class="hl-10">.</span><span class="hl-5">volume</span><span class="hl-6">}</span><span class="hl-3">`</span><span class="hl-2">)</span><br/><span class="hl-2"> })</span><br/><span class="hl-2">})</span>
|
|
22
|
+
</code><button type="button">Copy</button></pre>
|
|
23
|
+
|
|
24
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in typings/rtc/eventType.ts:79</li></ul></aside></li></ul></li><li class="tsd-parameter"><h5><span class="tsd-kind-method">weak<wbr/>Network</span><span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="__type.weakNetwork.weakNetwork-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">weak<wbr/>Network</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.weakNetwork.weakNetwork-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>弱网络提醒事件</p>
|
|
25
|
+
<p>当检测到网络质量较差时触发。</p>
|
|
26
|
+
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Example"><h4 class="tsd-anchor-link"><a id="Example-4" class="tsd-anchor"></a>Example<a href="#Example-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-5">rtc</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">'weakNetwork'</span><span class="hl-2">, () </span><span class="hl-6">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">warn</span><span class="hl-2">(</span><span class="hl-3">'网络质量较差,可能影响语音通话'</span><span class="hl-2">)</span><br/><span class="hl-2">})</span>
|
|
27
|
+
</code><button type="button">Copy</button></pre>
|
|
28
|
+
|
|
29
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in typings/rtc/eventType.ts:62</li></ul></aside></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/rtc/eventType.ts:9</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>如视 Live SDK</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer></footer><div class="overlay"></div></body></html>
|
package/docs/types/UserInfo.html
CHANGED
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">rtc</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><p>RTC 环境是否就绪,即当前语音是否联通。</p>
|
|
10
10
|
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">status</span><span class="tsd-signature-symbol">?: </span><a href="../enums/UserStatus.html" class="tsd-signature-type tsd-kind-enum">UserStatus</a></h5><div class="tsd-comment tsd-typography"><p>用户当前的状态。</p>
|
|
11
11
|
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">user_<wbr/>role</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>用户角色定义。(前端不关注此字段)。</p>
|
|
12
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:
|
|
12
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:72</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>如视 Live SDK</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer></footer><div class="overlay"></div></body></html>
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-index-signature"><h5><span class="tsd-signature-symbol">[</span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><p>其他用户相关的字段,比如用户职称、住址、联系方式等信息。</p>
|
|
3
3
|
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">avatar</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>用户头像。</p>
|
|
4
4
|
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">nickname</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>用户昵称。</p>
|
|
5
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:
|
|
5
|
+
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:54</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>如视 Live SDK</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer></footer><div class="overlay"></div></body></html>
|
package/package.json
CHANGED