RTMP Part 6 - NetStream Command

It is used to define channel through which the streaming video, audio and data can flow over NetConnection that connect the client to server

A NetConnection can support multiple NetStream for multiple data stream.

1. play

The client tell the server to play a stream. Call play more than once with reset=false, it create a playlist. To play a stream immediately, send a play command with reset=true.

Command structure from client to server


Command structure from server to client
Message flow for play command

2. play2

Unlike play command, it should be used to switch stream bit rate without changing the timeline of the content played.

Command structure for play2 command

Message flow for play2 command

3. deleteStream

It is sent when NetStream is being destory

Command structure for deleteStream. Server will not send any response

4. receiveAudio

It is sent to tell server whether to send audio message to client

Command structure for receiveAudio. Server will not send any response

5. receiveVideo

It is sent to tell server whether to send video message to client

Command structure for receiveVideo. Server will not send any response

6. publish

It is used to publish a named stream to server. Any other client can play this stream with the published name

Command structure for publish command. The server response with onStatus command to mark beginning of publishing

7. seek

It is sent when seeking for offset in millisecond within a media file.

Command structure for seek command. The server send a status message NetStream.Seek.Notify when seek is successful. In failure, server sends _error message
8. pause

It is used to tell server to pause or start a stream

Command structure for pause command. The server send a status message NetStream.Pause.Notify when stream is paused. The server send a status message NetStream.Unpause.Notify when stream is unpaused. In failure, server sends _error message


Comments

Popular Posts