| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347 |
- <!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/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/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>
|