Fixes SmallVideo object not making a difference between an audio and a video stream, which was causing FireFox issues with large video set to the audio stream.
This commit is contained in:
parent
2c7ee3527a
commit
fe2804f474
|
@ -148,7 +148,7 @@ LocalVideo.prototype.createConnectionIndicator = function() {
|
|||
};
|
||||
|
||||
LocalVideo.prototype.changeVideo = function (stream) {
|
||||
this.stream = stream;
|
||||
this.videoStream = stream;
|
||||
|
||||
let localVideoClick = (event) => {
|
||||
// FIXME: with Temasys plugin event arg is not an event, but
|
||||
|
|
|
@ -143,7 +143,7 @@ if (!interfaceConfig.filmStripOnly) {
|
|||
* Removes the remote stream element corresponding to the given stream and
|
||||
* parent container.
|
||||
*
|
||||
* @param stream the stream
|
||||
* @param stream the MediaStream
|
||||
* @param isVideo <tt>true</tt> if given <tt>stream</tt> is a video one.
|
||||
*/
|
||||
RemoteVideo.prototype.removeRemoteStreamElement =
|
||||
|
@ -219,9 +219,8 @@ RemoteVideo.prototype.addRemoteStreamElement = function (stream) {
|
|||
return;
|
||||
}
|
||||
|
||||
this.stream = stream;
|
||||
|
||||
let isVideo = stream.isVideoTrack();
|
||||
isVideo ? this.videoStream = stream : this.audioStream = stream;
|
||||
|
||||
// Add click handler.
|
||||
let onClickHandler = (event) => {
|
||||
|
@ -250,7 +249,7 @@ RemoteVideo.prototype.addRemoteStreamElement = function (stream) {
|
|||
|
||||
let sel = $(`#${newElementId}`);
|
||||
|
||||
// If the container is currently visible we attach the stream.
|
||||
// If the container is currently visible we attach the stream to the element.
|
||||
if (!isVideo || (this.container.offsetParent !== null && isVideo)) {
|
||||
this.waitForPlayback(sel, stream);
|
||||
|
||||
|
|
|
@ -9,7 +9,8 @@ function SmallVideo() {
|
|||
this.isMuted = false;
|
||||
this.hasAvatar = false;
|
||||
this.isVideoMuted = false;
|
||||
this.stream = null;
|
||||
this.videoStream = null;
|
||||
this.audioStream = null;
|
||||
}
|
||||
|
||||
function setVisibility(selector, show) {
|
||||
|
@ -18,8 +19,8 @@ function setVisibility(selector, show) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if this small video is currently visible.
|
||||
|
||||
/* Indicates if this small video is currently visible.
|
||||
*
|
||||
* @return <tt>true</tt> if this small video isn't currently visible and
|
||||
* <tt>false</tt> - otherwise.
|
||||
|
@ -370,7 +371,7 @@ SmallVideo.prototype.updateView = function () {
|
|||
} else {
|
||||
// We want to show the avatar when the video is muted or not exists
|
||||
// that is when 'true' or 'null' is returned
|
||||
showAvatar = !this.stream || this.stream.isMuted();
|
||||
showAvatar = !this.videoStream || this.videoStream.isMuted();
|
||||
}
|
||||
|
||||
showAvatar = showAvatar && !isCurrentlyOnLarge;
|
||||
|
|
|
@ -49,7 +49,7 @@ function onContactClicked (id) {
|
|||
if (remoteVideo && remoteVideo.selectVideoElement().length) {
|
||||
// It is not always the case that a videoThumb exists (if there is
|
||||
// no actual video).
|
||||
if (remoteVideo.stream) {
|
||||
if (remoteVideo.videoStream) {
|
||||
|
||||
// We have a video src, great! Let's update the large video
|
||||
// now.
|
||||
|
@ -694,7 +694,7 @@ var VideoLayout = {
|
|||
if (!remoteVideo.isVisible()) {
|
||||
console.log("Add to last N", resourceJid);
|
||||
|
||||
remoteVideo.addRemoteStreamElement(remoteVideo.stream);
|
||||
remoteVideo.addRemoteStreamElement(remoteVideo.videoStream);
|
||||
|
||||
if (lastNPickupId == resourceJid) {
|
||||
// Clean up the lastN pickup id.
|
||||
|
@ -709,7 +709,7 @@ var VideoLayout = {
|
|||
updateLargeVideo = false;
|
||||
}
|
||||
remoteVideo.waitForPlayback(
|
||||
remoteVideo.selectVideoElement(), remoteVideo.stream);
|
||||
remoteVideo.selectVideoElement(), remoteVideo.videoStream);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -987,7 +987,7 @@ var VideoLayout = {
|
|||
|
||||
let videoType = this.getRemoteVideoType(id);
|
||||
largeVideo.updateLargeVideo(
|
||||
smallVideo.stream,
|
||||
smallVideo.videoStream,
|
||||
videoType
|
||||
).then(function() {
|
||||
// update current small video and the old one
|
||||
|
|
Loading…
Reference in New Issue