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

@@ -6,13 +6,12 @@ var MediaStreamType = require("../../service/RTC/MediaStreamTypes");
*
* @param data the data object from which we obtain the stream,
* the peerjid, etc.
* @param sid the session id
* @param ssrc the ssrc corresponding to this MediaStream
* @param mute the whether this MediaStream is muted
*
* @constructor
*/
function MediaStream(data, sid, ssrc, browser, eventEmitter, mute) {
function MediaStream(data, ssrc, browser, eventEmitter, muted) {
// XXX(gp) to minimize headaches in the future, we should build our
// abstractions around tracks and not streams. ORTC is track based API.
@@ -24,14 +23,13 @@ function MediaStream(data, sid, ssrc, browser, eventEmitter, mute) {
// Also, we should be able to associate multiple SSRCs with a MediaTrack as
// a track might have an associated RTX and FEC sources.
this.sid = sid;
this.stream = data.stream;
this.peerjid = data.peerjid;
this.videoType = data.videoType;
this.ssrc = ssrc;
this.type = (this.stream.getVideoTracks().length > 0)?
MediaStreamType.VIDEO_TYPE : MediaStreamType.AUDIO_TYPE;
this.muted = mute;
this.muted = muted;
this.eventEmitter = eventEmitter;
}