Skip to content

Commit ce96b69

Browse files
应元东应元东
authored andcommitted
Merge branch 'master' of https://github.com/yingDev/Web-Rtmp
2 parents d289cb2 + be3f6ff commit ce96b69

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
```
99
- 浏览器中使用 [node-rtmpapi](https://github.com/delian/node-rtmpapi) 解析 RTMP 协议,完成握手和通信。 ([yingDev的fork](https://github.com/yingDev/node-rtmpapi) 增加了浏览器支持、修正了几个错误)
1010

11-
- 提取其中的H264视频流
11+
- 提取其中的 H264 视频流
1212

1313
- 发送给 [Broadway](https://github.com/mbebenita/Broadway) 解码
1414
```js
@@ -17,7 +17,7 @@
1717

1818
# 使用
1919
```js
20-
var player = new WebRtmpPlayer('ws://127.0.0.1:1999', 'live', 'B011', 'rtmp://<rtmp_server>/<app>');
20+
var player = new WebRtmpPlayer('ws://127.0.0.1:1999', '<app>', '<streamName>', 'rtmp://<rtmp_server>/<app>');
2121
player.canvas.style['height'] = '100%';
2222
document.getElementById("vidCont").appendChild(player.canvas);
2323
```

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
22
"name": "web-rtmp",
33
"version": "1.0.0",
4-
"description": "",
5-
"main": "index.js",
4+
"description": "Play rtmp video stream on the web page",
65
"scripts": {
76
"test": "echo \"Error: no test specified\" && exit 1"
87
},
9-
"author": "",
8+
"author": "yingDev",
109
"license": "ISC",
1110
"dependencies": {
1211
"babel-preset-es2015": "^6.16.0",

test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const WebRtmpPlayer = require('./WebRtmpPlayer');
22

33
//note: tcUrl是原始rtmp地址,不含流名称。参见rtmp spec
4-
alert('请在test.js中设置你的 tcUrl 参数');
5-
var player = new WebRtmpPlayer('ws://127.0.0.1:1999', 'live', 'B011', 'rtmp://<rtmp_server>/<app>');
4+
alert('请在test.js中设置你的 播放参数');
5+
var player = new WebRtmpPlayer('ws://127.0.0.1:1999', '<app>', '<streamName>', 'rtmp://<rtmp_server>/<app>');
66
player.canvas.style['height'] = '100%';
7-
document.getElementById("vidCont").appendChild(player.canvas);
7+
document.getElementById("vidCont").appendChild(player.canvas);

0 commit comments

Comments
 (0)