This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25226 - Retriving track using getTrackById in Examples is not proper.
Summary: Retriving track using getTrackById in Examples is not proper.
Status: NEW
Alias: None
Product: WebRTC Working Group
Classification: Unclassified
Component: Image Capture API (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Giri Mandyam
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-02 04:34 UTC by Kiran
Modified: 2014-04-03 12:02 UTC (History)
2 users (show)

See Also:


Attachments

Description Kiran 2014-04-02 04:34:43 UTC
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 "id" 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
Comment 1 Adam Bergkvist 2014-04-03 12:02:39 UTC
Assigned to Giri