StreamInfo.SelectedTracks Property

Gets or sets the SelectedTracks property.

Namespace: Microsoft.Web.Media.SmoothStreaming
Assembly: Microsoft.Web.Media.SmoothStreaming (in Microsoft.Web.Media.SmoothStreaming.dll)

Syntax

'Declaration

Public ReadOnly Property SelectedTracks As IList(Of TrackInfo)
    Get
'Usage

Dim instance As StreamInfo
Dim value As IList(Of TrackInfo)

value = instance.SelectedTracks
public IList<TrackInfo> SelectedTracks { get; }
public:
property IList<TrackInfo^>^ SelectedTracks {
    IList<TrackInfo^>^ get ();
}
member SelectedTracks : IList<TrackInfo>
function get SelectedTracks () : IList<TrackInfo>

Property Value

Type: System.Collections.Generic.IList<TrackInfo>
A generic list of TrackInfo objects.

Remarks

For more information and an example that parses StreamInfo objects, see Timeline Markers and Events under the heading "Extract Timeline Events and Assign Markers."

Examples

The following example shows how to select tracks from SegmentInfo and StreamInfo objects.

    void SmoothPlayer_ManifestReady(object sender, EventArgs e)
    {
        if (!PremiumAccount)
        {
            foreach (SegmentInfo segment in SmoothPlayer.ManifestInfo.Segments)
            {
                IList<StreamInfo> streamInfoList = segment.AvailableStreams;
                foreach (StreamInfo stream in streamInfoList)
                {
                    if (stream.Type == MediaStreamType.Video)
                    {
                        // Limit bit-rate to 866000.
                        ulong highRate = 866000 + 1;
                        List<TrackInfo> tracks = new List<TrackInfo>();

                        tracks = stream.AvailableTracks.ToList<TrackInfo>();
                        IList<TrackInfo> allowedTracks = tracks.Where((ti) => ti.Bitrate < highRate).ToList();
                        stream.SelectTracks(allowedTracks, false);
                    }
                }
            }
        }
    }

Version Information

Silverlight

Supported in: 5

Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

See Also

Reference

StreamInfo Class

Microsoft.Web.Media.SmoothStreaming Namespace