Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(997)

Unified Diff: Source/modules/mediastream/MediaStream.cpp

Issue 397903003: Implement sequence<MediaStreamTrack> getTracks () This is to conform to the new spec- http://dev.w3… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/mediastream/MediaStream.h ('k') | Source/modules/mediastream/MediaStream.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediastream/MediaStream.cpp
diff --git a/Source/modules/mediastream/MediaStream.cpp b/Source/modules/mediastream/MediaStream.cpp
index d137f9c4bddc6ba0b019b79ba20362f79d1aa7dd..6c29ed2041dd72c6d6f81f51c3cbe771add0ca15 100644
--- a/Source/modules/mediastream/MediaStream.cpp
+++ b/Source/modules/mediastream/MediaStream.cpp
@@ -158,6 +158,16 @@ bool MediaStream::ended() const
return m_stopped || m_descriptor->ended();
}
+MediaStreamTrackVector MediaStream::getTracks()
+{
+ MediaStreamTrackVector tracks;
+ for (MediaStreamTrackVector::iterator iter = m_audioTracks.begin(); iter != m_audioTracks.end(); ++iter)
+ tracks.append(iter->get());
+ for (MediaStreamTrackVector::iterator iter = m_videoTracks.begin(); iter != m_videoTracks.end(); ++iter)
+ tracks.append(iter->get());
+ return tracks;
+}
+
void MediaStream::addTrack(MediaStreamTrack* track, ExceptionState& exceptionState)
{
if (ended()) {
« no previous file with comments | « Source/modules/mediastream/MediaStream.h ('k') | Source/modules/mediastream/MediaStream.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698