@realsee/live 0.7.3 → 0.7.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.
Files changed (55) hide show
  1. package/dist/index.cjs.js +3 -3
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.es.js +644 -87
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/live/controller.d.ts +163 -42
  7. package/dist/live/createLive.d.ts +35 -3
  8. package/dist/live/createLiveReact.d.ts +51 -3
  9. package/dist/live/live.d.ts +501 -50
  10. package/dist/rtc/BrowserRTC.d.ts +63 -0
  11. package/dist/rtc/BrowserRTC4Chime.d.ts +38 -2
  12. package/dist/rtc/CoreRTC.d.ts +65 -1
  13. package/dist/rtc/VRWebViewRTC.d.ts +56 -6
  14. package/dist/typings/live/EventType.d.ts +58 -10
  15. package/dist/typings/live/GetVoiceSign.d.ts +27 -7
  16. package/dist/typings/live/UserInfo.d.ts +70 -0
  17. package/dist/typings/rtc/eventType.d.ts +55 -8
  18. package/dist/utils/appendUri.d.ts +17 -0
  19. package/dist/utils/uuid.d.ts +11 -1
  20. package/docs/assets/highlight.css +28 -0
  21. package/docs/assets/navigation.js +1 -1
  22. package/docs/assets/search.js +1 -1
  23. package/docs/classes/BrowserRTC.html +50 -22
  24. package/docs/classes/BrowserRTC4Chime.html +51 -23
  25. package/docs/classes/CoreRTC.html +28 -23
  26. package/docs/classes/Live.html +197 -41
  27. package/docs/classes/Subscribe.html +36 -0
  28. package/docs/classes/VRWebViewRTC.html +32 -13
  29. package/docs/enums/MemUserStatus.html +10 -2
  30. package/docs/functions/GetVoiceSignFn.html +20 -4
  31. package/docs/functions/createLive.html +9 -2
  32. package/docs/functions/createLiveReact.html +110 -17
  33. package/docs/hierarchy.html +1 -1
  34. package/docs/index.html +2 -15
  35. package/docs/interfaces/LiveOptions.html +20 -4
  36. package/docs/interfaces/Permission.html +18 -2
  37. package/docs/interfaces/RTCProtocol.html +6 -6
  38. package/docs/interfaces/SubscribeMixinType.emit.html +1 -0
  39. package/docs/interfaces/SubscribeMixinType.hasListener.html +1 -0
  40. package/docs/interfaces/SubscribeMixinType.off.html +1 -0
  41. package/docs/interfaces/SubscribeMixinType.on.html +1 -0
  42. package/docs/interfaces/SubscribeMixinType.once.html +1 -0
  43. package/docs/interfaces/VRWebViewRTCOptions.html +20 -4
  44. package/docs/modules/SubscribeMixinType.html +6 -0
  45. package/docs/modules.html +4 -1
  46. package/docs/types/EventMap.html +1 -0
  47. package/docs/types/EventType.html +1 -1
  48. package/docs/types/GetVoiceSign.html +2 -1
  49. package/docs/types/KeyframeEventType.html +1 -1
  50. package/docs/types/LiveEventType.html +38 -12
  51. package/docs/types/LiveProviderPropTypes.html +5 -1
  52. package/docs/types/RTCEventType.html +29 -7
  53. package/docs/types/UserInfo.html +1 -1
  54. package/docs/types/UserInfoExt.html +1 -1
  55. package/package.json +1 -1
