localstreamoptions.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. <!doctype html>
  2. <html class="default no-js">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <title>LocalStreamOptions | @urtc/sdk-web</title>
  7. <meta name="description" content="Documentation for @urtc/sdk-web">
  8. <meta name="viewport" content="width=device-width, initial-scale=1">
  9. <link rel="stylesheet" href="../assets/css/main.css">
  10. <script async src="../assets/js/search.js" id="search-script"></script>
  11. </head>
  12. <body>
  13. <header>
  14. <div class="tsd-page-toolbar">
  15. <div class="container">
  16. <div class="table-wrap">
  17. <div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
  18. <div class="field">
  19. <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
  20. <input id="tsd-search-field" type="text" />
  21. </div>
  22. <ul class="results">
  23. <li class="state loading">Preparing search index...</li>
  24. <li class="state failure">The search index is not available</li>
  25. </ul>
  26. <a href="../index.html" class="title">@urtc/sdk-web</a>
  27. </div>
  28. <div class="table-cell" id="tsd-widgets">
  29. <div id="tsd-filter">
  30. <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
  31. <div class="tsd-filter-group">
  32. <div class="tsd-select" id="tsd-filter-visibility">
  33. <span class="tsd-select-label">All</span>
  34. <ul class="tsd-select-list">
  35. <li data-value="public">Public</li>
  36. <li data-value="protected">Public/Protected</li>
  37. <li data-value="private" class="selected">All</li>
  38. </ul>
  39. </div>
  40. <input type="checkbox" id="tsd-filter-inherited" checked />
  41. <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
  42. <input type="checkbox" id="tsd-filter-externals" checked />
  43. <label class="tsd-widget" for="tsd-filter-externals">Externals</label>
  44. </div>
  45. </div>
  46. <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="tsd-page-title">
  52. <div class="container">
  53. <ul class="tsd-breadcrumb">
  54. <li>
  55. <a href="../index.html">@urtc/sdk-web</a>
  56. </li>
  57. <li>
  58. <a href="localstreamoptions.html">LocalStreamOptions</a>
  59. </li>
  60. </ul>
  61. <h1>Interface LocalStreamOptions</h1>
  62. </div>
  63. </div>
  64. </header>
  65. <div class="container container-main">
  66. <div class="row">
  67. <div class="col-8 col-content">
  68. <section class="tsd-panel tsd-comment">
  69. <div class="tsd-comment tsd-typography">
  70. <div class="lead">
  71. <p>创建本地流的参数</p>
  72. </div>
  73. </div>
  74. </section>
  75. <section class="tsd-panel tsd-hierarchy">
  76. <h3>Hierarchy</h3>
  77. <ul class="tsd-hierarchy">
  78. <li>
  79. <span class="target">LocalStreamOptions</span>
  80. </li>
  81. </ul>
  82. </section>
  83. <section class="tsd-panel-group tsd-index-group">
  84. <h2>Index</h2>
  85. <section class="tsd-panel tsd-index-panel">
  86. <div class="tsd-index-content">
  87. <section class="tsd-index-section ">
  88. <h3>Properties</h3>
  89. <ul class="tsd-index-list">
  90. <li class="tsd-kind-property tsd-parent-kind-interface"><a href="localstreamoptions.html#audio" class="tsd-kind-icon">audio</a></li>
  91. <li class="tsd-kind-property tsd-parent-kind-interface"><a href="localstreamoptions.html#cameraid" class="tsd-kind-icon">camera<wbr>Id</a></li>
  92. <li class="tsd-kind-property tsd-parent-kind-interface"><a href="localstreamoptions.html#facingmode" class="tsd-kind-icon">facing<wbr>Mode</a></li>
  93. <li class="tsd-kind-property tsd-parent-kind-interface"><a href="localstreamoptions.html#file" class="tsd-kind-icon">file</a></li>
  94. <li class="tsd-kind-property tsd-parent-kind-interface"><a href="localstreamoptions.html#id" class="tsd-kind-icon">id</a></li>
  95. <li class="tsd-kind-property tsd-parent-kind-interface"><a href="localstreamoptions.html#microphoneid" class="tsd-kind-icon">microphone<wbr>Id</a></li>
  96. <li class="tsd-kind-property tsd-parent-kind-interface"><a href="localstreamoptions.html#screen" class="tsd-kind-icon">screen</a></li>
  97. <li class="tsd-kind-property tsd-parent-kind-interface"><a href="localstreamoptions.html#screenaudio" class="tsd-kind-icon">screen<wbr>Audio</a></li>
  98. <li class="tsd-kind-property tsd-parent-kind-interface"><a href="localstreamoptions.html#userid" class="tsd-kind-icon">user<wbr>Id</a></li>
  99. <li class="tsd-kind-property tsd-parent-kind-interface"><a href="localstreamoptions.html#video" class="tsd-kind-icon">video</a></li>
  100. </ul>
  101. </section>
  102. </div>
  103. </section>
  104. </section>
  105. <section class="tsd-panel-group tsd-member-group ">
  106. <h2>Properties</h2>
  107. <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
  108. <a name="audio" class="tsd-anchor"></a>
  109. <h3>audio</h3>
  110. <div class="tsd-signature tsd-kind-icon">audio<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
  111. <aside class="tsd-sources">
  112. </aside>
  113. <div class="tsd-comment tsd-typography">
  114. <div class="lead">
  115. <p>是否读取麦克风设备来初始化本地流的音频</p>
  116. </div>
  117. </div>
  118. </section>
  119. <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
  120. <a name="cameraid" class="tsd-anchor"></a>
  121. <h3><span class="tsd-flag ts-flagOptional">Optional</span> camera<wbr>Id</h3>
  122. <div class="tsd-signature tsd-kind-icon">camera<wbr>Id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
  123. <aside class="tsd-sources">
  124. </aside>
  125. <div class="tsd-comment tsd-typography">
  126. <div class="lead">
  127. <p>选传,读取指定设备ID的摄像头</p>
  128. </div>
  129. </div>
  130. </section>
  131. <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
  132. <a name="facingmode" class="tsd-anchor"></a>
  133. <h3><span class="tsd-flag ts-flagOptional">Optional</span> facing<wbr>Mode</h3>
  134. <div class="tsd-signature tsd-kind-icon">facing<wbr>Mode<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;user&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;environment&quot;</span></div>
  135. <aside class="tsd-sources">
  136. </aside>
  137. <div class="tsd-comment tsd-typography">
  138. <div class="lead">
  139. <p>选传,在移动设备上,可以设置该参数选择使用前置或后置摄像头,其中,FacingMode 为 &#39;user&#39;(前置摄像头)或 &#39;environment&#39;(后置摄像头)</p>
  140. </div>
  141. </div>
  142. </section>
  143. <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
  144. <a name="file" class="tsd-anchor"></a>
  145. <h3><span class="tsd-flag ts-flagOptional">Optional</span> file</h3>
  146. <div class="tsd-signature tsd-kind-icon">file<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">File</span></div>
  147. <aside class="tsd-sources">
  148. </aside>
  149. <div class="tsd-comment tsd-typography">
  150. <div class="lead">
  151. <p>选传,使用图片初始化本地流的视频</p>
  152. </div>
  153. </div>
  154. </section>
  155. <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
  156. <a name="id" class="tsd-anchor"></a>
  157. <h3><span class="tsd-flag ts-flagOptional">Optional</span> id</h3>
  158. <div class="tsd-signature tsd-kind-icon">id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
  159. <aside class="tsd-sources">
  160. </aside>
  161. <div class="tsd-comment tsd-typography">
  162. <div class="lead">
  163. <p>选传,指定本地流的 ID,请注意创建多条流时,不可传入重复值</p>
  164. </div>
  165. </div>
  166. </section>
  167. <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
  168. <a name="microphoneid" class="tsd-anchor"></a>
  169. <h3><span class="tsd-flag ts-flagOptional">Optional</span> microphone<wbr>Id</h3>
  170. <div class="tsd-signature tsd-kind-icon">microphone<wbr>Id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
  171. <aside class="tsd-sources">
  172. </aside>
  173. <div class="tsd-comment tsd-typography">
  174. <div class="lead">
  175. <p>选传,读取指定设备ID的麦克风</p>
  176. </div>
  177. </div>
  178. </section>
  179. <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
  180. <a name="screen" class="tsd-anchor"></a>
  181. <h3>screen</h3>
  182. <div class="tsd-signature tsd-kind-icon">screen<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
  183. <aside class="tsd-sources">
  184. </aside>
  185. <div class="tsd-comment tsd-typography">
  186. <div class="lead">
  187. <p>是否使用屏幕共享的画面来初始化本地流</p>
  188. </div>
  189. </div>
  190. </section>
  191. <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
  192. <a name="screenaudio" class="tsd-anchor"></a>
  193. <h3><span class="tsd-flag ts-flagOptional">Optional</span> screen<wbr>Audio</h3>
  194. <div class="tsd-signature tsd-kind-icon">screen<wbr>Audio<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
  195. <aside class="tsd-sources">
  196. </aside>
  197. <div class="tsd-comment tsd-typography">
  198. <div class="lead">
  199. <p>选传,是否读取屏幕共享的音频,默认: false
  200. 注:仅部分浏览器支持,如 Chrome 74,且不同系统表现不同,如 windows 会读取桌面音频,macOS 只支持读取浏览器 tab 中的音频,</p>
  201. </div>
  202. </div>
  203. </section>
  204. <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
  205. <a name="userid" class="tsd-anchor"></a>
  206. <h3><span class="tsd-flag ts-flagOptional">Optional</span> user<wbr>Id</h3>
  207. <div class="tsd-signature tsd-kind-icon">user<wbr>Id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
  208. <aside class="tsd-sources">
  209. </aside>
  210. <div class="tsd-comment tsd-typography">
  211. <div class="lead">
  212. <p>选传,指定本地流的 userId</p>
  213. </div>
  214. </div>
  215. </section>
  216. <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
  217. <a name="video" class="tsd-anchor"></a>
  218. <h3>video</h3>
  219. <div class="tsd-signature tsd-kind-icon">video<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
  220. <aside class="tsd-sources">
  221. </aside>
  222. <div class="tsd-comment tsd-typography">
  223. <div class="lead">
  224. <p>是否读取摄像头设备来初始化本地流的视频</p>
  225. </div>
  226. </div>
  227. </section>
  228. </section>
  229. </div>
  230. <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
  231. <nav class="tsd-navigation primary">
  232. <ul>
  233. <li class=" ">
  234. <a href="../index.html">Exports</a>
  235. </li>
  236. </ul>
  237. </nav>
  238. <nav class="tsd-navigation secondary menu-sticky">
  239. <ul class="before-current">
  240. </ul>
  241. <ul class="current">
  242. <li class="current tsd-kind-interface">
  243. <a href="localstreamoptions.html" class="tsd-kind-icon">Local<wbr>Stream<wbr>Options</a>
  244. <ul>
  245. <li class=" tsd-kind-property tsd-parent-kind-interface">
  246. <a href="localstreamoptions.html#audio" class="tsd-kind-icon">audio</a>
  247. </li>
  248. <li class=" tsd-kind-property tsd-parent-kind-interface">
  249. <a href="localstreamoptions.html#cameraid" class="tsd-kind-icon">camera<wbr>Id</a>
  250. </li>
  251. <li class=" tsd-kind-property tsd-parent-kind-interface">
  252. <a href="localstreamoptions.html#facingmode" class="tsd-kind-icon">facing<wbr>Mode</a>
  253. </li>
  254. <li class=" tsd-kind-property tsd-parent-kind-interface">
  255. <a href="localstreamoptions.html#file" class="tsd-kind-icon">file</a>
  256. </li>
  257. <li class=" tsd-kind-property tsd-parent-kind-interface">
  258. <a href="localstreamoptions.html#id" class="tsd-kind-icon">id</a>
  259. </li>
  260. <li class=" tsd-kind-property tsd-parent-kind-interface">
  261. <a href="localstreamoptions.html#microphoneid" class="tsd-kind-icon">microphone<wbr>Id</a>
  262. </li>
  263. <li class=" tsd-kind-property tsd-parent-kind-interface">
  264. <a href="localstreamoptions.html#screen" class="tsd-kind-icon">screen</a>
  265. </li>
  266. <li class=" tsd-kind-property tsd-parent-kind-interface">
  267. <a href="localstreamoptions.html#screenaudio" class="tsd-kind-icon">screen<wbr>Audio</a>
  268. </li>
  269. <li class=" tsd-kind-property tsd-parent-kind-interface">
  270. <a href="localstreamoptions.html#userid" class="tsd-kind-icon">user<wbr>Id</a>
  271. </li>
  272. <li class=" tsd-kind-property tsd-parent-kind-interface">
  273. <a href="localstreamoptions.html#video" class="tsd-kind-icon">video</a>
  274. </li>
  275. </ul>
  276. </li>
  277. </ul>
  278. <ul class="after-current">
  279. </ul>
  280. </nav>
  281. </div>
  282. </div>
  283. </div>
  284. <footer class="with-border-bottom">
  285. <div class="container">
  286. <h2>Legend</h2>
  287. <div class="tsd-legend-group">
  288. <ul class="tsd-legend">
  289. <li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
  290. <li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
  291. <li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
  292. </ul>
  293. <ul class="tsd-legend">
  294. <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
  295. <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
  296. </ul>
  297. <ul class="tsd-legend">
  298. <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
  299. <li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
  300. </ul>
  301. <ul class="tsd-legend">
  302. <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
  303. </ul>
  304. </div>
  305. </div>
  306. </footer>
  307. <div class="container tsd-generator">
  308. <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
  309. </div>
  310. <div class="overlay"></div>
  311. <script src="../assets/js/main.js"></script>
  312. </body>
  313. </html>