Fixes problems with Temasys plugin support in Safari.
This commit is contained in:
parent
9b4ee7c0c5
commit
0902cbb164
|
@ -234,8 +234,8 @@ function RTCUtils(RTCService, onTemasysPluginReady)
|
||||||
// Detect IE/Safari
|
// Detect IE/Safari
|
||||||
else if (RTCBrowserType.isTemasysPluginUsed()) {
|
else if (RTCBrowserType.isTemasysPluginUsed()) {
|
||||||
|
|
||||||
AdapterJS.WebRTCPlugin.setLogLevel(
|
//AdapterJS.WebRTCPlugin.setLogLevel(
|
||||||
AdapterJS.WebRTCPlugin.PLUGIN_LOG_LEVELS.VERBOSE);
|
// AdapterJS.WebRTCPlugin.PLUGIN_LOG_LEVELS.VERBOSE);
|
||||||
|
|
||||||
AdapterJS.webRTCReady(function (isPlugin) {
|
AdapterJS.webRTCReady(function (isPlugin) {
|
||||||
|
|
||||||
|
|
|
@ -299,8 +299,13 @@ var LargeVideo = {
|
||||||
// or null.
|
// or null.
|
||||||
this.eventEmitter.emit(UIEvents.SELECTED_ENDPOINT, resourceJid);
|
this.eventEmitter.emit(UIEvents.SELECTED_ENDPOINT, resourceJid);
|
||||||
}
|
}
|
||||||
|
if (RTCBrowserType.isSafari()) {
|
||||||
|
// FIXME In Safari fadeOut works only for the first time
|
||||||
|
changeVideo(this.isLargeVideoVisible());
|
||||||
|
} else {
|
||||||
$('#largeVideo').fadeOut(300,
|
$('#largeVideo').fadeOut(300,
|
||||||
changeVideo.bind($('#largeVideo'), this.isLargeVideoVisible()));
|
changeVideo.bind($('#largeVideo'), this.isLargeVideoVisible()));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (currentSmallVideo) {
|
if (currentSmallVideo) {
|
||||||
currentSmallVideo.showAvatar();
|
currentSmallVideo.showAvatar();
|
||||||
|
|
|
@ -165,7 +165,7 @@ RemoteVideo.prototype.removeRemoteStreamElement = function (stream, isVideo, id)
|
||||||
this.VideoLayout.updateRemovedVideo(this.getResourceJid());
|
this.VideoLayout.updateRemovedVideo(this.getResourceJid());
|
||||||
};
|
};
|
||||||
|
|
||||||
RemoteVideo.prototype.waitForPlayback = function (stream) {
|
RemoteVideo.prototype.waitForPlayback = function (sel, stream) {
|
||||||
|
|
||||||
var isVideo = stream.getVideoTracks().length > 0;
|
var isVideo = stream.getVideoTracks().length > 0;
|
||||||
if (!isVideo || stream.id === 'mixedmslabel') {
|
if (!isVideo || stream.id === 'mixedmslabel') {
|
||||||
|
@ -174,7 +174,6 @@ RemoteVideo.prototype.waitForPlayback = function (stream) {
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
var resourceJid = this.getResourceJid();
|
var resourceJid = this.getResourceJid();
|
||||||
var sel = this.VideoLayout.getPeerVideoSel(resourceJid);
|
|
||||||
|
|
||||||
// Register 'onplaying' listener to trigger 'videoactive' on VideoLayout
|
// Register 'onplaying' listener to trigger 'videoactive' on VideoLayout
|
||||||
// when video playback starts
|
// when video playback starts
|
||||||
|
@ -213,7 +212,7 @@ RemoteVideo.prototype.addRemoteStreamElement = function (sid, stream, thessrc) {
|
||||||
|
|
||||||
// If the container is currently visible we attach the stream.
|
// If the container is currently visible we attach the stream.
|
||||||
if (!isVideo || (this.container.offsetParent !== null && isVideo)) {
|
if (!isVideo || (this.container.offsetParent !== null && isVideo)) {
|
||||||
this.waitForPlayback(stream);
|
this.waitForPlayback(sel, stream);
|
||||||
|
|
||||||
APP.RTC.attachMediaStream(sel, stream);
|
APP.RTC.attachMediaStream(sel, stream);
|
||||||
}
|
}
|
||||||
|
|
|
@ -715,7 +715,7 @@ var VideoLayout = (function (my) {
|
||||||
|
|
||||||
updateLargeVideo = false;
|
updateLargeVideo = false;
|
||||||
}
|
}
|
||||||
remoteVideos[resourceJid].waitForPlayback(mediaStream.stream);
|
remoteVideos[resourceJid].waitForPlayback(sel, mediaStream.stream);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
* Provides statistics for the local stream.
|
* Provides statistics for the local stream.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
var RTCBrowserType = require('../RTC/RTCBrowserType');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Size of the webaudio analizer buffer.
|
* Size of the webaudio analizer buffer.
|
||||||
|
@ -84,7 +85,8 @@ function LocalStatsCollector(stream, interval, statisticsService, eventEmitter)
|
||||||
* Starts the collecting the statistics.
|
* Starts the collecting the statistics.
|
||||||
*/
|
*/
|
||||||
LocalStatsCollector.prototype.start = function () {
|
LocalStatsCollector.prototype.start = function () {
|
||||||
if (config.disableAudioLevels || !window.AudioContext)
|
if (config.disableAudioLevels || !window.AudioContext
|
||||||
|
|| RTCBrowserType.isTemasysPluginUsed())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var context = new AudioContext();
|
var context = new AudioContext();
|
||||||
|
|
Loading…
Reference in New Issue