4.10 Stream Selection
The SelectStream request is sent by the client to notify the server which streams (2) it requests. If a file contains only one stream, the SelectStream request will request that the server send the default streams for that file. A SelectStream request will always accompany a Play request to denote which audio and/or video streams the client wants to play based on preferences and bandwidth considerations. As with Log and KeepAlive requests, SelectStream request can be sent multiple times during a session, and they are always sent as a POST request on a separate TCP connection.
The following scenarios are examples of when a SelectStream request would be sent by the client:
When streaming a multi-language Windows Media Audio (.wma) file, the client will send a SelectStream request whenever the client changes from one language to another.
When streaming a multiple bit rate ASF file, the client will send a SelectStream request whenever it experiences a prolonged change in bandwidth conditions.
The client sends a Describe request to retrieve the ASF header.
The server responds with a $H (Header) packet.
The client sends a Play request for the file, selecting one or more streams.
The server responds with a $H (Header) packet and $D (Data) packets.
The server responds by acknowledging the client request and switching to the requested stream.
Note To avoid disruptions in a video stream, the server will switch the streams at a key frame.
The client detects the stream change in the data stream and renders the new stream.
Note The client will not send a message to the server as a result of this stream change.
The following figure shows the previously described sequence.
Figure 13: Using the SelectStream Request packet sequencing