Error processing SSI file
LEADTOOLS Multimedia (Leadtools.MediaStreaming assembly)

Show in webframe

Selected Property (AudioType)






Determines or specifies whether the audio type is currently selected.
Syntax
public bool Selected {get; set;}
'Declaration
 
Public Property Selected As Boolean
'Usage
 
Dim instance As AudioType
Dim value As Boolean
 
instance.Selected = value
 
value = instance.Selected
public:
property bool Selected {
   bool get();
   void set (    bool value);
}

Property Value

True will select the audio type. If false, then the audio type will be deselected.
Example
Copy Code  
Imports Leadtools
Imports Leadtools.MediaStreaming

Public _server As Server = Nothing
Public _result As Boolean = False

Public Sub PrintAudioTypesExample()
  Try
     Dim Count As Integer = 0
     Dim strAudioTypes As String = ""

     ' create an instance of the server object
     _server = New Leadtools.MediaStreaming.Server()

     ' retrieve a copy of the Live Streams
     Dim Streams As LiveStreams = _server.GetLiveStreams()

     ' create live stream just to enumerate the audio types
     Dim stream As LiveStream = Streams.CreateLiveStream()

     'Get the Audio Types 
     Dim AudioTypes As AudioTypes = stream.AudioTypes

     'Get the Audio Types count
     Count = AudioTypes.Count

     ' print the stream audio types to a string

     strAudioTypes &= String.Format("--- Live Stream Audio Types (count = {0}) ---" & Constants.vbLf + Constants.vbLf, Count.ToString())

     Dim nIndex As Integer = 0
     For Each AudioType As AudioType In AudioTypes
       strAudioTypes &= String.Format("AudioType[{0}]: {1}." & Constants.vbLf, nIndex.ToString(), AudioType.FriendlyName)

       If AudioType.Selected Then
         strAudioTypes += String.Format("AudioType[{0}]: is selected" & Constants.vbLf, nIndex.ToString())
       End If

       nIndex += 1
     Next AudioType

     ' display a message contains the AudioTypes information string
     MessageBox.Show(strAudioTypes, "LEADTOOLS Media Streaming Examples", MessageBoxButtons.OK, MessageBoxIcon.Information)

     _result = True
  Catch e1 As Exception
     _result = False
  End Try
End Sub
using Leadtools;
using Leadtools.MediaStreaming;

public Server _server = null;
public bool _result = false;

public void PrintAudioTypesExample()
{
   try
   {
      int Count = 0;
      string strAudioTypes = "";

      // create an instance of the server object
      _server = new Leadtools.MediaStreaming.Server();

      // retrieve a copy of the Live Streams
      LiveStreams Streams = _server.GetLiveStreams();

      // create live stream just to enumerate the audio types
      LiveStream stream = Streams.CreateLiveStream();

      //Get the Audio Types 
      AudioTypes AudioTypes = stream.AudioTypes;

      //Get the Audio Types count
      Count = AudioTypes.Count;

      // print the stream audio types to a string

      strAudioTypes += string.Format("--- Live Stream Audio Types (count = {0}) ---\n\n", Count.ToString());

      int nIndex = 0;
      foreach (AudioType AudioType in AudioTypes)
      {
         strAudioTypes += string.Format("AudioType[{0}]: {1}.\n", nIndex.ToString(), AudioType.FriendlyName);

         if (AudioType.Selected)
            strAudioTypes += string.Format("AudioType[{0}]: is selected\n", nIndex.ToString());

         nIndex++;
      }

      // display a message contains the AudioTypes information string
      MessageBox.Show(strAudioTypes, "LEADTOOLS Media Streaming Examples", MessageBoxButtons.OK, MessageBoxIcon.Information);

      _result = true;
   }
   catch (Exception)
   {
      _result = false;
   }
}
Requirements

Target Platforms

See Also

Reference

AudioType Class
AudioType Members

Error processing SSI file
Leadtools.MediaStreaming requires a Multimedia or Multimedia Suite license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features