Partager via


Retrieve Information about the Available Streams for a Media Item

 

Applies To: Windows Server 2012 Essentials

Retrieves information about the available streams for an audio or video item.

URI Template

GET services/builtin/MediaManagement.svc/metadata/streams/mediaType/{mediaTypeData}/id/{ID}/index/{index}/count/{count}

{mediaTypeData}
The media type. Choose from one of the following values.

Media Type Value Meaning
music Audio.
photo Photos.
video Video.

{ID}
The identifier of the media item.

{index}
The numerical position of the first stream to be retrieved.

{count}
The requested number of streams to be retrieved.

Sample Request

GET https://www.contoso.com/services/builtin/MediaManagement.svc/metadata/streams/mediaType/music/id/B-358/index/0/count/100 HTTP/1.1  
Host: domainnameAccept: application/xml  
Cookie: ASP.NET_SessionId=********************  
Canary: *********************  
Host: domainname  
  

Sample Response

HTTP/1.1 200 OK  
Content-Type: application/octet-stream  
  
<MetadataStreamResult  
    xmlns="http://contracts.microsoft.com/WindowsServerEssentials/2011/09/WebApi"  
e"http://www.w3.org/2001/XMLSchema-instance">  
  <Result>  
    <MetadataItemStream>  
      <Bitrate>12053</Bitrate>  
      <Height>0</Height>  
      <MimeType>audio/vnd.dlna.adts</MimeType>  
      <Profile>AAC_ADTS_320</Profile>  
      <RelativePath>/Stream/stream.adts?streamdata=iqrnj97UlPV%2b4tbXXcMKHiTlTEOrpwZdE0KNIyZYkst4XtQRB8z1z39%2b5EDDOn5BLDLMyyiwJmBFMOkm6Ec3BqJ0B8VmMBIo9cWTCoWTNxKKdrsYAW%2f41owgtvbDmhracXbMpRC8t6zXy8xqkBOQU9XOnSlw2bnbD68CNg0wwuHRygzL9VkUqWLIIFI0xs0zDnhhp%2fMyRlotUSERY%2f9QS4lbnUD%2baZgf%2fGwq5y0nOAPXLI3C6UesaiED%2bnipFHZR9TBQK1YPgzI%3d</RelativePath>  
      <RequiresTranscoding>false</RequiresTranscoding>  
      <Width>0</Width>  
    </MetadataItemStream>  
  </Result>  
  <TotalMatches>1</TotalMatches>  
</MetadataStreamResult>  

Error Codes

Error Code Error Message
400 One or more parameters are not valid.
401 Access is denied to the requested resource.
404 The path does not exist.

See Also

Web Service Methods