浏览代码

更新版本到 2.0.0-beta.3

ChangeLog
1. 修复切换网络后远端流播放停止的问题
2. 修复 getDevices 问题
3. 修复断线重连后,unmute-video 事件被异常触发的问题
4. 获取设备信息时,过滤掉 default 和 communications 两种设备
5. 新增 RtcDeviceChangedEventType 事件类型
6. 支持设备移除后尝试自动切换到可用设备
7. 添加 error 事件,ICE_FAILED 事件类型
poplark 4 年之前
父节点
当前提交
b7834addec

文件差异内容过多而无法显示
+ 1 - 1
docs/assets/js/search.js


文件差异内容过多而无法显示
+ 3 - 42
docs/classes/client.html


文件差异内容过多而无法显示
+ 21 - 43
docs/classes/localstream.html


文件差异内容过多而无法显示
+ 20 - 42
docs/classes/remotestream.html


+ 18 - 3
docs/classes/rtcerror.html

@@ -109,6 +109,7 @@
 								<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="rtcerror.html#connection_failed" class="tsd-kind-icon">CONNECTION_<wbr>FAILED</a></li>
 								<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="rtcerror.html#get_access_token_failed" class="tsd-kind-icon">GET_<wbr>ACCESS_<wbr>TOKEN_<wbr>FAILED</a></li>
 								<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="rtcerror.html#gw_unreachable" class="tsd-kind-icon">GW_<wbr>UNREACHABLE</a></li>
+								<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="rtcerror.html#ice_failed" class="tsd-kind-icon">ICE_<wbr>FAILED</a></li>
 								<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="rtcerror.html#invalid_operation" class="tsd-kind-icon">INVALID_<wbr>OPERATION</a></li>
 								<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="rtcerror.html#invalid_parameter" class="tsd-kind-icon">INVALID_<wbr>PARAMETER</a></li>
 								<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="rtcerror.html#is_joining" class="tsd-kind-icon">IS_<wbr>JOINING</a></li>
@@ -287,6 +288,18 @@
 					</div>
 				</section>
 				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
+					<a name="ice_failed" class="tsd-anchor"></a>
+					<h3><span class="tsd-flag ts-flagStatic">Static</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> ICE_<wbr>FAILED</h3>
+					<div class="tsd-signature tsd-kind-icon">ICE_<wbr>FAILED<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;3024&quot;</span><span class="tsd-signature-symbol"> = &#x27;3024&#x27;</span></div>
+					<aside class="tsd-sources">
+					</aside>
+					<div class="tsd-comment tsd-typography">
+						<div class="lead">
+							<p>3024 - ICE 建连失败</p>
+						</div>
+					</div>
+				</section>
+				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
 					<a name="invalid_operation" class="tsd-anchor"></a>
 					<h3><span class="tsd-flag ts-flagStatic">Static</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> INVALID_<wbr>OPERATION</h3>
 					<div class="tsd-signature tsd-kind-icon">INVALID_<wbr>OPERATION<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;1001&quot;</span><span class="tsd-signature-symbol"> = &#x27;1001&#x27;</span></div>
@@ -709,6 +722,9 @@
 								<a href="rtcerror.html#gw_unreachable" class="tsd-kind-icon">GW_<wbr>UNREACHABLE</a>
 							</li>
 							<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
+								<a href="rtcerror.html#ice_failed" class="tsd-kind-icon">ICE_<wbr>FAILED</a>
+							</li>
+							<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
 								<a href="rtcerror.html#invalid_operation" class="tsd-kind-icon">INVALID_<wbr>OPERATION</a>
 							</li>
 							<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
@@ -824,11 +840,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

文件差异内容过多而无法显示
+ 19 - 4
docs/classes/stream.html


+ 2 - 3
docs/classes/user.html

@@ -150,11 +150,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

文件差异内容过多而无法显示
+ 110 - 6
docs/index.html


+ 2 - 3
docs/interfaces/audiostats.html

@@ -198,11 +198,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 2 - 3
docs/interfaces/clientoptions.html

@@ -150,11 +150,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 2 - 3
docs/interfaces/clientplugin.html

@@ -149,11 +149,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 2 - 3
docs/interfaces/codecs.html

@@ -166,11 +166,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 2 - 3
docs/interfaces/connectionstates.html

@@ -166,11 +166,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 199 - 0
docs/interfaces/devicechangedeventdata.html

