概述
连接成功之后由客户端选择publish还是play,这里讲的是play。
1、C->S : createStream
2、S->C : _result
服务端对客户端createStream请求的反馈
3、C->S : getStreamLength、play、Set Buffer Length
- getStreamLength:获取stream的时间长度
- play:请求播放
- Set Buffer Length:
4、S->C : Stream Begin 1
5、S->C : onStatus
服务端对客户端play请求的反馈
6、S->C : |RtmpSampleAccess
举例
以下为使用wireshark抓包的部分内容:
C->S
AMF0 Command createStream()
Response to this call in frame: 940
RTMP Header
01.. .... = Format: 1
..00 0011 = Chunk Stream ID: 3
Timestamp delta: 0
Timestamp: 0 (calculated)
Body size: 25
Type ID: AMF0 Command (0x14)
RTMP Body
String 'createStream'
Number 2
AMF0 type: Number (0x00)
Number: 2
Null
AMF0 type: Null (0x05)