Removes the sid property from MediaStream (how did we end up having a

Jingle session ID in MediaStream and passing it around in the UI?)
This commit is contained in:
Boris Grozev
2015-10-01 15:10:55 -05:00
parent 4934779187
commit ebdd91df4e
6 changed files with 16 additions and 20 deletions

View File

@@ -102,20 +102,21 @@ SmallVideo.prototype.setPresenceStatus = function (statusMsg) {
};
/**
* Creates an audio or video stream element.
* Creates an audio or video element for a particular MediaStream.
*/
SmallVideo.createStreamElement = function (sid, stream) {
SmallVideo.createStreamElement = function (stream) {
var isVideo = stream.getVideoTracks().length > 0;
var element = isVideo ? document.createElement('video')
: document.createElement('audio');
var id = (isVideo ? 'remoteVideo_' : 'remoteAudio_') + sid + '_' +
APP.RTC.getStreamID(stream);
element.id = id;
if (!RTCBrowserType.isIExplorer()) {
element.autoplay = true;
}
element.id = (isVideo ? 'remoteVideo_' : 'remoteAudio_') +
APP.RTC.getStreamID(stream);
element.oncontextmenu = function () { return false; };
return element;