mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 17:07:48 +00:00
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:
@@ -204,13 +204,13 @@ RemoteVideo.prototype.waitForPlayback = function (sel, stream) {
|
||||
sel[0].onplaying = onPlayingHandler;
|
||||
};
|
||||
|
||||
RemoteVideo.prototype.addRemoteStreamElement = function (sid, stream) {
|
||||
RemoteVideo.prototype.addRemoteStreamElement = function (stream) {
|
||||
if (!this.container)
|
||||
return;
|
||||
|
||||
var self = this;
|
||||
var isVideo = stream.getVideoTracks().length > 0;
|
||||
var streamElement = SmallVideo.createStreamElement(sid, stream);
|
||||
var streamElement = SmallVideo.createStreamElement(stream);
|
||||
var newElementId = streamElement.id;
|
||||
|
||||
// Put new stream element always in front
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -175,9 +175,7 @@ var VideoLayout = (function (my) {
|
||||
|
||||
var resourceJid = Strophe.getResourceFromJid(stream.peerjid);
|
||||
remoteVideos[resourceJid].addRemoteStreamElement(
|
||||
stream.sid,
|
||||
stream.getOriginalStream(),
|
||||
stream.ssrc);
|
||||
stream.getOriginalStream());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user