adapter.js

155 views
Skip to first unread message

Jozsef Vass

unread,
Aug 20, 2013, 12:51:39 PM8/20/13
to vikasm...@webrtc.org, discuss...@googlegroups.com
Hi Vikas,

Firefox 23 and above supports MediaStream.getAudioTracks() and MediaStream.getVideoTracks(). This is useful if you want to mute audio/video. This could be incorporated in http://webrtc.googlecode.com/svn/trunk/samples/js/base/adapter.js:

    // Fake get{Video,Audio}Tracks
-   MediaStream.prototype.getVideoTracks = function() {
-     return [];
-   };
+   if (!MediaStream.prototype.getVideoTracks) {
+   MediaStream.prototype.getVideoTracks = function() {
+ return [];
+   };
+   }
 
-   MediaStream.prototype.getAudioTracks = function() {
-     return [];
-   };
+   if (!MediaStream.prototype.getAudioTracks) {
+   MediaStream.prototype.getAudioTracks = function() {
+     return [];
+   };
+   }
  } else if (navigator.webkitGetUserMedia) {
 


Jozsef

Vikas

unread,
Aug 20, 2013, 1:05:02 PM8/20/13
to discuss...@googlegroups.com
Hi,

Thanks, we will update adapter.js code.

/Vikas
Reply all
Reply to author
Forward
0 new messages