Bug 1103188 - MediaStream WebIDL update with addTrack/removeTrack. r=smaug,jib

--HG--
extra : commitid : FxucwRqUZUo
This commit is contained in:
Andreas Pehrson 2015-09-25 23:23:30 +08:00
Родитель dd7c08d0b3
Коммит e4aa371fe5
2 изменённых файлов: 20 добавлений и 12 удалений

Просмотреть файл

@ -210,6 +210,8 @@ public:
void GetAudioTracks(nsTArray<nsRefPtr<AudioStreamTrack> >& aTracks);
void GetVideoTracks(nsTArray<nsRefPtr<VideoStreamTrack> >& aTracks);
void GetTracks(nsTArray<nsRefPtr<MediaStreamTrack> >& aTracks);
void AddTrack(MediaStreamTrack& aTrack);
void RemoveTrack(MediaStreamTrack& aTrack);
// NON-WebIDL

Просмотреть файл

@ -27,17 +27,23 @@ dictionary MediaStreamConstraints {
DOMString? peerIdentity = null;
};
// [Exposed=Window,
// Constructor,
// Constructor (MediaStream stream),
// Constructor (sequence<MediaStreamTrack> tracks)]
interface MediaStream : EventTarget {
readonly attribute DOMString id;
sequence<AudioStreamTrack> getAudioTracks();
sequence<VideoStreamTrack> getVideoTracks();
sequence<MediaStreamTrack> getTracks();
// MediaStreamTrack getTrackById (DOMString trackId);
// void addTrack (MediaStreamTrack track);
// void removeTrack (MediaStreamTrack track);
// attribute boolean ended;
// attribute EventHandler onended;
// attribute EventHandler onaddtrack;
// attribute EventHandler onremovetrack;
readonly attribute double currentTime;
readonly attribute DOMString id;
sequence<AudioStreamTrack> getAudioTracks ();
sequence<VideoStreamTrack> getVideoTracks ();
sequence<MediaStreamTrack> getTracks ();
// MediaStreamTrack? getTrackById (DOMString trackId);
void addTrack (MediaStreamTrack track);
void removeTrack (MediaStreamTrack track);
// MediaStream clone ();
// readonly attribute boolean active;
// attribute EventHandler onactive;
// attribute EventHandler oninactive;
// attribute EventHandler onaddtrack;
// attribute EventHandler onremovetrack;
readonly attribute double currentTime;
};