GetMediaTypeByIndex Method
Description
Returns the media type string of a specified source by index in the buffer.
| ActiveX Edition | Plug-in Edition | Mac Edition |
|---|---|---|
| Since V8.0 | Since V8.0 | Not Supported |
Syntax
String ObjectName.GetMediaTypeByIndex(Long Index)
Parameters
Long Index: Specifies the index of media type in buffer. The index is 0-based.
Return value
String.
The result string of media type.
Remarks
This method is proveded for getting the media type of your devices. Before setting the media type index , check the MediaTypeListCount property to get the total media type count in the list and make sure your index is meaningful and correct.
See Also
SelectMediaTypeByIndex() method, MediaType property, MediaTypeListCount property
Sample
A JavaScript sample is provided.
<script language="javascript">
function btnGetMediaTypeByIndex_onclick() {
listcount = Webcam.MediaTypeListCount;
alert(listcount);
mediatype = Webcam.GetMediaTypeByIndex(listcount-1);
alert(Webcam.mediatype);
}
</script>
Copyright © 2012 Dynamsoft Corporation.All Rights Reserved.
