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()) { |