Copies the items of the collection to a LiveStreamControl array, starting at the specified array index.
public void CopyTo(LiveStreamControl[] array,int arrayIndex)
array
The one-dimensional, zero-based array that is the destination of the items to be copied from the collection.
arrayIndex
The zero-based index in the destination array at which copying begins.
Exceptions
The following exceptions can be thrown:
Copies the items of the collection to a LiveStreamControl array, starting at the specified array index.
using Leadtools;using Leadtools.MediaStreaming;public Server _server = null;public bool _result = false;public void LiveStreamControlsCopyToExample(){try{// create an instance of the server object_server = new Leadtools.MediaStreaming.Server();string strPath = "Live/Stream1"; // live stream's pathLiveStreams Streams = _server.GetLiveStreams();LiveStream stream = Streams.CreateLiveStream();stream.Path = strPath;stream.UseDeviceEncoding = false;// select video devicestream.VideoDevices.Selection = 3;// select audio devicestream.AudioDevices.Selection = 0;Streams.AddLiveStream(stream);_server.SetLiveStreams(Streams);// retrieve a copy of the Live Stream ControlsLiveStreamControls StreamControls = _server.GetLiveStreamControls();// allocate a new array for the copied Live Stream ControlsLiveStreamControl[] copiedStreams = new LiveStreamControl[Streams.Count];// copy themStreamControls.CopyTo(copiedStreams, 0);// set the result to what we expect_result = (copiedStreams.Length == StreamControls.Count);}catch (Exception){_result = false;}}