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
|
||||
else if (RTCBrowserType.isTemasysPluginUsed()) {
|
||||
|
||||
AdapterJS.WebRTCPlugin.setLogLevel(
|
||||
AdapterJS.WebRTCPlugin.PLUGIN_LOG_LEVELS.VERBOSE);
|
||||
//AdapterJS.WebRTCPlugin.setLogLevel(
|
||||
// AdapterJS.WebRTCPlugin.PLUGIN_LOG_LEVELS.VERBOSE);
|
||||
|
||||
AdapterJS.webRTCReady(function (isPlugin) {
|
||||
|
||||
|
|
|
@ -299,8 +299,13 @@ var LargeVideo = {
|
|||
// or null.
|
||||
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,
|
||||
changeVideo.bind($('#largeVideo'), this.isLargeVideoVisible()));
|
||||
}
|
||||
} else {
|
||||
if (currentSmallVideo) {
|
||||
currentSmallVideo.showAvatar();
|
||||
|
|
|
@ -165,7 +165,7 @@ RemoteVideo.prototype.removeRemoteStreamElement = function (stream, isVideo, id)
|
|||
this.VideoLayout.updateRemovedVideo(this.getResourceJid());
|
||||
};
|
||||
|
||||
RemoteVideo.prototype.waitForPlayback = function (stream) {
|
||||
RemoteVideo.prototype.waitForPlayback = function (sel, stream) {
|
||||
|
||||
var isVideo = stream.getVideoTracks().length > 0;
|
||||
if (!isVideo || stream.id === 'mixedmslabel') {
|
||||
|
@ -174,7 +174,6 @@ RemoteVideo.prototype.waitForPlayback = function (stream) {
|
|||
|
||||
var self = this;
|
||||
var resourceJid = this.getResourceJid();
|
||||
var sel = this.VideoLayout.getPeerVideoSel(resourceJid);
|
||||
|
||||
// Register 'onplaying' listener to trigger 'videoactive' on VideoLayout
|
||||
// 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 (!isVideo || (this.container.offsetParent !== null && isVideo)) {
|
||||
this.waitForPlayback(stream);
|
||||
this.waitForPlayback(sel, stream);
|
||||
|
||||
APP.RTC.attachMediaStream(sel, stream);
|
||||
}
|
||||
|
|
|
@ -715,7 +715,7 @@ var VideoLayout = (function (my) {
|
|||
|
||||
updateLargeVideo = false;
|
||||
}
|
||||
remoteVideos[resourceJid].waitForPlayback(mediaStream.stream);
|
||||
remoteVideos[resourceJid].waitForPlayback(sel, mediaStream.stream);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* Provides statistics for the local stream.
|
||||
*/
|
||||
|
||||
var RTCBrowserType = require('../RTC/RTCBrowserType');
|
||||
|
||||
/**
|
||||
* Size of the webaudio analizer buffer.
|
||||
|
@ -84,7 +85,8 @@ function LocalStatsCollector(stream, interval, statisticsService, eventEmitter)
|
|||
* Starts the collecting the statistics.
|
||||
*/
|
||||
LocalStatsCollector.prototype.start = function () {
|
||||
if (config.disableAudioLevels || !window.AudioContext)
|
||||
if (config.disableAudioLevels || !window.AudioContext
|
||||
|| RTCBrowserType.isTemasysPluginUsed())
|
||||
return;
|
||||
|
||||
var context = new AudioContext();
|
||||
|
|
Loading…
Reference in New Issue