@@ -0,0 +1,199 @@
+<!doctype html>
+<html class="default no-js">
+<head>
+	<meta charset="utf-8">
+	<meta http-equiv="X-UA-Compatible" content="IE=edge">
+	<title>DeviceChangedEventData | @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">
+	<script async src="../assets/js/search.js" id="search-script"></script>
+</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">@urtc/sdk-web</a>
+				</li>
+				<li>
+					<a href="devicechangedeventdata.html">DeviceChangedEventData</a>
+				</li>
+			</ul>
+			<h1>Interface DeviceChangedEventData</h1>
+		</div>
+	</div>
+</header>
+<div class="container container-main">
+	<div class="row">
+		<div class="col-8 col-content">
+			<section class="tsd-panel tsd-comment">
+				<div class="tsd-comment tsd-typography">
+					<div class="lead">
+						<p>设备变化事件对应数据</p>
+					</div>
+				</div>
+			</section>
+			<section class="tsd-panel tsd-hierarchy">
+				<h3>Hierarchy</h3>
+				<ul class="tsd-hierarchy">
+					<li>
+						<span class="target">DeviceChangedEventData</span>
+					</li>
+				</ul>
+			</section>
+			<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 ">
+							<h3>Properties</h3>
+							<ul class="tsd-index-list">
+								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="devicechangedeventdata.html#device" class="tsd-kind-icon">device</a></li>
+								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="devicechangedeventdata.html#status" class="tsd-kind-icon">status</a></li>
+								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="devicechangedeventdata.html#type" class="tsd-kind-icon">type</a></li>
+							</ul>
+						</section>
+					</div>
+				</section>
+			</section>
+			<section class="tsd-panel-group tsd-member-group ">
+				<h2>Properties</h2>
+				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
+					<a name="device" class="tsd-anchor"></a>
+					<h3>device</h3>
+					<div class="tsd-signature tsd-kind-icon">device<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">MediaDeviceInfo</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-property tsd-parent-kind-interface">
+					<a name="status" class="tsd-anchor"></a>
+					<h3>status</h3>
+					<div class="tsd-signature tsd-kind-icon">status<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;remove&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;add&quot;</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-property tsd-parent-kind-interface">
+					<a name="type" class="tsd-anchor"></a>
+					<h3>type</h3>
+					<div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;camera&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;microphone&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;loudspeaker&quot;</span></div>
+					<aside class="tsd-sources">
+					</aside>
+					<div class="tsd-comment tsd-typography">
+						<div class="lead">
+							<p>设备类型,麦克风/摄像头/扬声器</p>
+						</div>
+					</div>
+				</section>
+			</section>
+		</div>
+		<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
+			<nav class="tsd-navigation primary">
+				<ul>
+					<li class=" ">
+						<a href="../index.html">Exports</a>
+					</li>
+				</ul>
+			</nav>
+			<nav class="tsd-navigation secondary menu-sticky">
+				<ul class="before-current">
+				</ul>
+				<ul class="current">
+					<li class="current tsd-kind-interface">
+						<a href="devicechangedeventdata.html" class="tsd-kind-icon">Device<wbr>Changed<wbr>Event<wbr>Data</a>
+						<ul>
+							<li class=" tsd-kind-property tsd-parent-kind-interface">
+								<a href="devicechangedeventdata.html#device" class="tsd-kind-icon">device</a>
+							</li>
+							<li class=" tsd-kind-property tsd-parent-kind-interface">
+								<a href="devicechangedeventdata.html#status" class="tsd-kind-icon">status</a>
+							</li>
+							<li class=" tsd-kind-property tsd-parent-kind-interface">
+								<a href="devicechangedeventdata.html#type" class="tsd-kind-icon">type</a>
+							</li>
+						</ul>
+					</li>
+				</ul>
+				<ul class="after-current">
+				</ul>
+			</nav>
+		</div>
+	</div>
+</div>
+<footer class="with-border-bottom">
+	<div class="container">
+		<h2>Legend</h2>
+		<div class="tsd-legend-group">
+			<ul class="tsd-legend">
+				<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
+			</ul>
+			<ul class="tsd-legend">
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
+				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
+			</ul>
+			<ul class="tsd-legend">
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+			</ul>
+			<ul class="tsd-legend">
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
+			</ul>
+		</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>

+ 2 - 3
docs/interfaces/devicedetectionoptions.html

@@ -198,11 +198,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 183 - 0
docs/interfaces/getdevicesoptions.html

