зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1208390 - Implement MediaStream.getTrackById(). r=jib, r=smaug
MozReview-Commit-ID: 5a90ZOx7eUE --HG-- extra : rebase_source : b2fcb6aa7bc0a442cc80ecf3b9dce81415245b41
This commit is contained in:
Родитель
1952c7354d
Коммит
05c6dff3b5
|
@ -711,7 +711,7 @@ DOMMediaStream::CloneInternal(TrackForwardingOption aForwarding)
|
|||
}
|
||||
|
||||
MediaStreamTrack*
|
||||
DOMMediaStream::GetTrackById(const nsString& aId)
|
||||
DOMMediaStream::GetTrackById(const nsAString& aId) const
|
||||
{
|
||||
for (const RefPtr<TrackPort>& info : mTracks) {
|
||||
nsString id;
|
||||
|
@ -724,7 +724,7 @@ DOMMediaStream::GetTrackById(const nsString& aId)
|
|||
}
|
||||
|
||||
MediaStreamTrack*
|
||||
DOMMediaStream::GetOwnedTrackById(const nsString& aId)
|
||||
DOMMediaStream::GetOwnedTrackById(const nsAString& aId)
|
||||
{
|
||||
for (const RefPtr<TrackPort>& info : mOwnedTracks) {
|
||||
nsString id;
|
||||
|
|
|
@ -352,6 +352,7 @@ public:
|
|||
void GetAudioTracks(nsTArray<RefPtr<AudioStreamTrack> >& aTracks) const;
|
||||
void GetVideoTracks(nsTArray<RefPtr<VideoStreamTrack> >& aTracks) const;
|
||||
void GetTracks(nsTArray<RefPtr<MediaStreamTrack> >& aTracks) const;
|
||||
MediaStreamTrack* GetTrackById(const nsAString& aId) const;
|
||||
void AddTrack(MediaStreamTrack& aTrack);
|
||||
void RemoveTrack(MediaStreamTrack& aTrack);
|
||||
|
||||
|
@ -374,9 +375,7 @@ public:
|
|||
};
|
||||
already_AddRefed<DOMMediaStream> CloneInternal(TrackForwardingOption aForwarding);
|
||||
|
||||
MediaStreamTrack* GetTrackById(const nsString& aId);
|
||||
|
||||
MediaStreamTrack* GetOwnedTrackById(const nsString& aId);
|
||||
MediaStreamTrack* GetOwnedTrackById(const nsAString& aId);
|
||||
|
||||
/**
|
||||
* Returns true if this DOMMediaStream has aTrack in its mPlaybackStream.
|
||||
|
|
|
@ -36,7 +36,7 @@ interface MediaStream : EventTarget {
|
|||
sequence<AudioStreamTrack> getAudioTracks ();
|
||||
sequence<VideoStreamTrack> getVideoTracks ();
|
||||
sequence<MediaStreamTrack> getTracks ();
|
||||
// MediaStreamTrack? getTrackById (DOMString trackId);
|
||||
MediaStreamTrack? getTrackById (DOMString trackId);
|
||||
void addTrack (MediaStreamTrack track);
|
||||
void removeTrack (MediaStreamTrack track);
|
||||
MediaStream clone ();
|
||||
|
|
Загрузка…
Ссылка в новой задаче