| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351 |
- <!doctype html>
- <html class="default no-js">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title>@urtc/sdk-web</title>
- <meta name="description" content="Documentation for @urtc/sdk-web">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="assets/css/main.css">
- </head>
- <body>
- <header>
- <div class="tsd-page-toolbar">
- <div class="container">
- <div class="table-wrap">
- <div class="table-cell" id="tsd-search" data-index="assets/js/search.json" data-base=".">
- <div class="field">
- <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
- <input id="tsd-search-field" type="text" />
- </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">@urtc/sdk-web</a>
- </div>
- <div class="table-cell" id="tsd-widgets">
- <div id="tsd-filter">
- <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
- <div class="tsd-filter-group">
- <div class="tsd-select" id="tsd-filter-visibility">
- <span class="tsd-select-label">All</span>
- <ul class="tsd-select-list">
- <li data-value="public">Public</li>
- <li data-value="protected">Public/Protected</li>
- <li data-value="private" class="selected">All</li>
- </ul>
- </div>
- <input type="checkbox" id="tsd-filter-inherited" checked />
- <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
- <input type="checkbox" id="tsd-filter-externals" checked />
- <label class="tsd-widget" for="tsd-filter-externals">Externals</label>
- </div>
- </div>
- <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
- </div>
- </div>
- </div>
- </div>
- <div class="tsd-page-title">
- <div class="container">
- <ul class="tsd-breadcrumb">
- <li>
- <a href="index.html">Globals</a>
- </li>
- </ul>
- <h1>@urtc/sdk-web</h1>
- </div>
- </div>
- </header>
- <div class="container container-main">
- <div class="row">
- <div class="col-8 col-content">
- <section class="tsd-panel-group tsd-index-group">
- <h2>Index</h2>
- <section class="tsd-panel tsd-index-panel">
- <div class="tsd-index-content">
- <section class="tsd-index-section tsd-is-external">
- <h3>Classes</h3>
- <ul class="tsd-index-list">
- <li class="tsd-kind-class tsd-is-external"><a href="classes/client.html" class="tsd-kind-icon">Client</a></li>
- <li class="tsd-kind-class tsd-is-external"><a href="classes/localstream.html" class="tsd-kind-icon">Local<wbr>Stream</a></li>
- <li class="tsd-kind-class tsd-is-external"><a href="classes/remotestream.html" class="tsd-kind-icon">Remote<wbr>Stream</a></li>
- <li class="tsd-kind-class tsd-is-external"><a href="classes/rtcerror.html" class="tsd-kind-icon">Rtc<wbr>Error</a></li>
- <li class="tsd-kind-class tsd-is-external"><a href="classes/stream.html" class="tsd-kind-icon">Stream</a></li>
- <li class="tsd-kind-class tsd-is-external"><a href="classes/user.html" class="tsd-kind-icon">User</a></li>
- </ul>
- </section>
- <section class="tsd-index-section tsd-is-external">
- <h3>Interfaces</h3>
- <ul class="tsd-index-list">
- <li class="tsd-kind-interface tsd-is-external"><a href="interfaces/audiostats.html" class="tsd-kind-icon">Audio<wbr>Stats</a></li>
- <li class="tsd-kind-interface tsd-is-external"><a href="interfaces/clientoptions.html" class="tsd-kind-icon">Client<wbr>Options</a></li>
- <li class="tsd-kind-interface tsd-is-external"><a href="interfaces/clientplugin.html" class="tsd-kind-icon">Client<wbr>Plugin</a></li>
- <li class="tsd-kind-interface tsd-is-external"><a href="interfaces/connectionstates.html" class="tsd-kind-icon">Connection<wbr>States</a></li>
- <li class="tsd-kind-interface tsd-is-external"><a href="interfaces/customvideoprofile.html" class="tsd-kind-icon">Custom<wbr>Video<wbr>Profile</a></li>
- <li class="tsd-kind-interface tsd-is-external"><a href="interfaces/devicedetectionoptions.html" class="tsd-kind-icon">Device<wbr>Detection<wbr>Options</a></li>
- <li class="tsd-kind-interface tsd-is-external"><a href="interfaces/joinoptions.html" class="tsd-kind-icon">Join<wbr>Options</a></li>
- <li class="tsd-kind-interface tsd-has-type-parameter tsd-is-external"><a href="interfaces/listener.html" class="tsd-kind-icon">Listener</a></li>
- <li class="tsd-kind-interface tsd-is-external"><a href="interfaces/localstreamoptions.html" class="tsd-kind-icon">Local<wbr>Stream<wbr>Options</a></li>
- <li class="tsd-kind-interface tsd-is-external"><a href="interfaces/networkstats.html" class="tsd-kind-icon">Network<wbr>Stats</a></li>
- <li class="tsd-kind-interface tsd-is-external"><a href="interfaces/playoptions.html" class="tsd-kind-icon">Play<wbr>Options</a></li>
- <li class="tsd-kind-interface tsd-has-type-parameter tsd-is-external"><a href="interfaces/rtcevent.html" class="tsd-kind-icon">Rtc<wbr>Event</a></li>
- <li class="tsd-kind-interface tsd-is-external"><a href="interfaces/serverconfig.html" class="tsd-kind-icon">Server<wbr>Config</a></li>
- <li class="tsd-kind-interface tsd-is-external"><a href="interfaces/streamplugin.html" class="tsd-kind-icon">Stream<wbr>Plugin</a></li>
- <li class="tsd-kind-interface tsd-is-external"><a href="interfaces/streamstats.html" class="tsd-kind-icon">Stream<wbr>Stats</a></li>
- <li class="tsd-kind-interface tsd-is-external"><a href="interfaces/videostats.html" class="tsd-kind-icon">Video<wbr>Stats</a></li>
- </ul>
- </section>
- <section class="tsd-index-section tsd-is-external">
- <h3>Type aliases</h3>
- <ul class="tsd-index-list">
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#audiocodec" class="tsd-kind-icon">Audio<wbr>Codec</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#connectionstate" class="tsd-kind-icon">Connection<wbr>State</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#errorcode" class="tsd-kind-icon">Error<wbr>Code</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#loglevel" class="tsd-kind-icon">Log<wbr>Level</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#mediatype" class="tsd-kind-icon">Media<wbr>Type</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#playervideofittype" class="tsd-kind-icon">Player<wbr>Video<wbr>Fit<wbr>Type</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#roletype" class="tsd-kind-icon">Role<wbr>Type</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#roomtype" class="tsd-kind-icon">Room<wbr>Type</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#rtcconnectionevent" class="tsd-kind-icon">Rtc<wbr>Connection<wbr>Event</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#rtcconnectioneventtype" class="tsd-kind-icon">Rtc<wbr>Connection<wbr>Event<wbr>Type</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#rtceventtype" class="tsd-kind-icon">Rtc<wbr>Event<wbr>Type</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#rtcstreamevent" class="tsd-kind-icon">Rtc<wbr>Stream<wbr>Event</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#rtcstreameventtype" class="tsd-kind-icon">Rtc<wbr>Stream<wbr>Event<wbr>Type</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#rtcuserevent" class="tsd-kind-icon">Rtc<wbr>User<wbr>Event</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#rtcusereventtype" class="tsd-kind-icon">Rtc<wbr>User<wbr>Event<wbr>Type</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#screenprofile" class="tsd-kind-icon">Screen<wbr>Profile</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#switchdevicetype" class="tsd-kind-icon">Switch<wbr>Device<wbr>Type</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#videocodec" class="tsd-kind-icon">Video<wbr>Codec</a></li>
- <li class="tsd-kind-type-alias tsd-is-external"><a href="index.html#videoprofile" class="tsd-kind-icon">Video<wbr>Profile</a></li>
- </ul>
- </section>
- <section class="tsd-index-section tsd-is-external">
- <h3>Variables</h3>
- <ul class="tsd-index-list">
- <li class="tsd-kind-variable tsd-is-external"><a href="index.html#version" class="tsd-kind-icon">version</a></li>
- </ul>
- </section>
- <section class="tsd-index-section ">
- <h3>Functions</h3>
- <ul class="tsd-index-list">
- <li class="tsd-kind-function"><a href="index.html#createclient" class="tsd-kind-icon">create<wbr>Client</a></li>
- <li class="tsd-kind-function"><a href="index.html#createstream" class="tsd-kind-icon">create<wbr>Stream</a></li>
- <li class="tsd-kind-function tsd-is-external"><a href="index.html#devicedetection" class="tsd-kind-icon">device<wbr>Detection</a></li>
- <li class="tsd-kind-function tsd-is-external"><a href="index.html#generatetoken" class="tsd-kind-icon">generate<wbr>Token</a></li>
- <li class="tsd-kind-function tsd-is-external"><a href="index.html#getcameras" class="tsd-kind-icon">get<wbr>Cameras</a></li>
- <li class="tsd-kind-function tsd-is-external"><a href="index.html#getdevices" class="tsd-kind-icon">get<wbr>Devices</a></li>
- <li class="tsd-kind-function tsd-is-external"><a href="index.html#getloudspeakers" class="tsd-kind-icon">get<wbr>Loudspeakers</a></li>
- <li class="tsd-kind-function tsd-is-external"><a href="index.html#getmicrophones" class="tsd-kind-icon">get<wbr>Microphones</a></li>
- <li class="tsd-kind-function tsd-is-external"><a href="index.html#issupportscreenshare" class="tsd-kind-icon">is<wbr>Support<wbr>Screen<wbr>Share</a></li>
- <li class="tsd-kind-function tsd-is-external"><a href="index.html#issupportwebrtc" class="tsd-kind-icon">is<wbr>Support<wbr>WebRTC</a></li>
- <li class="tsd-kind-function"><a href="index.html#reportlog" class="tsd-kind-icon">report<wbr>Log</a></li>
- <li class="tsd-kind-function"><a href="index.html#setloglevel" class="tsd-kind-icon">set<wbr>Log<wbr>Level</a></li>
- <li class="tsd-kind-function tsd-is-external"><a href="index.html#setservers" class="tsd-kind-icon">set<wbr>Servers</a></li>
- </ul>
- </section>
- </div>
- </section>
- </section>
- <section class="tsd-panel-group tsd-member-group tsd-is-external">
- <h2>Type aliases</h2>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="audiocodec" class="tsd-anchor"></a>
- <h3>Audio<wbr>Codec</h3>
- <div class="tsd-signature tsd-kind-icon">Audio<wbr>Codec<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"opus"</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>音频编解码格式</p>
- </div>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="connectionstate" class="tsd-anchor"></a>
- <h3>Connection<wbr>State</h3>
- <div class="tsd-signature tsd-kind-icon">Connection<wbr>State<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"OPEN"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"CONNECTING"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"CLOSING"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"RECONNECTING"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"CLOSED"</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>连接状态类型:</p>
- <ul>
- <li>OPEN - 已连接</li>
- <li>CONNECTING - 连接中</li>
- <li>CLOSING - 断开中</li>
- <li>RECONNECTING - 重连中</li>
- <li>CLOSED - 已断开</li>
- </ul>
- </div>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="errorcode" class="tsd-anchor"></a>
- <h3>Error<wbr>Code</h3>
- <div class="tsd-signature tsd-kind-icon">Error<wbr>Code<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">typeof </span><span class="tsd-signature-type">RtcError</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">Exclude</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">keyof </span><span class="tsd-signature-symbol">typeof </span><span class="tsd-signature-type">RtcError</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">"prototype"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"getCode"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"stackTraceLimit"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"prepareStackTrace"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"captureStackTrace"</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">]</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>URTC 错误代码</p>
- </div>
- <p>通用错误及代码</p>
- <ul>
- <li>1000 - 非法参数</li>
- <li>1001 - 非法操作</li>
- <li>1002 - 不支持</li>
- <li>1003 - 不存在</li>
- <li>1004 - 请求失败</li>
- <li>1999 - 其他错误</li>
- </ul>
- <p>房间相关错误及代码</p>
- <ul>
- <li>2000 - 网关不可达</li>
- <li>2001 - 获取 Access Token 失败</li>
- <li>2002 - Access Token 非法</li>
- <li>2003 - Websocket 连接失败</li>
- <li>2004 - 加入房间失败</li>
- <li>2005 - 未加入房间</li>
- <li>2006 - 正在加入房间</li>
- <li>2007 - 正在离开房间</li>
- <li>2008 - 角色类型不匹配</li>
- <li>2009 - 信令服务器地址错误</li>
- </ul>
- <p>流相关错误及代码</p>
- <ul>
- <li>3000 - 流不存在</li>
- <li>3001 - 同类型的流已存在</li>
- <li>3002 - 音频不存在</li>
- <li>3003 - 视频不存在</li>
- <li>3004 - [中止错误] 尽管用户和操作系统都授予了访问设备硬件的权利,而且未出现可能抛出NotReadableError异常的硬件问题,但仍然有一些问题的出现导致了设备无法被使用。</li>
- <li>3005 - [拒绝错误] 用户拒绝了当前的浏览器实例的访问请求;或者用户拒绝了当前会话的访问;或者用户在全局范围内拒绝了所有媒体访问请求。</li>
- <li>3006 - [找不到错误] 找不到满足请求参数的媒体类型。</li>
- <li>3007 - [无法读取错误] 尽管用户已经授权使用相应的设备,操作系统上某个硬件、浏览器或者网页层面发生的错误导致设备无法被访问。</li>
- <li>3008 - [无法满足要求错误] 指定的要求无法被设备满足。</li>
- <li>3009 - 流连接失败</li>
- <li>3010 - 流正在重连</li>
- <li>3011 - 流尚未发布</li>
- <li>3012 - 流正在发布</li>
- <li>3013 - 流正在取消发布</li>
- <li>3014 - 流已经发布</li>
- <li>3015 - 流尚未订阅</li>
- <li>3016 - 流正在订阅</li>
- <li>3017 - 流正在取消订阅</li>
- <li>3018 - 流已经订阅</li>
- <li>3019 - 自动播放被禁止错误</li>
- </ul>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="loglevel" class="tsd-anchor"></a>
- <h3>Log<wbr>Level</h3>
- <div class="tsd-signature tsd-kind-icon">Log<wbr>Level<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"debug"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"info"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"warn"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"error"</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>日志级别</p>
- </div>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="mediatype" class="tsd-anchor"></a>
- <h3>Media<wbr>Type</h3>
- <div class="tsd-signature tsd-kind-icon">Media<wbr>Type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"main"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"auxiliary"</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>流的媒体类型, main - 主视频流,auxiliary - 辅助视频流,通常是一个屏幕分享流</p>
- </div>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="playervideofittype" class="tsd-anchor"></a>
- <h3>Player<wbr>Video<wbr>Fit<wbr>Type</h3>
- <div class="tsd-signature tsd-kind-icon">Player<wbr>Video<wbr>Fit<wbr>Type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"cover"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"contain"</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>视频播放时的显示模式</p>
- <ul>
- <li>cover 模式:优先保证视窗被填满。</li>
- <li>contain 模式:优先保证视频内容全部显示。
- 播放摄像头视频流默认使用 cover 模式,屏幕共享视频流默认使用 contain 模式。</li>
- </ul>
- </div>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="roletype" class="tsd-anchor"></a>
- <h3>Role<wbr>Type</h3>
- <div class="tsd-signature tsd-kind-icon">Role<wbr>Type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"pull"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"push"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"push-and-pull"</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>用户角色</p>
- </div>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="roomtype" class="tsd-anchor"></a>
- <h3>Room<wbr>Type</h3>
- <div class="tsd-signature tsd-kind-icon">Room<wbr>Type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"rtc"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"live"</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>房间类型</p>
- </div>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="rtcconnectionevent" class="tsd-anchor"></a>
- <h3>Rtc<wbr>Connection<wbr>Event</h3>
- <div class="tsd-signature tsd-kind-icon">Rtc<wbr>Connection<wbr>Event<span class="tsd-signature-symbol">:</span> <a href="interfaces/rtcevent.html" class="tsd-signature-type">RtcEvent</a><span class="tsd-signature-symbol"><</span><a href="index.html#rtcconnectioneventtype" class="tsd-signature-type">RtcConnectionEventType</a><span class="tsd-signature-symbol">, </span><a href="interfaces/connectionstates.html" class="tsd-signature-type">ConnectionStates</a><span class="tsd-signature-symbol">></span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>Rtc 连接事件,事件类型参见 <a href="index.html#rtcconnectioneventtype">RtcConnectionEventType</a></p>
- </div>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="rtcconnectioneventtype" class="tsd-anchor"></a>
- <h3>Rtc<wbr>Connection<wbr>Event<wbr>Type</h3>
- <div class="tsd-signature tsd-kind-icon">Rtc<wbr>Connection<wbr>Event<wbr>Type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"connection-state-changed"</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>Rtc 客户端连接事件类型:</p>
- </div>
- <p><a href="index.html#rtcconnectionevent">连接事件</a></p>
- <ul>
- <li>connection-state-changed - 连接状态改变</li>
- </ul>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js">client.on(<span class="hljs-string">'connection-state-changed'</span>, <span class="hljs-function">(<span class="hljs-params">event</span>) =></span> {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`连接状态:<span class="hljs-subst">${event.data.previous}</span> => <span class="hljs-subst">${event.data.current}</span>`</span>);
- });</code></pre>
- </dd>
- </dl>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="rtceventtype" class="tsd-anchor"></a>
- <h3>Rtc<wbr>Event<wbr>Type</h3>
- <div class="tsd-signature tsd-kind-icon">Rtc<wbr>Event<wbr>Type<span class="tsd-signature-symbol">:</span> <a href="index.html#rtcusereventtype" class="tsd-signature-type">RtcUserEventType</a><span class="tsd-signature-symbol"> | </span><a href="index.html#rtcstreameventtype" class="tsd-signature-type">RtcStreamEventType</a><span class="tsd-signature-symbol"> | </span><a href="index.html#rtcconnectioneventtype" class="tsd-signature-type">RtcConnectionEventType</a></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>Rtc 事件类型</p>
- </div>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="rtcstreamevent" class="tsd-anchor"></a>
- <h3>Rtc<wbr>Stream<wbr>Event</h3>
- <div class="tsd-signature tsd-kind-icon">Rtc<wbr>Stream<wbr>Event<span class="tsd-signature-symbol">:</span> <a href="interfaces/rtcevent.html" class="tsd-signature-type">RtcEvent</a><span class="tsd-signature-symbol"><</span><a href="index.html#rtcstreameventtype" class="tsd-signature-type">RtcStreamEventType</a><span class="tsd-signature-symbol">, </span><a href="classes/stream.html" class="tsd-signature-type">Stream</a><span class="tsd-signature-symbol"> | </span><a href="classes/localstream.html" class="tsd-signature-type">LocalStream</a><span class="tsd-signature-symbol"> | </span><a href="classes/remotestream.html" class="tsd-signature-type">RemoteStream</a><span class="tsd-signature-symbol">></span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>Rtc 流事件,事件类型参见 <a href="index.html#rtcstreameventtype">RtcStreamEventType</a></p>
- </div>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="rtcstreameventtype" class="tsd-anchor"></a>
- <h3>Rtc<wbr>Stream<wbr>Event<wbr>Type</h3>
- <div class="tsd-signature tsd-kind-icon">Rtc<wbr>Stream<wbr>Event<wbr>Type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"stream-added"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"stream-removed"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"stream-subscribed"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"stream-published"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"mute-audio"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"unmute-audio"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"mute-video"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"unmute-video"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"first-key-frame"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"screenshare-stopped"</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>Rtc 流事件类型:</p>
- </div>
- <p><a href="index.html#rtcstreamevent">流事件</a></p>
- <ul>
- <li>stream-added - 有远端流加入,此时事件中的 data 为 <a href="classes/remotestream.html">RemoteStream</a> 远端流</li>
- <li>stream-removed - 有远端流移除,此时事件中的 data 为 <a href="classes/remotestream.html">RemoteStream</a> 远端流</li>
- <li>stream-subscribed - 远端流订阅完成,此时事件中的 data 为 <a href="classes/remotestream.html">RemoteStream</a> 远端流</li>
- <li>stream-published - 本地流发布完成,此时事件中的 data 为 <a href="classes/localstream.html">LocalStream</a> 本地流</li>
- <li>mute-audio - 流的音频被 mute</li>
- <li>unmute-audio - 流的音频被取消 mute</li>
- <li>mute-video - 流的视频被 mute</li>
- <li>unmute-video - 流的视频被取消 mute</li>
- <li>first-key-frame - 接收到远端流的首帧</li>
- </ul>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js">client.on(<span class="hljs-string">'stream-add'</span>, <span class="hljs-function">(<span class="hljs-params">event</span>) =></span> {
- client.subscribe(event.data);
- });</code></pre>
- <p><strong>特别地,以下事件需在单条流上进行监听</strong></p>
- <ul>
- <li>screenshare-stopped - 屏幕共享流被中止,此时事件中的 data 为 <a href="classes/localstream.html">LocalStream</a> 本地流</li>
- </ul>
- </dd>
- <dt>example</dt>
- <dd><pre><code class="language-js">localStream.on(<span class="hljs-string">'screenshare-stopped'</span>, <span class="hljs-function">(<span class="hljs-params">event</span>) =></span> {
- client.unpublish(event.data);
- event.data.destroy();
- });</code></pre>
- </dd>
- </dl>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="rtcuserevent" class="tsd-anchor"></a>
- <h3>Rtc<wbr>User<wbr>Event</h3>
- <div class="tsd-signature tsd-kind-icon">Rtc<wbr>User<wbr>Event<span class="tsd-signature-symbol">:</span> <a href="interfaces/rtcevent.html" class="tsd-signature-type">RtcEvent</a><span class="tsd-signature-symbol"><</span><a href="index.html#rtcusereventtype" class="tsd-signature-type">RtcUserEventType</a><span class="tsd-signature-symbol">, </span><a href="classes/user.html" class="tsd-signature-type">User</a><span class="tsd-signature-symbol">></span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>Rtc 用户事件,事件类型参见 <a href="index.html#rtcusereventtype">RtcUserEventType</a></p>
- </div>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="rtcusereventtype" class="tsd-anchor"></a>
- <h3>Rtc<wbr>User<wbr>Event<wbr>Type</h3>
- <div class="tsd-signature tsd-kind-icon">Rtc<wbr>User<wbr>Event<wbr>Type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"user-joined"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"user-left"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"kick-off"</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>Rtc 用户事件类型:</p>
- </div>
- <p><a href="index.html#rtcuserevent">用户事件</a></p>
- <ul>
- <li>user-joined - 有用户加入房间</li>
- <li>user-left - 有用户离开房间</li>
- <li>kick-off - 当前用户被踢出房间</li>
- </ul>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js">client.on(<span class="hljs-string">'user-joined'</span>, <span class="hljs-function">(<span class="hljs-params">event</span>) =></span> {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`用户 <span class="hljs-subst">${event.data.id}</span> 加入`</span>);
- });</code></pre>
- </dd>
- </dl>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="screenprofile" class="tsd-anchor"></a>
- <h3>Screen<wbr>Profile</h3>
- <div class="tsd-signature tsd-kind-icon">Screen<wbr>Profile<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"480p"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"480p_2"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"720p"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"720p_2"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"1080p"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"1080p_2"</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>预设的屏幕共享视频 Profile</p>
- </div>
- <table>
- <thead>
- <tr>
- <th align="center">名称</th>
- <th align="center">视频宽</th>
- <th align="center">视频高</th>
- <th align="center">帧率 (fps)</th>
- <th align="center">码率 (kbps)</th>
- </tr>
- </thead>
- <tbody><tr>
- <td align="center">480p</td>
- <td align="center">640</td>
- <td align="center">480</td>
- <td align="center">5</td>
- <td align="center">600</td>
- </tr>
- <tr>
- <td align="center">480p_2</td>
- <td align="center">640</td>
- <td align="center">480</td>
- <td align="center">30</td>
- <td align="center">1000</td>
- </tr>
- <tr>
- <td align="center">720p</td>
- <td align="center">1280</td>
- <td align="center">720</td>
- <td align="center">5</td>
- <td align="center">1000</td>
- </tr>
- <tr>
- <td align="center">720p_2</td>
- <td align="center">1280</td>
- <td align="center">720</td>
- <td align="center">30</td>
- <td align="center">2000</td>
- </tr>
- <tr>
- <td align="center">1080p</td>
- <td align="center">1920</td>
- <td align="center">1080</td>
- <td align="center">5</td>
- <td align="center">1500</td>
- </tr>
- <tr>
- <td align="center">1080p_2</td>
- <td align="center">1920</td>
- <td align="center">1080</td>
- <td align="center">30</td>
- <td align="center">2500</td>
- </tr>
- </tbody></table>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="switchdevicetype" class="tsd-anchor"></a>
- <h3>Switch<wbr>Device<wbr>Type</h3>
- <div class="tsd-signature tsd-kind-icon">Switch<wbr>Device<wbr>Type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"audio"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"video"</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>切换设备的类型</p>
- </div>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="videocodec" class="tsd-anchor"></a>
- <h3>Video<wbr>Codec</h3>
- <div class="tsd-signature tsd-kind-icon">Video<wbr>Codec<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"vp8"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"h264"</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>视频编解码格式</p>
- </div>
- </div>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-is-external">
- <a name="videoprofile" class="tsd-anchor"></a>
- <h3>Video<wbr>Profile</h3>
- <div class="tsd-signature tsd-kind-icon">Video<wbr>Profile<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"180p"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"180p_2"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"240p"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"360p"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"360p_2"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"480p"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"720p"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"720p_2"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"720p_3"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"1080p"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"1080p_2"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"1080p_3"</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>预设的视频 Profile</p>
- </div>
- <table>
- <thead>
- <tr>
- <th align="center">名称</th>
- <th align="center">视频宽</th>
- <th align="center">视频高</th>
- <th align="center">帧率 (fps)</th>
- <th align="center">码率 (kbps)</th>
- </tr>
- </thead>
- <tbody><tr>
- <td align="center">180p</td>
- <td align="center">240</td>
- <td align="center">180</td>
- <td align="center">15</td>
- <td align="center">200</td>
- </tr>
- <tr>
- <td align="center">180p_2</td>
- <td align="center">320</td>
- <td align="center">180</td>
- <td align="center">15</td>
- <td align="center">300</td>
- </tr>
- <tr>
- <td align="center">240p</td>
- <td align="center">320</td>
- <td align="center">240</td>
- <td align="center">15</td>
- <td align="center">400</td>
- </tr>
- <tr>
- <td align="center">360p</td>
- <td align="center">480</td>
- <td align="center">360</td>
- <td align="center">15</td>
- <td align="center">400</td>
- </tr>
- <tr>
- <td align="center">360p_2</td>
- <td align="center">640</td>
- <td align="center">360</td>
- <td align="center">15</td>
- <td align="center">500</td>
- </tr>
- <tr>
- <td align="center">480p</td>
- <td align="center">640</td>
- <td align="center">480</td>
- <td align="center">15</td>
- <td align="center">600</td>
- </tr>
- <tr>
- <td align="center">720p</td>
- <td align="center">1280</td>
- <td align="center">720</td>
- <td align="center">15</td>
- <td align="center">1000</td>
- </tr>
- <tr>
- <td align="center">720p_2</td>
- <td align="center">1280</td>
- <td align="center">720</td>
- <td align="center">15</td>
- <td align="center">1500</td>
- </tr>
- <tr>
- <td align="center">720p_3</td>
- <td align="center">1280</td>
- <td align="center">720</td>
- <td align="center">30</td>
- <td align="center">2000</td>
- </tr>
- <tr>
- <td align="center">1080p</td>
- <td align="center">1920</td>
- <td align="center">1080</td>
- <td align="center">15</td>
- <td align="center">1500</td>
- </tr>
- <tr>
- <td align="center">1080p_2</td>
- <td align="center">1920</td>
- <td align="center">1080</td>
- <td align="center">15</td>
- <td align="center">2000</td>
- </tr>
- <tr>
- <td align="center">1080p_3</td>
- <td align="center">1920</td>
- <td align="center">1080</td>
- <td align="center">30</td>
- <td align="center">2500</td>
- </tr>
- </tbody></table>
- </div>
- </section>
- </section>
- <section class="tsd-panel-group tsd-member-group tsd-is-external">
- <h2>Variables</h2>
- <section class="tsd-panel tsd-member tsd-kind-variable tsd-is-external">
- <a name="version" class="tsd-anchor"></a>
- <h3><span class="tsd-flag ts-flagConst">Const</span> version</h3>
- <div class="tsd-signature tsd-kind-icon">version<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = __VERSION__</span></div>
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>当前 sdk 的版本号</p>
- </div>
- </div>
- </section>
- </section>
- <section class="tsd-panel-group tsd-member-group ">
- <h2>Functions</h2>
- <section class="tsd-panel tsd-member tsd-kind-function">
- <a name="createclient" class="tsd-anchor"></a>
- <h3>create<wbr>Client</h3>
- <ul class="tsd-signatures tsd-kind-function">
- <li class="tsd-signature tsd-kind-icon">create<wbr>Client<span class="tsd-signature-symbol">(</span>appId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, opts<span class="tsd-signature-symbol">?: </span><a href="interfaces/clientoptions.html" class="tsd-signature-type">ClientOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="classes/client.html" class="tsd-signature-type">Client</a></li>
- </ul>
- <ul class="tsd-descriptions">
- <li class="tsd-description">
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>创建客户端</p>
- </div>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js"><span class="hljs-keyword">const</span> client = createClient(<span class="hljs-string">'AppID'</span>);
- client
- .join(<span class="hljs-string">'roomId'</span>, <span class="hljs-string">'userId'</span>, <span class="hljs-string">'token'</span>)
- .then(<span class="hljs-function">() =></span> {
- client.publish(localStream);
- })
- .catch(<span class="hljs-function">(<span class="hljs-params">err</span>) =></span> {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`加入房间失败 <span class="hljs-subst">${err}</span>`</span>);
- });</code></pre>
- </dd>
- <dt>throws</dt>
- <dd><p><a href="classes/rtcerror.html">RtcError</a></p>
- </dd>
- </dl>
- </div>
- <h4 class="tsd-parameters-title">Parameters</h4>
- <ul class="tsd-parameters">
- <li>
- <h5>appId: <span class="tsd-signature-type">string</span></h5>
- <div class="tsd-comment tsd-typography">
- <p>应用 ID,可在控制台查看</p>
- </div>
- </li>
- <li>
- <h5><span class="tsd-flag ts-flagOptional">Optional</span> opts: <a href="interfaces/clientoptions.html" class="tsd-signature-type">ClientOptions</a></h5>
- <div class="tsd-comment tsd-typography">
- <p>定义客户端的属性</p>
- </div>
- </li>
- </ul>
- <h4 class="tsd-returns-title">Returns <a href="classes/client.html" class="tsd-signature-type">Client</a></h4>
- </li>
- </ul>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-function">
- <a name="createstream" class="tsd-anchor"></a>
- <h3>create<wbr>Stream</h3>
- <ul class="tsd-signatures tsd-kind-function">
- <li class="tsd-signature tsd-kind-icon">create<wbr>Stream<span class="tsd-signature-symbol">(</span>opts<span class="tsd-signature-symbol">: </span><a href="interfaces/localstreamoptions.html" class="tsd-signature-type">LocalStreamOptions</a>, id<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">undefined</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><a href="classes/localstream.html" class="tsd-signature-type">LocalStream</a></li>
- </ul>
- <ul class="tsd-descriptions">
- <li class="tsd-description">
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>创建本地流</p>
- </div>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js"><span class="hljs-keyword">const</span> localStream = createStream({ <span class="hljs-attr">audio</span>: <span class="hljs-literal">true</span>, <span class="hljs-attr">video</span>: <span class="hljs-literal">true</span>, <span class="hljs-attr">screen</span>: <span class="hljs-literal">false</span> });
- localStream
- .init()
- .then(<span class="hljs-function">() =></span> {
- localStream
- .play(container)
- .catch(<span class="hljs-function">(<span class="hljs-params">err</span>) =></span> {<span class="hljs-built_in">console</span>.log(<span class="hljs-string">`播放失败: <span class="hljs-subst">${err}</span>`</span>)});
- })
- .catch(<span class="hljs-function">(<span class="hljs-params">err</span>) =></span> {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`本地流初始化失败 <span class="hljs-subst">${err}</span>`</span>);
- });</code></pre>
- </dd>
- <dt>throws</dt>
- <dd><p><a href="classes/rtcerror.html">RtcError</a></p>
- </dd>
- </dl>
- </div>
- <h4 class="tsd-parameters-title">Parameters</h4>
- <ul class="tsd-parameters">
- <li>
- <h5>opts: <a href="interfaces/localstreamoptions.html" class="tsd-signature-type">LocalStreamOptions</a></h5>
- <div class="tsd-comment tsd-typography">
- <p>必传,定义本地音视频流的属性</p>
- <blockquote>
- <p>注:</p>
- <ol>
- <li>video, screen 不可同时为 true</li>
- <li>audio, video, screen 不可同时为 false</li>
- <li>若指定了 file,则 init 时将优先使用 file 来创建初始化本地流的视频</li>
- <li>screenAudio 在不同浏览器上表现不同,参见 <a href="interfaces/localstreamoptions.html">LocalStreamOptions</a></li>
- </ol>
- </blockquote>
- </div>
- </li>
- <li>
- <h5><span class="tsd-flag ts-flagOptional">Optional</span> id: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5>
- <div class="tsd-comment tsd-typography">
- <p>选传,指定本地流的 ID,请注意创建多条流时,不可传入重复值</p>
- </div>
- </li>
- </ul>
- <h4 class="tsd-returns-title">Returns <a href="classes/localstream.html" class="tsd-signature-type">LocalStream</a></h4>
- </li>
- </ul>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-function tsd-is-external">
- <a name="devicedetection" class="tsd-anchor"></a>
- <h3>device<wbr>Detection</h3>
- <ul class="tsd-signatures tsd-kind-function tsd-is-external">
- <li class="tsd-signature tsd-kind-icon">device<wbr>Detection<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">: </span><a href="interfaces/devicedetectionoptions.html" class="tsd-signature-type">DeviceDetectionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
- </ul>
- <ul class="tsd-descriptions">
- <li class="tsd-description">
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>设备可用性检测 - 创建包含麦克风音频或摄像头视频的本地流时,有可能因为麦克风或摄像头设备问题(如驱动问题,或未经授权等),导致无法正确创建。此方法可用于设备检测,根据检测结果,再决定创建本地流时启用麦克风或摄像头或麦克风和摄像头</p>
- </div>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js">deviceDetection({<span class="hljs-attr">audio</span>: <span class="hljs-literal">true</span>, <span class="hljs-attr">video</span>: <span class="hljs-literal">true</span>})
- .then(<span class="hljs-function">() =></span> {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'设备可用'</span>);
- })
- .catch(<span class="hljs-function"><span class="hljs-params">err</span> =></span> {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`设备不可用,<span class="hljs-subst">${err}</span>`</span>);
- });</code></pre>
- </dd>
- <dt>reject</dt>
- <dd><p><a href="classes/rtcerror.html">RtcError</a></p>
- </dd>
- </dl>
- </div>
- <h4 class="tsd-parameters-title">Parameters</h4>
- <ul class="tsd-parameters">
- <li>
- <h5>options: <a href="interfaces/devicedetectionoptions.html" class="tsd-signature-type">DeviceDetectionOptions</a></h5>
- <div class="tsd-comment tsd-typography">
- <p>需指定设备时,请传入设备 ID</p>
- </div>
- </li>
- </ul>
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
- </li>
- </ul>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-function tsd-is-external">
- <a name="generatetoken" class="tsd-anchor"></a>
- <h3>generate<wbr>Token</h3>
- <ul class="tsd-signatures tsd-kind-function tsd-is-external">
- <li class="tsd-signature tsd-kind-icon">generate<wbr>Token<span class="tsd-signature-symbol">(</span>appId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, appKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, roomId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, userId<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">string</span></li>
- </ul>
- <ul class="tsd-descriptions">
- <li class="tsd-description">
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>根据 AppId,AppKey,RoomId,UserId 生成 token,用于开发阶段临时快速的加入房间并验证功能,由于 AppKey 不可暴露于公网,因此生产环境中不建议使用此方法生成 token。</p>
- </div>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js"><span class="hljs-keyword">const</span> token = generateToken(<span class="hljs-string">'urtc-xxx'</span>, <span class="hljs-string">'yyy'</span>, <span class="hljs-string">'roomId'</span>, <span class="hljs-string">'userId'</span>);
- client.join(<span class="hljs-string">'roomId'</span>, <span class="hljs-string">'userId'</span>, token);</code></pre>
- </dd>
- </dl>
- </div>
- <h4 class="tsd-parameters-title">Parameters</h4>
- <ul class="tsd-parameters">
- <li>
- <h5>appId: <span class="tsd-signature-type">string</span></h5>
- <div class="tsd-comment tsd-typography">
- <p>应用 ID,可在控制台查看</p>
- </div>
- </li>
- <li>
- <h5>appKey: <span class="tsd-signature-type">string</span></h5>
- <div class="tsd-comment tsd-typography">
- <p>应用密钥,可在控制台查看</p>
- </div>
- </li>
- <li>
- <h5>roomId: <span class="tsd-signature-type">string</span></h5>
- <div class="tsd-comment tsd-typography">
- <p>房间 ID</p>
- </div>
- </li>
- <li>
- <h5>userId: <span class="tsd-signature-type">string</span></h5>
- <div class="tsd-comment tsd-typography">
- <p>用户 ID</p>
- </div>
- </li>
- </ul>
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
- </li>
- </ul>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-function tsd-is-external">
- <a name="getcameras" class="tsd-anchor"></a>
- <h3>get<wbr>Cameras</h3>
- <ul class="tsd-signatures tsd-kind-function tsd-is-external">
- <li class="tsd-signature tsd-kind-icon">get<wbr>Cameras<span class="tsd-signature-symbol">(</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"><</span><span class="tsd-signature-type">MediaDeviceInfo</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li>
- </ul>
- <ul class="tsd-descriptions">
- <li class="tsd-description">
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>获取摄像头设备列表,点击 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo">MediaDeviceInfo</a> 查看详情</p>
- </div>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js">getCameras()
- .then(<span class="hljs-function"><span class="hljs-params">devices</span> =></span> {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`获取设备列表成功:`</span>, devices);
- })
- .catch(<span class="hljs-function"><span class="hljs-params">err</span> =></span> {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`获取设备列表失败:<span class="hljs-subst">${err}</span>`</span>);
- });</code></pre>
- </dd>
- <dt>reject</dt>
- <dd><p><a href="classes/rtcerror.html">RtcError</a></p>
- </dd>
- </dl>
- </div>
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">MediaDeviceInfo</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4>
- </li>
- </ul>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-function tsd-is-external">
- <a name="getdevices" class="tsd-anchor"></a>
- <h3>get<wbr>Devices</h3>
- <ul class="tsd-signatures tsd-kind-function tsd-is-external">
- <li class="tsd-signature tsd-kind-icon">get<wbr>Devices<span class="tsd-signature-symbol">(</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"><</span><span class="tsd-signature-type">MediaDeviceInfo</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li>
- </ul>
- <ul class="tsd-descriptions">
- <li class="tsd-description">
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>获取音视频输入/输出设备列表,点击 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo">MediaDeviceInfo</a> 查看详情</p>
- </div>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js">getDevices()
- .then(<span class="hljs-function"><span class="hljs-params">devices</span> =></span> {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`获取设备列表成功:`</span>, devices);
- })
- .catch(<span class="hljs-function"><span class="hljs-params">err</span> =></span> {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`获取设备列表失败:<span class="hljs-subst">${err}</span>`</span>);
- });</code></pre>
- </dd>
- <dt>reject</dt>
- <dd><p><a href="classes/rtcerror.html">RtcError</a></p>
- </dd>
- </dl>
- </div>
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">MediaDeviceInfo</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4>
- </li>
- </ul>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-function tsd-is-external">
- <a name="getloudspeakers" class="tsd-anchor"></a>
- <h3>get<wbr>Loudspeakers</h3>
- <ul class="tsd-signatures tsd-kind-function tsd-is-external">
- <li class="tsd-signature tsd-kind-icon">get<wbr>Loudspeakers<span class="tsd-signature-symbol">(</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"><</span><span class="tsd-signature-type">MediaDeviceInfo</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li>
- </ul>
- <ul class="tsd-descriptions">
- <li class="tsd-description">
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>获取扬声器设备列表,点击 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo">MediaDeviceInfo</a> 查看详情</p>
- </div>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js">getLoudspeakers()
- .then(<span class="hljs-function"><span class="hljs-params">devices</span> =></span> {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`获取设备列表成功:`</span>, devices);
- })
- .catch(<span class="hljs-function"><span class="hljs-params">err</span> =></span> {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`获取设备列表失败:<span class="hljs-subst">${err}</span>`</span>);
- });</code></pre>
- </dd>
- <dt>reject</dt>
- <dd><p><a href="classes/rtcerror.html">RtcError</a></p>
- </dd>
- </dl>
- </div>
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">MediaDeviceInfo</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4>
- </li>
- </ul>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-function tsd-is-external">
- <a name="getmicrophones" class="tsd-anchor"></a>
- <h3>get<wbr>Microphones</h3>
- <ul class="tsd-signatures tsd-kind-function tsd-is-external">
- <li class="tsd-signature tsd-kind-icon">get<wbr>Microphones<span class="tsd-signature-symbol">(</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"><</span><span class="tsd-signature-type">MediaDeviceInfo</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li>
- </ul>
- <ul class="tsd-descriptions">
- <li class="tsd-description">
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>获取麦克风设备列表,点击 <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo">MediaDeviceInfo</a> 查看详情</p>
- </div>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js">getMicrophones()
- .then(<span class="hljs-function"><span class="hljs-params">devices</span> =></span> {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`获取设备列表成功:`</span>, devices);
- })
- .catch(<span class="hljs-function"><span class="hljs-params">err</span> =></span> {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`获取设备列表失败:<span class="hljs-subst">${err}</span>`</span>);
- });</code></pre>
- </dd>
- <dt>reject</dt>
- <dd><p><a href="classes/rtcerror.html">RtcError</a></p>
- </dd>
- </dl>
- </div>
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">MediaDeviceInfo</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4>
- </li>
- </ul>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-function tsd-is-external">
- <a name="issupportscreenshare" class="tsd-anchor"></a>
- <h3>is<wbr>Support<wbr>Screen<wbr>Share</h3>
- <ul class="tsd-signatures tsd-kind-function tsd-is-external">
- <li class="tsd-signature tsd-kind-icon">is<wbr>Support<wbr>Screen<wbr>Share<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
- </ul>
- <ul class="tsd-descriptions">
- <li class="tsd-description">
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>检测浏览器是否支持屏幕共享</p>
- </div>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js"><span class="hljs-keyword">if</span> (!isSupportScreenShare()) {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`当前浏览器不支持屏幕共享`</span>);
- }</code></pre>
- </dd>
- </dl>
- </div>
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
- </li>
- </ul>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-function tsd-is-external">
- <a name="issupportwebrtc" class="tsd-anchor"></a>
- <h3>is<wbr>Support<wbr>WebRTC</h3>
- <ul class="tsd-signatures tsd-kind-function tsd-is-external">
- <li class="tsd-signature tsd-kind-icon">is<wbr>Support<wbr>WebRTC<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
- </ul>
- <ul class="tsd-descriptions">
- <li class="tsd-description">
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>检测浏览器是否完全(可访问本地音视频设备)支持 WebRTC。</p>
- </div>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js"><span class="hljs-keyword">if</span> (!isSupportWebRTC()) {
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`当前浏览器不完全支持 WebRTC,建议使用 Chrome 浏览器,iOS 系统建议使用 Safari 浏览器`</span>);
- }</code></pre>
- </dd>
- </dl>
- </div>
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
- </li>
- </ul>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-function">
- <a name="reportlog" class="tsd-anchor"></a>
- <h3>report<wbr>Log</h3>
- <ul class="tsd-signatures tsd-kind-function">
- <li class="tsd-signature tsd-kind-icon">report<wbr>Log<span class="tsd-signature-symbol">(</span>enable<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
- </ul>
- <ul class="tsd-descriptions">
- <li class="tsd-description">
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>开启/关闭操作/错误/状态日志的上报,未调用时,默认开启上报日志</p>
- </div>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js">reportLog(<span class="hljs-literal">false</span>); <span class="hljs-comment">// 关闭日志上报,关闭后,在线上出现错误时,将无法根据日志进行排查</span></code></pre>
- </dd>
- </dl>
- </div>
- <h4 class="tsd-parameters-title">Parameters</h4>
- <ul class="tsd-parameters">
- <li>
- <h5>enable: <span class="tsd-signature-type">boolean</span></h5>
- <div class="tsd-comment tsd-typography">
- <p>是否开启上报</p>
- </div>
- </li>
- </ul>
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
- </li>
- </ul>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-function">
- <a name="setloglevel" class="tsd-anchor"></a>
- <h3>set<wbr>Log<wbr>Level</h3>
- <ul class="tsd-signatures tsd-kind-function">
- <li class="tsd-signature tsd-kind-icon">set<wbr>Log<wbr>Level<span class="tsd-signature-symbol">(</span>level<span class="tsd-signature-symbol">: </span><a href="index.html#loglevel" class="tsd-signature-type">LogLevel</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
- </ul>
- <ul class="tsd-descriptions">
- <li class="tsd-description">
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>设置日志打印级别,用于打印出更多日志来调试或定位问题</p>
- </div>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js">setLogLevel(<span class="hljs-string">'info'</span>);</code></pre>
- </dd>
- </dl>
- </div>
- <h4 class="tsd-parameters-title">Parameters</h4>
- <ul class="tsd-parameters">
- <li>
- <h5>level: <a href="index.html#loglevel" class="tsd-signature-type">LogLevel</a></h5>
- <div class="tsd-comment tsd-typography">
- <p>日志级别,有 'debug', 'info', 'warn', 'error' 级别;</p>
- </div>
- </li>
- </ul>
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
- </li>
- </ul>
- </section>
- <section class="tsd-panel tsd-member tsd-kind-function tsd-is-external">
- <a name="setservers" class="tsd-anchor"></a>
- <h3>set<wbr>Servers</h3>
- <ul class="tsd-signatures tsd-kind-function tsd-is-external">
- <li class="tsd-signature tsd-kind-icon">set<wbr>Servers<span class="tsd-signature-symbol">(</span>conf<span class="tsd-signature-symbol">: </span><a href="interfaces/serverconfig.html" class="tsd-signature-type">ServerConfig</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
- </ul>
- <ul class="tsd-descriptions">
- <li class="tsd-description">
- <aside class="tsd-sources">
- </aside>
- <div class="tsd-comment tsd-typography">
- <div class="lead">
- <p>用于私有化部署时,指定部署的服务器地址</p>
- </div>
- <dl class="tsd-comment-tags">
- <dt>example</dt>
- <dd><pre><code class="language-js">setServers({
- <span class="hljs-attr">gateway</span>: <span class="hljs-string">'https://private-rtc.com'</span>, <span class="hljs-comment">// 指定网关</span>
- <span class="hljs-attr">log</span>: <span class="hljs-string">'https://log.private-rtc.com'</span>, <span class="hljs-comment">// 指定日志服务器</span>
- });</code></pre>
- <p><strong>特别地,单信令服务器时,不需要网关进行分配信令服务器,可以直接指定信令服务器</strong></p>
- <pre><code class="language-js">setServers({
- <span class="hljs-attr">signal</span>: <span class="hljs-string">'wss://private-rtc.com:5005'</span>, <span class="hljs-comment">// 直接指定信令服务器</span>
- <span class="hljs-attr">log</span>: <span class="hljs-string">'https://log.private-rtc.com'</span>, <span class="hljs-comment">// 指定日志服务器</span>
- });</code></pre>
- </dd>
- <dt>throws</dt>
- <dd><p><a href="classes/rtcerror.html">RtcError</a></p>
- </dd>
- </dl>
- </div>
- <h4 class="tsd-parameters-title">Parameters</h4>
- <ul class="tsd-parameters">
- <li>
- <h5>conf: <a href="interfaces/serverconfig.html" class="tsd-signature-type">ServerConfig</a></h5>
- <div class="tsd-comment tsd-typography">
- <p>服务器配置,具体描述参见 ServerConfig 的说明</p>
- </div>
- </li>
- </ul>
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
- </li>
- </ul>
- </section>
- </section>
- </div>
- <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
- <nav class="tsd-navigation primary">
- <ul>
- <li class="globals current ">
- <a href="index.html"><em>Globals</em></a>
- </li>
- </ul>
- </nav>
- <nav class="tsd-navigation secondary menu-sticky">
- <ul class="before-current">
- <li class=" tsd-kind-class tsd-is-external">
- <a href="classes/client.html" class="tsd-kind-icon">Client</a>
- </li>
- <li class=" tsd-kind-class tsd-is-external">
- <a href="classes/localstream.html" class="tsd-kind-icon">Local<wbr>Stream</a>
- </li>
- <li class=" tsd-kind-class tsd-is-external">
- <a href="classes/remotestream.html" class="tsd-kind-icon">Remote<wbr>Stream</a>
- </li>
- <li class=" tsd-kind-class tsd-is-external">
- <a href="classes/rtcerror.html" class="tsd-kind-icon">Rtc<wbr>Error</a>
- </li>
- <li class=" tsd-kind-class tsd-is-external">
- <a href="classes/stream.html" class="tsd-kind-icon">Stream</a>
- </li>
- <li class=" tsd-kind-class tsd-is-external">
- <a href="classes/user.html" class="tsd-kind-icon">User</a>
- </li>
- <li class=" tsd-kind-interface tsd-is-external">
- <a href="interfaces/audiostats.html" class="tsd-kind-icon">Audio<wbr>Stats</a>
- </li>
- <li class=" tsd-kind-interface tsd-is-external">
- <a href="interfaces/clientoptions.html" class="tsd-kind-icon">Client<wbr>Options</a>
- </li>
- <li class=" tsd-kind-interface tsd-is-external">
- <a href="interfaces/clientplugin.html" class="tsd-kind-icon">Client<wbr>Plugin</a>
- </li>
- <li class=" tsd-kind-interface tsd-is-external">
- <a href="interfaces/connectionstates.html" class="tsd-kind-icon">Connection<wbr>States</a>
- </li>
- <li class=" tsd-kind-interface tsd-is-external">
- <a href="interfaces/customvideoprofile.html" class="tsd-kind-icon">Custom<wbr>Video<wbr>Profile</a>
- </li>
- <li class=" tsd-kind-interface tsd-is-external">
- <a href="interfaces/devicedetectionoptions.html" class="tsd-kind-icon">Device<wbr>Detection<wbr>Options</a>
- </li>
- <li class=" tsd-kind-interface tsd-is-external">
- <a href="interfaces/joinoptions.html" class="tsd-kind-icon">Join<wbr>Options</a>
- </li>
- <li class=" tsd-kind-interface tsd-has-type-parameter tsd-is-external">
- <a href="interfaces/listener.html" class="tsd-kind-icon">Listener</a>
- </li>
- <li class=" tsd-kind-interface tsd-is-external">
- <a href="interfaces/localstreamoptions.html" class="tsd-kind-icon">Local<wbr>Stream<wbr>Options</a>
- </li>
- <li class=" tsd-kind-interface tsd-is-external">
- <a href="interfaces/networkstats.html" class="tsd-kind-icon">Network<wbr>Stats</a>
- </li>
- <li class=" tsd-kind-interface tsd-is-external">
- <a href="interfaces/playoptions.html" class="tsd-kind-icon">Play<wbr>Options</a>
- </li>
- <li class=" tsd-kind-interface tsd-has-type-parameter tsd-is-external">
- <a href="interfaces/rtcevent.html" class="tsd-kind-icon">Rtc<wbr>Event</a>
- </li>
- <li class=" tsd-kind-interface tsd-is-external">
- <a href="interfaces/serverconfig.html" class="tsd-kind-icon">Server<wbr>Config</a>
- </li>
- <li class=" tsd-kind-interface tsd-is-external">
- <a href="interfaces/streamplugin.html" class="tsd-kind-icon">Stream<wbr>Plugin</a>
- </li>
- <li class=" tsd-kind-interface tsd-is-external">
- <a href="interfaces/streamstats.html" class="tsd-kind-icon">Stream<wbr>Stats</a>
- </li>
- <li class=" tsd-kind-interface tsd-is-external">
- <a href="interfaces/videostats.html" class="tsd-kind-icon">Video<wbr>Stats</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#audiocodec" class="tsd-kind-icon">Audio<wbr>Codec</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#connectionstate" class="tsd-kind-icon">Connection<wbr>State</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#errorcode" class="tsd-kind-icon">Error<wbr>Code</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#loglevel" class="tsd-kind-icon">Log<wbr>Level</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#mediatype" class="tsd-kind-icon">Media<wbr>Type</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#playervideofittype" class="tsd-kind-icon">Player<wbr>Video<wbr>Fit<wbr>Type</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#roletype" class="tsd-kind-icon">Role<wbr>Type</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#roomtype" class="tsd-kind-icon">Room<wbr>Type</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#rtcconnectionevent" class="tsd-kind-icon">Rtc<wbr>Connection<wbr>Event</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#rtcconnectioneventtype" class="tsd-kind-icon">Rtc<wbr>Connection<wbr>Event<wbr>Type</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#rtceventtype" class="tsd-kind-icon">Rtc<wbr>Event<wbr>Type</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#rtcstreamevent" class="tsd-kind-icon">Rtc<wbr>Stream<wbr>Event</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#rtcstreameventtype" class="tsd-kind-icon">Rtc<wbr>Stream<wbr>Event<wbr>Type</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#rtcuserevent" class="tsd-kind-icon">Rtc<wbr>User<wbr>Event</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#rtcusereventtype" class="tsd-kind-icon">Rtc<wbr>User<wbr>Event<wbr>Type</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#screenprofile" class="tsd-kind-icon">Screen<wbr>Profile</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#switchdevicetype" class="tsd-kind-icon">Switch<wbr>Device<wbr>Type</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#videocodec" class="tsd-kind-icon">Video<wbr>Codec</a>
- </li>
- <li class=" tsd-kind-type-alias tsd-is-external">
- <a href="index.html#videoprofile" class="tsd-kind-icon">Video<wbr>Profile</a>
- </li>
- <li class=" tsd-kind-variable tsd-is-external">
- <a href="index.html#version" class="tsd-kind-icon">version</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="index.html#createclient" class="tsd-kind-icon">create<wbr>Client</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="index.html#createstream" class="tsd-kind-icon">create<wbr>Stream</a>
- </li>
- <li class=" tsd-kind-function tsd-is-external">
- <a href="index.html#devicedetection" class="tsd-kind-icon">device<wbr>Detection</a>
- </li>
- <li class=" tsd-kind-function tsd-is-external">
- <a href="index.html#generatetoken" class="tsd-kind-icon">generate<wbr>Token</a>
- </li>
- <li class=" tsd-kind-function tsd-is-external">
- <a href="index.html#getcameras" class="tsd-kind-icon">get<wbr>Cameras</a>
- </li>
- <li class=" tsd-kind-function tsd-is-external">
- <a href="index.html#getdevices" class="tsd-kind-icon">get<wbr>Devices</a>
- </li>
- <li class=" tsd-kind-function tsd-is-external">
- <a href="index.html#getloudspeakers" class="tsd-kind-icon">get<wbr>Loudspeakers</a>
- </li>
- <li class=" tsd-kind-function tsd-is-external">
- <a href="index.html#getmicrophones" class="tsd-kind-icon">get<wbr>Microphones</a>
- </li>
- <li class=" tsd-kind-function tsd-is-external">
- <a href="index.html#issupportscreenshare" class="tsd-kind-icon">is<wbr>Support<wbr>Screen<wbr>Share</a>
- </li>
- <li class=" tsd-kind-function tsd-is-external">
- <a href="index.html#issupportwebrtc" class="tsd-kind-icon">is<wbr>Support<wbr>WebRTC</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="index.html#reportlog" class="tsd-kind-icon">report<wbr>Log</a>
- </li>
- <li class=" tsd-kind-function">
- <a href="index.html#setloglevel" class="tsd-kind-icon">set<wbr>Log<wbr>Level</a>
- </li>
- <li class=" tsd-kind-function tsd-is-external">
- <a href="index.html#setservers" class="tsd-kind-icon">set<wbr>Servers</a>
- </li>
- </ul>
- </nav>
- </div>
- </div>
- </div>
- <footer class="with-border-bottom">
- <div class="container">
- <h2>Legend</h2>
- <div class="tsd-legend-group">
- </div>
- </div>
- </footer>
- <div class="container tsd-generator">
- <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
- </div>
- <div class="overlay"></div>
- <script src="assets/js/main.js"></script>
- </body>
- </html>
|