@@ -0,0 +1,183 @@
+<!doctype html>
+<html class="default no-js">
+<head>
+	<meta charset="utf-8">
+	<meta http-equiv="X-UA-Compatible" content="IE=edge">
+	<title>GetDevicesOptions | @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">
+	<script async src="../assets/js/search.js" id="search-script"></script>
+</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">@urtc/sdk-web</a>
+				</li>
+				<li>
+					<a href="getdevicesoptions.html">GetDevicesOptions</a>
+				</li>
+			</ul>
+			<h1>Interface GetDevicesOptions</h1>
+		</div>
+	</div>
+</header>
+<div class="container container-main">
+	<div class="row">
+		<div class="col-8 col-content">
+			<section class="tsd-panel tsd-comment">
+				<div class="tsd-comment tsd-typography">
+					<div class="lead">
+						<p>获取音视频输入/输出设备列表参数</p>
+					</div>
+				</div>
+			</section>
+			<section class="tsd-panel tsd-hierarchy">
+				<h3>Hierarchy</h3>
+				<ul class="tsd-hierarchy">
+					<li>
+						<span class="target">GetDevicesOptions</span>
+					</li>
+				</ul>
+			</section>
+			<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 ">
+							<h3>Properties</h3>
+							<ul class="tsd-index-list">
+								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="getdevicesoptions.html#audio" class="tsd-kind-icon">audio</a></li>
+								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="getdevicesoptions.html#video" class="tsd-kind-icon">video</a></li>
+							</ul>
+						</section>
+					</div>
+				</section>
+			</section>
+			<section class="tsd-panel-group tsd-member-group ">
+				<h2>Properties</h2>
+				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
+					<a name="audio" class="tsd-anchor"></a>
+					<h3>audio</h3>
+					<div class="tsd-signature tsd-kind-icon">audio<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</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-property tsd-parent-kind-interface">
+					<a name="video" class="tsd-anchor"></a>
+					<h3>video</h3>
+					<div class="tsd-signature tsd-kind-icon">video<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
+					<aside class="tsd-sources">
+					</aside>
+					<div class="tsd-comment tsd-typography">
+						<div class="lead">
+							<p>获取视频输入设备列表</p>
+						</div>
+					</div>
+				</section>
+			</section>
+		</div>
+		<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
+			<nav class="tsd-navigation primary">
+				<ul>
+					<li class=" ">
+						<a href="../index.html">Exports</a>
+					</li>
+				</ul>
+			</nav>
+			<nav class="tsd-navigation secondary menu-sticky">
+				<ul class="before-current">
+				</ul>
+				<ul class="current">
+					<li class="current tsd-kind-interface">
+						<a href="getdevicesoptions.html" class="tsd-kind-icon">Get<wbr>Devices<wbr>Options</a>
+						<ul>
+							<li class=" tsd-kind-property tsd-parent-kind-interface">
+								<a href="getdevicesoptions.html#audio" class="tsd-kind-icon">audio</a>
+							</li>
+							<li class=" tsd-kind-property tsd-parent-kind-interface">
+								<a href="getdevicesoptions.html#video" class="tsd-kind-icon">video</a>
+							</li>
+						</ul>
+					</li>
+				</ul>
+				<ul class="after-current">
+				</ul>
+			</nav>
+		</div>
+	</div>
+</div>
+<footer class="with-border-bottom">
+	<div class="container">
+		<h2>Legend</h2>
+		<div class="tsd-legend-group">
+			<ul class="tsd-legend">
+				<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
+			</ul>
+			<ul class="tsd-legend">
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
+				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
+			</ul>
+			<ul class="tsd-legend">
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+			</ul>
+			<ul class="tsd-legend">
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
+			</ul>
+		</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>

+ 2 - 3
docs/interfaces/joinoptions.html

@@ -166,11 +166,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 2 - 3
docs/interfaces/localstreamoptions.html

@@ -332,11 +332,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 2 - 3
docs/interfaces/networkqualities.html

@@ -166,11 +166,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 2 - 3
docs/interfaces/networkstats.html

@@ -150,11 +150,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 34 - 18
docs/interfaces/playereventdata.html

@@ -7,6 +7,7 @@
 	<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">
+	<script async src="../assets/js/search.js" id="search-script"></script>
 </head>
 <body>
 <header>
@@ -51,7 +52,7 @@
 		<div class="container">
 			<ul class="tsd-breadcrumb">
 				<li>
-					<a href="../index.html">Globals</a>
+					<a href="../index.html">@urtc/sdk-web</a>
 				</li>
 				<li>
 					<a href="playereventdata.html">PlayerEventData</a>
@@ -83,23 +84,23 @@
 				<h2>Index</h2>
 				<section class="tsd-panel tsd-index-panel">
 					<div class="tsd-index-content">
-						<section class="tsd-index-section tsd-is-external">
+						<section class="tsd-index-section ">
 							<h3>Properties</h3>
 							<ul class="tsd-index-list">
-								<li class="tsd-kind-property tsd-parent-kind-interface tsd-is-external"><a href="playereventdata.html#status" class="tsd-kind-icon">status</a></li>
-								<li class="tsd-kind-property tsd-parent-kind-interface tsd-is-external"><a href="playereventdata.html#stream" class="tsd-kind-icon">stream</a></li>
-								<li class="tsd-kind-property tsd-parent-kind-interface tsd-is-external"><a href="playereventdata.html#type" class="tsd-kind-icon">type</a></li>
+								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="playereventdata.html#status" class="tsd-kind-icon">status</a></li>
+								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="playereventdata.html#stream" class="tsd-kind-icon">stream</a></li>
+								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="playereventdata.html#type" class="tsd-kind-icon">type</a></li>
 							</ul>
 						</section>
 					</div>
 				</section>
 			</section>
-			<section class="tsd-panel-group tsd-member-group tsd-is-external">
+			<section class="tsd-panel-group tsd-member-group ">
 				<h2>Properties</h2>
-				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-external">
+				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
 					<a name="status" class="tsd-anchor"></a>
 					<h3>status</h3>