@@ -1,7 +1,15 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>MemUserStatus | 如视 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="MemUserStatus.html">MemUserStatus</a></li></ul><h1> EnumerationMemUserStatus</h1></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:19</li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Enumeration Members</h3><div class="tsd-index-list"><a href="MemUserStatus.html#BE_REPLACE" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>BE_<wbr/>REPLACE</span></a>
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>MemUserStatus | 如视 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="MemUserStatus.html">MemUserStatus</a></li></ul><h1> EnumerationMemUserStatus</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>内存中的用户状态枚举</p>
2
+ <p>用于表示用户在内存中的状态,与 UserStatus 不同,这个状态更详细地描述了用户的生命周期。</p>
3
+ </div><div class="tsd-comment tsd-typography"></div></section><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:24</li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Enumeration Members</h3><div class="tsd-index-list"><a href="MemUserStatus.html#BE_REPLACE" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>BE_<wbr/>REPLACE</span></a>
2
4
  <a href="MemUserStatus.html#EXCEPTION" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>EXCEPTION</span></a>
3
5
  <a href="MemUserStatus.html#KICK_OUT" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>KICK_<wbr/>OUT</span></a>
4
6
  <a href="MemUserStatus.html#LEAVE" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>LEAVE</span></a>
5
7
  <a href="MemUserStatus.html#ONLINE" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>ONLINE</span></a>
6
8
  <a href="MemUserStatus.html#WAIT_ENTER" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>WAIT_<wbr/>ENTER</span></a>
