@besovideo/webrtc-player 0.8.38 → 0.8.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -135,11 +135,10 @@ clearAllDialog();
135
135
  "fullscreen",
136
136
  "rotate",
137
137
  "ptzControl",
138
- ]
138
+ ];
139
139
  // 在创建实例时 传入参数disabledControls数组 可关闭相关功能
140
140
  // 如不使用全屏按钮、云台控制器
141
- disabledControls: ["fullscreen", "ptzControl"]
142
-
141
+ disabledControls: ["fullscreen", "ptzControl"];
143
142
  ```
144
143
 
145
144
  **对讲**
@@ -175,7 +174,7 @@ const { instance } = Intercom({
175
174
  });
176
175
 
177
176
  // open 异步 先关闭再开始建立连接 (可选参数: protocol = type 选择协议(type = "auto" | "webrtc" | "ws-bvrtc") 不填默认为auto)
178
- install.open(type);
177
+ install.open(type);
179
178
  ```
180
179
 
181
180
  **会议**
@@ -288,7 +287,54 @@ export default defineComponent({
288
287
  </style>
289
288
  ```
290
289
 
290
+ **特别说明**
291
+
292
+ - 项目是原生 JS、JQuery 写的,项目中没有导入导出功能的,可以使用暴露出来的"bvPlayer"实例对象进行使用
293
+
294
+ - 在项目中引入 besovideo/webrtc-player dist 文件夹下面的"main.browser.css"和"main.browser.js"两个文件
295
+ ```html
296
+ <!DOCTYPE html>
297
+ <html lang="en">
298
+ <head>
299
+ <link href="./main.browser.css" type="text/css" rel="stylesheet" />
300
+ <meta charset="UTF-8" />
301
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
302
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
303
+ <script src="./main.browser.js"/>
304
+
305
+ <title>Document</title>
306
+ </head>
307
+ <body>
308
+
309
+
310
+ </body>
311
+
312
+ <script>
313
+ const playerEle = document.createElement("div")
314
+ playerEle.style.height = "300px"
315
+ playerEle.style.width = "300px"
316
+ playerEle.style.backgroundColor = "black"
317
+ document.body.appendChild(playerEle);
318
+ const {instance} = window.bvPlayer.PuPlayer({
319
+ // (可选) 容器节点 注意一个容器内只能存在一个实例 当container为假值(包括false、null、undefined)时 将返回实例引用的dom节点 容器必须指定高度 参考高德地图
320
+ container: playerEle,
321
+ // 必填 设备选项
322
+ puOption: {
323
+ // 设备id
324
+ id: "PU_123456",
325
+ // 设备通道号
326
+ index: 0,
327
+ },
328
+ // 必填 用户授权令牌
329
+ token: "Y3UrQ1VfYWRtestYDHYUAStest",
330
+ });
331
+ instance.open()
332
+ </script>
333
+ </html>
334
+ ```
335
+
291
336
  ## 升级 Upgrade
337
+
292
338
  ```shell
293
339
  yarn upgrade @besovideo/webrtc-player@latest
294
340