-					<div class="tsd-signature tsd-kind-icon">status<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"playing"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"paused"</span></div>
+					<div class="tsd-signature tsd-kind-icon">status<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;playing&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;paused&quot;</span></div>
 					<aside class="tsd-sources">
 					</aside>
 					<div class="tsd-comment tsd-typography">
@@ -108,10 +109,10 @@
 						</div>
 					</div>
 				</section>
-				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-external">
+				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
 					<a name="stream" class="tsd-anchor"></a>
 					<h3>stream</h3>
-					<div class="tsd-signature tsd-kind-icon">stream<span class="tsd-signature-symbol">:</span> <a href="../classes/stream.html" class="tsd-signature-type">Stream</a></div>
+					<div class="tsd-signature tsd-kind-icon">stream<span class="tsd-signature-symbol">:</span> <a href="../classes/stream.html" class="tsd-signature-type" data-tsd-kind="Class">Stream</a></div>
 					<aside class="tsd-sources">
 					</aside>
 					<div class="tsd-comment tsd-typography">
@@ -120,10 +121,10 @@
 						</div>
 					</div>
 				</section>
-				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-external">
+				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
 					<a name="type" class="tsd-anchor"></a>
 					<h3>type</h3>
-					<div class="tsd-signature tsd-kind-icon">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>
+					<div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;audio&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;video&quot;</span></div>
 					<aside class="tsd-sources">
 					</aside>
 					<div class="tsd-comment tsd-typography">
@@ -137,8 +138,8 @@
 		<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
 			<nav class="tsd-navigation primary">
 				<ul>
-					<li class="globals  ">
-						<a href="../index.html"><em>Globals</em></a>
+					<li class=" ">
+						<a href="../index.html">Exports</a>
 					</li>
 				</ul>
 			</nav>
@@ -146,16 +147,16 @@
 				<ul class="before-current">
 				</ul>
 				<ul class="current">
-					<li class="current tsd-kind-interface tsd-is-external">
+					<li class="current tsd-kind-interface">
 						<a href="playereventdata.html" class="tsd-kind-icon">Player<wbr>Event<wbr>Data</a>
 						<ul>
-							<li class=" tsd-kind-property tsd-parent-kind-interface tsd-is-external">
+							<li class=" tsd-kind-property tsd-parent-kind-interface">
 								<a href="playereventdata.html#status" class="tsd-kind-icon">status</a>
 							</li>
-							<li class=" tsd-kind-property tsd-parent-kind-interface tsd-is-external">
+							<li class=" tsd-kind-property tsd-parent-kind-interface">
 								<a href="playereventdata.html#stream" class="tsd-kind-icon">stream</a>
 							</li>
-							<li class=" tsd-kind-property tsd-parent-kind-interface tsd-is-external">
+							<li class=" tsd-kind-property tsd-parent-kind-interface">
 								<a href="playereventdata.html#type" class="tsd-kind-icon">type</a>
 							</li>
 						</ul>
@@ -171,6 +172,21 @@
 	<div class="container">
 		<h2>Legend</h2>
 		<div class="tsd-legend-group">
+			<ul class="tsd-legend">
+				<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
+			</ul>
+			<ul class="tsd-legend">
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
+				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
+			</ul>
+			<ul class="tsd-legend">
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+			</ul>
+			<ul class="tsd-legend">
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
+			</ul>
 		</div>
 	</div>
 </footer>

+ 2 - 3
docs/interfaces/playoptions.html

@@ -198,11 +198,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 11 - 8
docs/interfaces/rtcevent.html

@@ -70,11 +70,15 @@
 					<div class="lead">
 						<p>Rtc 事件</p>
 					</div>
-					<p>当 type - T 为 <a href="../index.html#rtcusereventtype">RtcUserEventType</a> 事件时,data - S 为 <a href="../classes/user.html">User</a> 类型
-						当 type - T 为 <a href="../index.html#rtcstreameventtype">RtcStreamEventType</a> 事件时,data - S 为 <a href="../classes/localstream.html">LocalStream</a> | <a href="../classes/remotestream.html">RemoteStream</a> 类型
-						当 type - T 为 <a href="../index.html#rtcconnectionstateeventtype"></a> 事件时,data - S 为 <a href="connectionstates.html"></a> 类型
-						当 type - T 为 <a href="../index.html#rtcnetworkqualityeventtype"></a> 事件时,data - S 为 <a href="networkqualities.html"></a> 类型
-					当 type - T 为 <a href="../index.html#rtcplayereventtype"></a> 事件时,data - S 为 {@link PlayerEventData } 类型</p>
+					<ul>
+						<li>当 type - T 为 <a href="../index.html#rtcusereventtype">RtcUserEventType</a> 事件时,data - S 为 <a href="../classes/user.html">User</a> 类型</li>
+						<li>当 type - T 为 <a href="../index.html#rtcstreameventtype">RtcStreamEventType</a> 事件时,data - S 为 <a href="../classes/localstream.html">LocalStream</a> | <a href="../classes/remotestream.html">RemoteStream</a> 类型</li>
+						<li>当 type - T 为 <a href="../index.html#rtcconnectionstateeventtype"></a> 事件时,data - S 为 <a href="connectionstates.html"></a> 类型</li>
+						<li>当 type - T 为 <a href="../index.html#rtcnetworkqualityeventtype"></a> 事件时,data - S 为 <a href="networkqualities.html"></a> 类型</li>
+						<li>当 type - T 为 <a href="../index.html#rtcplayereventtype"></a> 事件时,data - S 为 <a href="playereventdata.html"></a> 类型</li>
+						<li>当 type - T 为 <a href="../index.html#rtcdevicechangedeventtype"></a> 事件时,data - S 为 {@link RtcDeviceChangedEventData } 类型</li>
+						<li>当 type - T 为 <a href="../index.html#rtcerroreventtype"></a> 事件时,data - S 为 <a href="../classes/rtcerror.html"></a> 类型</li>
+					</ul>
 				</div>
 			</section>
 			<section class="tsd-panel tsd-type-parameters">