7
- </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Enumeration Members"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Enumeration Members</h2></summary><section><section class="tsd-panel tsd-member"><a id="BE_REPLACE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>BE_<wbr/>REPLACE</span><a href="#BE_REPLACE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-enum-member">BE_<wbr/>REPLACE</span></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:24</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="EXCEPTION" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>EXCEPTION</span><a href="#EXCEPTION" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-enum-member">EXCEPTION</span></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:25</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="KICK_OUT" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>KICK_<wbr/>OUT</span><a href="#KICK_OUT" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-enum-member">KICK_<wbr/>OUT</span></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:23</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="LEAVE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>LEAVE</span><a href="#LEAVE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-enum-member">LEAVE</span></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:22</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="ONLINE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>ONLINE</span><a href="#ONLINE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-enum-member">ONLINE</span></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:21</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="WAIT_ENTER" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>WAIT_<wbr/>ENTER</span><a href="#WAIT_ENTER" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-enum-member">WAIT_<wbr/>ENTER</span></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:20</li></ul></aside></section></section></details></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><details open class="tsd-accordion tsd-page-navigation"><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>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Enumeration Members"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Enumeration Members</summary><div><a href="#BE_REPLACE" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>BE_<wbr/>REPLACE</span></a><a href="#EXCEPTION" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>EXCEPTION</span></a><a href="#KICK_OUT" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>KICK_<wbr/>OUT</span></a><a href="#LEAVE" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>LEAVE</span></a><a href="#ONLINE" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>ONLINE</span></a><a href="#WAIT_ENTER" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>WAIT_<wbr/>ENTER</span></a></div></details></div></details></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>
9
+ </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Enumeration Members"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Enumeration Members</h2></summary><section><section class="tsd-panel tsd-member"><a id="BE_REPLACE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>BE_<wbr/>REPLACE</span><a href="#BE_REPLACE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-enum-member">BE_<wbr/>REPLACE</span></div><div class="tsd-comment tsd-typography"><p>被替换</p>
10
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:44</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="EXCEPTION" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>EXCEPTION</span><a href="#EXCEPTION" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-enum-member">EXCEPTION</span></div><div class="tsd-comment tsd-typography"><p>异常状态</p>
11
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:48</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="KICK_OUT" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>KICK_<wbr/>OUT</span><a href="#KICK_OUT" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-enum-member">KICK_<wbr/>OUT</span></div><div class="tsd-comment tsd-typography"><p>被踢出</p>
12
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:40</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="LEAVE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>LEAVE</span><a href="#LEAVE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-enum-member">LEAVE</span></div><div class="tsd-comment tsd-typography"><p>已离开</p>
13
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:36</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="ONLINE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>ONLINE</span><a href="#ONLINE" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-enum-member">ONLINE</span></div><div class="tsd-comment tsd-typography"><p>在线</p>
14
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:32</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="WAIT_ENTER" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>WAIT_<wbr/>ENTER</span><a href="#WAIT_ENTER" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-enum-member">WAIT_<wbr/>ENTER</span></div><div class="tsd-comment tsd-typography"><p>等待进入房间</p>
15
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/UserInfo.ts:28</li></ul></aside></section></section></details></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><details open class="tsd-accordion tsd-page-navigation"><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>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Enumeration Members"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Enumeration Members</summary><div><a href="#BE_REPLACE" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>BE_<wbr/>REPLACE</span></a><a href="#EXCEPTION" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>EXCEPTION</span></a><a href="#KICK_OUT" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>KICK_<wbr/>OUT</span></a><a href="#LEAVE" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>LEAVE</span></a><a href="#ONLINE" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>ONLINE</span></a><a href="#WAIT_ENTER" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-16"></use></svg><span>WAIT_<wbr/>ENTER</span></a></div></details></div></details></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,4 +1,20 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>GetVoiceSignFn | 如视 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="GetVoiceSignFn.html">GetVoiceSignFn</a></li></ul><h1> FunctionGetVoiceSignFn</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="GetVoiceSignFn" class="tsd-anchor"></a><span class="tsd-kind-call-signature">Get<wbr/>Voice<wbr/>Sign<wbr/>Fn</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">params</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/GetVoiceSignReturnType.html" class="tsd-signature-type tsd-kind-type-alias">GetVoiceSignReturnType</a><span class="tsd-signature-symbol">&gt;</span><a href="#GetVoiceSignFn" 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>
2
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">params</span>: <a href="../types/GetVoiceSignParams.html" class="tsd-signature-type tsd-kind-type-alias">GetVoiceSignParams</a></span><div class="tsd-comment tsd-typography"><p>获取语音签名所需的参数</p>
3
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/GetVoiceSignReturnType.html" class="tsd-signature-type tsd-kind-type-alias">GetVoiceSignReturnType</a><span class="tsd-signature-symbol">&gt;</span></h4><p>返回一个Promise,解析为语音签名的相关信息</p>
4
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in typings/live/GetVoiceSign.ts:50</li></ul></aside></li></ul></section></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
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>GetVoiceSignFn | 如视 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="GetVoiceSignFn.html">GetVoiceSignFn</a></li></ul><h1> FunctionGetVoiceSignFn</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="GetVoiceSignFn" class="tsd-anchor"></a><span class="tsd-kind-call-signature">Get<wbr/>Voice<wbr/>Sign<wbr/>Fn</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">params</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/GetVoiceSignReturnType.html" class="tsd-signature-type tsd-kind-type-alias">GetVoiceSignReturnType</a><span class="tsd-signature-symbol">&gt;</span><a href="#GetVoiceSignFn" 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>
2
+ <p>用于获取加入 RTC 语音房间所需的签名信息。
3
+ 通常需要调用后端 API 来生成签名。</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">params</span>: <a href="../types/GetVoiceSignParams.html" class="tsd-signature-type tsd-kind-type-alias">GetVoiceSignParams</a></span><div class="tsd-comment tsd-typography"><p>获取语音签名所需的参数,包含以下属性:</p>
5
+ <ul>
6
+ <li>voiceId: 语音房间ID</li>
7
+ <li>userId: 用户ID</li>
8
+ <li>roomId: 房间ID</li>
9
+ </ul>
10
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/GetVoiceSignReturnType.html" class="tsd-signature-type tsd-kind-type-alias">GetVoiceSignReturnType</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise<GetVoiceSignReturnType> 返回包含签名信息的 Promise,包含:</p>
11
+ <ul>
12
+ <li>sdkAppId: RTC的sdkAppId</li>
13
+ <li>userId: RTC的用户ID</li>
14
+ <li>roomId: RTC的语音房间号</li>
15
+ <li>userSig: RTC的用户签名</li>
16
+ </ul>
17
+ <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-6">const</span><span class="hl-2"> </span><span class="hl-1">getVoiceSign</span><span class="hl-2">: </span><span class="hl-9">GetVoiceSign</span><span class="hl-2"> = </span><span class="hl-6">async</span><span class="hl-2"> (</span><span class="hl-5">params</span><span class="hl-2">) </span><span class="hl-6">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">response</span><span class="hl-2"> = </span><span class="hl-4">await</span><span class="hl-2"> </span><span class="hl-1">fetch</span><span class="hl-2">(</span><span class="hl-3">&#39;/api/get-voice-sign&#39;</span><span class="hl-2">, {</span><br/><span class="hl-2"> </span><span class="hl-5">method:</span><span class="hl-2"> </span><span class="hl-3">&#39;POST&#39;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">headers:</span><span class="hl-2"> { </span><span class="hl-3">&#39;Content-Type&#39;</span><span class="hl-5">:</span><span class="hl-2"> </span><span class="hl-3">&#39;application/json&#39;</span><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-5">body:</span><span class="hl-2"> </span><span class="hl-7">JSON</span><span class="hl-2">.</span><span class="hl-1">stringify</span><span class="hl-2">(</span><span class="hl-5">params</span><span class="hl-2">)</span><br/><span class="hl-2"> })</span><br/><span class="hl-2"> </span><span class="hl-4">return</span><span class="hl-2"> </span><span class="hl-5">response</span><span class="hl-2">.</span><span class="hl-1">json</span><span class="hl-2">()</span><br/><span class="hl-2">}</span>
18
+ </code><button type="button">Copy</button></pre>
19
+
20
+ </div></div><aside class="tsd-sources"><ul><li>Defined in typings/live/GetVoiceSign.ts:68</li></ul></aside></li></ul></section></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,2 +1,9 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>createLive | 如视 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="createLive.html">createLive</a></li></ul><h1> FunctioncreateLive</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>创建<code>Live</code>实例</p>
2
- </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="createLive" class="tsd-anchor"></a><span class="tsd-kind-call-signature">create<wbr/>Live</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="createLive.html#createLive.KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">opts</span><span class="tsd-signature-symbol">)</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">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="createLive.html#createLive.KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">&gt;</span><a href="#createLive" 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"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="createLive.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">&lt;</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">&gt;</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">opts</span>: <a href="../interfaces/LiveOptions.html" class="tsd-signature-type tsd-kind-interface">LiveOptions</a></span><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../classes/Live.html" class="tsd-signature-type tsd-kind-class">Live</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="createLive.html#createLive.KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in live/createLive.ts:10</li></ul></aside></li></ul></section></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
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>createLive | 如视 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="createLive.html">createLive</a></li></ul><h1> FunctioncreateLive</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>创建 Live 带看实例</p>
2
+ <p>这是一个工厂函数,用于创建 Live 实例。在创建新实例前,会先清理全局的旧实例(如果存在)。</p>
3
+ </div><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-0">// 定义帧数据类型</span><br/><span class="hl-6">interface</span><span class="hl-2"> </span><span class="hl-9">MyKeyframes</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">camera</span><span class="hl-2">: { </span><span class="hl-5">position</span><span class="hl-2">: [</span><span class="hl-9">number</span><span class="hl-2">, </span><span class="hl-9">number</span><span class="hl-2">, </span><span class="hl-9">number</span><span class="hl-2">] }</span><br/><span class="hl-2"> </span><span class="hl-5">annotation</span><span class="hl-2">: { </span><span class="hl-5">text</span><span class="hl-2">: </span><span class="hl-9">string</span><span class="hl-2">; </span><span class="hl-5">position</span><span class="hl-2">: [</span><span class="hl-9">number</span><span class="hl-2">, </span><span class="hl-9">number</span><span class="hl-2">] }</span><br/><span class="hl-2">}</span><br/><br/><span class="hl-0">// 创建 Live 实例</span><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">live</span><span class="hl-2"> = </span><span class="hl-1">createLive</span><span class="hl-2">&lt;</span><span class="hl-9">MyKeyframes</span><span class="hl-2">&gt;({</span><br/><span class="hl-2"> </span><span class="hl-5">url:</span><span class="hl-2"> </span><span class="hl-3">&#39;wss://example.com/live&#39;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">getTicket</span><span class="hl-5">:</span><span class="hl-2"> </span><span class="hl-6">async</span><span class="hl-2"> () </span><span class="hl-6">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">response</span><span class="hl-2"> = </span><span class="hl-4">await</span><span class="hl-2"> </span><span class="hl-1">fetch</span><span class="hl-2">(</span><span class="hl-3">&#39;/api/get-ticket&#39;</span><span class="hl-2">)</span><br/><span class="hl-2"> </span><span class="hl-4">return</span><span class="hl-2"> </span><span class="hl-5">response</span><span class="hl-2">.</span><span class="hl-1">json</span><span class="hl-2">().</span><span class="hl-5">ticket</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-1">getVoiceSign</span><span class="hl-5">:</span><span class="hl-2"> </span><span class="hl-6">async</span><span class="hl-2"> (</span><span class="hl-5">params</span><span class="hl-2">) </span><span class="hl-6">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">response</span><span class="hl-2"> = </span><span class="hl-4">await</span><span class="hl-2"> </span><span class="hl-1">fetch</span><span class="hl-2">(</span><span class="hl-3">&#39;/api/get-voice-sign&#39;</span><span class="hl-2">, {</span><br/><span class="hl-2"> </span><span class="hl-5">method:</span><span class="hl-2"> </span><span class="hl-3">&#39;POST&#39;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">body:</span><span class="hl-2"> </span><span class="hl-7">JSON</span><span class="hl-2">.</span><span class="hl-1">stringify</span><span class="hl-2">(</span><span class="hl-5">params</span><span class="hl-2">)</span><br/><span class="hl-2"> })</span><br/><span class="hl-2"> </span><span class="hl-4">return</span><span class="hl-2"> </span><span class="hl-5">response</span><span class="hl-2">.</span><span class="hl-1">json</span><span class="hl-2">()</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-5">useBuiltInRTC:</span><span class="hl-2"> </span><span class="hl-6">true</span><br/><span class="hl-2">})</span><br/><br/><span class="hl-0">// 连接带看</span><br/><span class="hl-4">await</span><span class="hl-2"> </span><span class="hl-5">live</span><span class="hl-2">.</span><span class="hl-1">connect</span><span class="hl-2">()</span>
4
+ </code><button type="button">Copy</button></pre>
5
+
6
+ </div></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="createLive" class="tsd-anchor"></a><span class="tsd-kind-call-signature">create<wbr/>Live</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="createLive.html#createLive.KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">opts</span><span class="tsd-signature-symbol">)</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">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="createLive.html#createLive.KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">&gt;</span><a href="#createLive" 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"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="createLive.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">&lt;</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">&gt;</span></span><div class="tsd-comment tsd-typography"><p>帧数据快照类型,必须是一个对象类型</p>
7
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">opts</span>: <a href="../interfaces/LiveOptions.html" class="tsd-signature-type tsd-kind-interface">LiveOptions</a></span><div class="tsd-comment tsd-typography"><p>带看配置选项,详见 <a href="../interfaces/LiveOptions.html" class="tsd-kind-interface">LiveOptions</a></p>
8
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../classes/Live.html" class="tsd-signature-type tsd-kind-class">Live</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="createLive.html#createLive.KeyframesSnapshot">KeyframesSnapshot</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Live 实例</p>
9
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in live/createLive.ts:42</li></ul></aside></li></ul></section></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>