<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>25226</bug_id>
          
          <creation_ts>2014-04-02 04:34:43 +0000</creation_ts>
          <short_desc>Retriving track using getTrackById in Examples is not proper.</short_desc>
          <delta_ts>2014-04-03 12:02:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebRTC Working Group</product>
          <component>Image Capture API</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kiran">kiran.guduru</reporter>
          <assigned_to name="Giri Mandyam">mandyam</assigned_to>
          <cc>adam.bergkvist</cc>
    
    <cc>public-media-capture</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103259</commentid>
    <comment_count>0</comment_count>
    <who name="Kiran">kiran.guduru</who>
    <bug_when>2014-04-02 04:34:43 +0000</bug_when>
    <thetext>getTrackById() is used to retrieve a Track in Examples 1,2 of MediaStream Image Capture spec [1]. This method returns a single MediaStreamTrack not a sequence also, it requires mandatory &quot;id&quot; parameter to be passed to retrieve the track.

So the following line should be replaced

var videoDevice = mediaStream.getTrackById()[0];

by

var videoDevice = mediaStream.getVideoTracks()[0];

The comment line before this statement should also be modified accordingly.

[1] https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/ImageCapture.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103330</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Bergkvist">adam.bergkvist</who>
    <bug_when>2014-04-03 12:02:39 +0000</bug_when>
    <thetext>Assigned to Giri</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>