@@ -172,11 +176,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 2 - 3
docs/interfaces/serverconfig.html

@@ -187,11 +187,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 2 - 3
docs/interfaces/snapshotoptions.html

@@ -168,11 +168,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 2 - 3
docs/interfaces/streamplugin.html

@@ -149,11 +149,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 2 - 3
docs/interfaces/streamstats.html

@@ -182,11 +182,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 2 - 3
docs/interfaces/videostats.html

@@ -230,11 +230,10 @@
 				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
-				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
 			</ul>
 			<ul class="tsd-legend">
-				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
+				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
 			</ul>
 		</div>
 	</div>

+ 121 - 65
lib/index.d.ts

@@ -3,6 +3,7 @@
 declare module '@urtc/sdk-web' {
   import { Client } from '__@urtc/sdk-web/client';
   import { LocalStream, LocalStreamOptions } from '__@urtc/sdk-web/stream/local-stream';
+  import { RemoteStream } from '__@urtc/sdk-web/stream/remote-stream';
   import { generateToken } from '__@urtc/sdk-web/utils/token';
   import { ClientOptions } from '__@urtc/sdk-web/types';
   import { LogLevel } from '__@urtc/sdk-web/logger';
@@ -87,7 +88,7 @@ declare module '@urtc/sdk-web' {
   export * from '__@urtc/sdk-web/types';
   export * from '__@urtc/sdk-web/event';
   export * from '__@urtc/sdk-web/error';
-  export * from '__@urtc/sdk-web/user/user';
+  export * from '__@urtc/sdk-web/user';
   export * from '__@urtc/sdk-web/stream/stream';
   export * from '__@urtc/sdk-web/stream/local-stream';
   export * from '__@urtc/sdk-web/stream/remote-stream';
@@ -97,7 +98,7 @@ declare module '@urtc/sdk-web' {
   /************** 4 plugin ****************/
   export { Client };
   export { LocalStream };
-  export { RemoteStream } from '__@urtc/sdk-web/stream/remote-stream';
+  export { RemoteStream };
 }
 
 declare module '__@urtc/sdk-web/client' {
@@ -105,21 +106,14 @@ declare module '__@urtc/sdk-web/client' {
   import { Listener } from '__@urtc/sdk-web/event-emitter';
   import { LocalStream } from '__@urtc/sdk-web/stream/local-stream';
   import { RemoteStream } from '__@urtc/sdk-web/stream/remote-stream';
-  import { User } from '__@urtc/sdk-web/user/user';
+  import { User } from '__@urtc/sdk-web/user';
   import { JoinOptions, RoleType } from '__@urtc/sdk-web/types';
-  import { ClientPlugin } from '__@urtc/sdk-web/plugin';
   /**
     * RTC 客户端,可进行加入、离开房间,发布、订阅流等操作。
     * @public
     */
   export class Client {
       /**
-        * 加载 Client 插件,使用插件功能
-        * @param plugin - 插件
-        * @param options - 插件初始化参数
-        */
-      static use(plugin: ClientPlugin, options?: any): void;
-      /**
         * 获取远端用户信息
         * @example
         * ```js
@@ -292,7 +286,6 @@ declare module '__@urtc/sdk-web/stream/local-stream' {
   import { Stream } from '__@urtc/sdk-web/stream/stream';
   import { SwitchDeviceType } from '__@urtc/sdk-web/stream/types';
   import { VideoProfile, ScreenProfile, CustomVideoProfile } from '__@urtc/sdk-web/stream/profile';
-  import { StreamPlugin } from '__@urtc/sdk-web/plugin';
   /**
     * 指定使用前置或后置摄像头,'user'(前置摄像头)或 'environment'(后置摄像头)
     */
@@ -359,12 +352,6 @@ declare module '__@urtc/sdk-web/stream/local-stream' {
     */
   export class LocalStream extends Stream {
       /**
-        * 加载流插件,使用插件功能
-        * @param plugin - 插件
-        * @param options - 插件初始化参数
-        */
-      static use(plugin: StreamPlugin, options?: any): void;
-      /**
         * 判断当前流是否有音频
         * @example
         * ```js
@@ -419,7 +406,7 @@ declare module '__@urtc/sdk-web/stream/local-stream' {
       /**
         * 替换当前流中的媒体轨道
         * > 注:
-        * > 1. 替换视频时,建议使用与原轨道相同的分辨率的视频轨道,若不相同,请在替换后及时设置流的 profile 来调整到合适的码率等
+        * > 1. 替换视频时,建议使用与原轨道相同的分辨率的媒体轨道,若不相同,请在替换后及时设置流的 profile 来调整到合适的码率等
         * > 2. 返回值为当前流中相同类型的媒体轨道,此媒体轨道仍可用(占用音频设备或视频设备),请自行决定是否调用其 stop 方法释放设备
         * > 3. 若是切换不同的摄像头或麦克风设备,建议使用 switchDevice 方法,若是切换静态图片为视频流,建立使用 switchImage 方法
         * @param track - 新媒体轨道
@@ -520,6 +507,33 @@ declare module '__@urtc/sdk-web/stream/local-stream' {
   }
 }
 
+declare module '__@urtc/sdk-web/stream/remote-stream' {
+  import { Stream } from '__@urtc/sdk-web/stream/stream';
+  /**
+    * 远端流,房间内其他用户发布的流,可通过 client 进行订阅
+    */
+  export class RemoteStream extends Stream {
+      /**
+        * 音频源是否已 mute,当源端 mute/unmute 音频时,本端将收到 `mute-audio` 或 `unmute-audio` 事件的通知,同时此值将变为对应值
+        */
+      sourceAudioMuted: boolean;
+      /**
+        * 视频源是否已 mute,当源端 mute/unmute 视频时,本端将收到 `mute-video` 或 `unmute-video` 事件的通知,同时此值将变为对应值
+        */
+      sourceVideoMuted: boolean;
+      /**
+        * 设置输出音量,默认为 100
+        * @param volume - 音量大小, 可设范围[0-100]
+        * @throws RtcError
+        * @example
+        * ```js
+        * stream.setAudioVolume(50);
+        * ```
+        */
+      setAudioVolume(volume: number): void;
+  }
+}
+
 declare module '__@urtc/sdk-web/utils/token' {
   /**
     * 根据 AppId,AppKey,RoomId,UserId 生成 token,用于开发阶段临时快速的加入房间并验证功能,由于 AppKey 不可暴露于公网,因此生产环境中不建议使用此方法生成 token。
@@ -658,6 +672,19 @@ declare module '__@urtc/sdk-web/logger' {
 declare module '__@urtc/sdk-web/devices' {
   import { Codecs } from '__@urtc/sdk-web/types';
   /**
+    * 获取音视频输入/输出设备列表参数
+    */
+  export interface GetDevicesOptions {
+      /**
+        * 获取音频输入/输出设备列表
+        */
+      audio: boolean;
+      /**
+        * 获取视频输入设备列表
+        */
+      video: boolean;
+  }
+  /**
     * 获取音视频输入/输出设备列表,点击 [MediaDeviceInfo](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo) 查看详情
     * @public
     * @example
@@ -672,7 +699,7 @@ declare module '__@urtc/sdk-web/devices' {
     * ```
     * @reject {@link RtcError}
     */
-  export function getDevices(): Promise<MediaDeviceInfo[]>;
+  export function getDevices(opts?: GetDevicesOptions): Promise<MediaDeviceInfo[]>;
   /**
     * 获取摄像头设备列表,点击 [MediaDeviceInfo](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo) 查看详情
     * @public
@@ -800,12 +827,13 @@ declare module '__@urtc/sdk-web/devices' {
 }
 
 declare module '__@urtc/sdk-web/event' {
-  import { User } from '__@urtc/sdk-web/user/user';
+  import { User } from '__@urtc/sdk-web/user';
   import { Stream } from '__@urtc/sdk-web/stream/stream';
   import { ConnectionStates } from '__@urtc/sdk-web/connection/types';
   import { LocalStream } from '__@urtc/sdk-web/stream/local-stream';
   import { RemoteStream } from '__@urtc/sdk-web/stream/remote-stream';
   import { NetworkQualities } from '__@urtc/sdk-web/stream/types';
+  import { RtcError } from '__@urtc/sdk-web/error';
   /**
     * Rtc 用户事件类型:
     *
@@ -884,7 +912,7 @@ declare module '__@urtc/sdk-web/event' {
     * 播放状态改变事件对应数据
     * @public
     */
-  interface PlayerEventData {
+  export interface PlayerEventData {
       /**
         * 类型,音频/视频
         */
@@ -927,18 +955,62 @@ declare module '__@urtc/sdk-web/event' {
     */
   export type RtcNetworkQualityEventType = 'network-quality';
   /**
+    * 设备变化事件
+    * - device-changed - 设备变化(新增或移除)
+    * @public
+    * @example
+    * ```js
+    * client.on('device-changed', (event) => {
+    *   console.log(`${event.data.type} 设备已 ${event.data.status}`);
+    * });
+    * ```
+    */
+  export type RtcDeviceChangedEventType = 'device-changed';
+  /**
+    * 设备变化事件对应数据
+    * @public
+    */
+  export interface DeviceChangedEventData {
+      /**
+        * 设备类型,麦克风/摄像头/扬声器
+        */
+      type: 'microphone' | 'camera' | 'loudspeaker';
+      /**
+        * 状态
+        */
+      status: 'remove' | 'add';
+      /**
+        * 对应的设备信息
+        */
+      device: MediaDeviceInfo;
+  }
+  /**
+    * 错误事件
+    * - error - 错误事件,当出现不可恢复错误后,会抛出此事件
+    * @public
+    * @example
+    * ```js
+    * client.on('error', (event) => {
+    *   console.log(`错误[${event.data.code}] - ${event.data.message}`);
+    * });
+    * ```
+    */
+  export type RtcErrorEventType = 'error';
+  /**
     * Rtc 事件类型
     * @public
     */
-  export type RtcEventType = RtcUserEventType | RtcStreamEventType | RtcConnectionStateEventType | RtcNetworkQualityEventType | RtcPlayerEventType;
+  export type RtcEventType = RtcUserEventType | RtcStreamEventType | RtcConnectionStateEventType | RtcNetworkQualityEventType | RtcPlayerEventType | RtcDeviceChangedEventType | RtcErrorEventType;
   /**
     * Rtc 事件
     *
-    * 当 type - T 为 {@link RtcUserEventType} 事件时,data - S 为 {@link User} 类型
-    * 当 type - T 为 {@link RtcStreamEventType} 事件时,data - S 为 {@link LocalStream} | {@link RemoteStream} 类型
-    * 当 type - T 为 {@link RtcConnectionStateEventType } 事件时,data - S 为 {@link ConnectionStates } 类型
-    * 当 type - T 为 {@link RtcNetworkQualityEventType } 事件时,data - S 为 {@link NetworkQualities } 类型
-    * 当 type - T 为 {@link RtcPlayerEventType } 事件时,data - S 为 {@link PlayerEventData } 类型
+    * - 当 type - T 为 {@link RtcUserEventType} 事件时,data - S 为 {@link User} 类型
+    * - 当 type - T 为 {@link RtcStreamEventType} 事件时,data - S 为 {@link LocalStream} | {@link RemoteStream} 类型
+    * - 当 type - T 为 {@link RtcConnectionStateEventType } 事件时,data - S 为 {@link ConnectionStates } 类型
+    * - 当 type - T 为 {@link RtcNetworkQualityEventType } 事件时,data - S 为 {@link NetworkQualities } 类型
+    * - 当 type - T 为 {@link RtcPlayerEventType } 事件时,data - S 为 {@link PlayerEventData } 类型
+    * - 当 type - T 为 {@link RtcDeviceChangedEventType } 事件时,data - S 为 {@link RtcDeviceChangedEventData } 类型
+    * - 当 type - T 为 {@link RtcErrorEventType } 事件时,data - S 为 {@link RtcError } 类型
     * @public
     */
   export interface RtcEvent<T, S> {
@@ -970,7 +1042,16 @@ declare module '__@urtc/sdk-web/event' {
     * @public
     */
   export type RtcPlayerEvent = RtcEvent<RtcPlayerEventType, PlayerEventData>;
-  export {};
+  /**
+    * Rtc 设备列表变化事件,事件类型参见 {@link RtcDeviceChangeEventType}
+    * @public
+    */
+  export type RtcDeviceChangedEvent = RtcEvent<RtcDeviceChangedEventType, DeviceChangedEventData>;
+  /**
+    * Rtc 错误事件,事件类型参见 {@link RtcErrorEventType}
+    * @public
+    */
+  export type RtcErrorEvent = RtcEvent<RtcErrorEventType, RtcError>;
 }
 
 declare module '__@urtc/sdk-web/error' {
@@ -1137,6 +1218,10 @@ declare module '__@urtc/sdk-web/error' {
         * 3021 - 因未曾调用或调用 play 方法失败,故不可恢复播放
         */
       static readonly RESUME_NOT_ALLOWED = "3021";
+      /**
+        * 3024 - ICE 建连失败
+        */
+      static readonly ICE_FAILED = "3024";
   }
   /**
     * RTC 错误代码
@@ -1184,12 +1269,13 @@ declare module '__@urtc/sdk-web/error' {
     * - 3019 - 自动播放被禁止错误
     * - 3020 - 音视频数据异常,未成功播放(一般为网络原因导致,拉流时音视频数据加载过慢)
     * - 3021 - 因未曾调用或调用 play 方法失败,故不可恢复播放
+    * - 3024 - ICE 建连失败
     * @public
     */
   export type ErrorCode = typeof RtcError[Exclude<keyof typeof RtcError, 'prototype' | 'getCode' | 'stackTraceLimit' | 'prepareStackTrace' | 'captureStackTrace'>];
 }
 
-declare module '__@urtc/sdk-web/user/user' {
+declare module '__@urtc/sdk-web/user' {
   /**
     * 用户信息
     * @public
@@ -1221,6 +1307,10 @@ declare module '__@urtc/sdk-web/stream/stream' {
         */
       userId: string;
       /**
+        * 是否为本地流
+        */
+      readonly isLocal: boolean;
+      /**
         * 当前流包含的媒体流,关于媒体流,请详见 [MediaStream](https://developer.mozilla.org/en-US/docs/Web/API/MediaStream)。
         */
       readonly mediaStream: MediaStream;
@@ -1383,40 +1473,6 @@ declare module '__@urtc/sdk-web/stream/stream' {
   }
 }
 
-declare module '__@urtc/sdk-web/stream/remote-stream' {
-  import { Stream } from '__@urtc/sdk-web/stream/stream';
-  import { StreamPlugin } from '__@urtc/sdk-web/plugin';
-  /**
-    * 远端流,房间内其他用户发布的流,可通过 client 进行订阅
-    */
-  export class RemoteStream extends Stream {
-      /**
-        * 加载流插件,使用插件功能
-        * @param plugin - 插件
-        * @param options - 插件初始化参数
-        */
-      static use(plugin: StreamPlugin, options?: any): void;
-      /**
-        * 音频源是否已 mute,当源端 mute/unmute 音频时,本端将收到 `mute-audio` 或 `unmute-audio` 事件的通知,同时此值将变为对应值
-        */
-      sourceAudioMuted: boolean;
-      /**
-        * 视频源是否已 mute,当源端 mute/unmute 视频时,本端将收到 `mute-video` 或 `unmute-video` 事件的通知,同时此值将变为对应值
-        */
-      sourceVideoMuted: boolean;
-      /**
-        * 设置输出音量,默认为 100
-        * @param volume - 音量大小, 可设范围[0-100]
-        * @throws RtcError
-        * @example
-        * ```js
-        * stream.setAudioVolume(50);
-        * ```
-        */
-      setAudioVolume(volume: number): void;
-  }
-}
-
 declare module '__@urtc/sdk-web/server' {
   /**
     * 服务器配置,可设置置网关(gateway)、信令(signal)、日志(log)服务器地址
@@ -1489,13 +1545,13 @@ declare module '__@urtc/sdk-web/version' {
 }
 
 declare module '__@urtc/sdk-web/event-emitter' {
-  import { RtcEventType, RtcUserEventType, RtcUserEvent, RtcStreamEvent, RtcConnectionStateEventType, RtcConnectionStateEvent, RtcNetworkQualityEventType, RtcNetworkQualityEvent, RtcStreamEventType, RtcPlayerEventType, RtcPlayerEvent } from '__@urtc/sdk-web/event';
+  import { RtcEventType, RtcUserEventType, RtcUserEvent, RtcStreamEventType, RtcStreamEvent, RtcConnectionStateEventType, RtcConnectionStateEvent, RtcNetworkQualityEventType, RtcNetworkQualityEvent, RtcPlayerEventType, RtcPlayerEvent, RtcDeviceChangedEventType, RtcDeviceChangedEvent, RtcErrorEventType, RtcErrorEvent } from '__@urtc/sdk-web/event';
   /**
     * 事件监听函数
     * 其中 T 为 RtcEvent 泛型
     * @private
     */
-  export type RtcEventInstance<T> = T extends RtcUserEventType ? RtcUserEvent : T extends RtcStreamEventType ? RtcStreamEvent : T extends RtcConnectionStateEventType ? RtcConnectionStateEvent : T extends RtcNetworkQualityEventType ? RtcNetworkQualityEvent : T extends RtcPlayerEventType ? RtcPlayerEvent : never;
+  export type RtcEventInstance<T> = T extends RtcUserEventType ? RtcUserEvent : T extends RtcStreamEventType ? RtcStreamEvent : T extends RtcConnectionStateEventType ? RtcConnectionStateEvent : T extends RtcNetworkQualityEventType ? RtcNetworkQualityEvent : T extends RtcPlayerEventType ? RtcPlayerEvent : T extends RtcDeviceChangedEventType ? RtcDeviceChangedEvent : T extends RtcErrorEventType ? RtcErrorEvent : never;
   /**
     * 事件监听函数
     * 其中 RtcEventInstance 为事件实例

文件差异内容过多而无法显示
+ 5 - 5
lib/index.js


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@urtc/sdk-web",
-  "version": "2.0.0-beta.2",
+  "version": "2.0.0-beta.3",
   "description": "UCloud RTC javascript SDK",
   "main": "lib/index.js",
   "types": "lib/index.d.ts",