mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1013798 - fix the timeout of the checkMediaTrack function. r=jesup
This commit is contained in:
parent
86908dfc08
commit
c44575eaca
@ -1728,7 +1728,7 @@ PeerConnectionWrapper.prototype = {
|
||||
var addStreamTimeout = null;
|
||||
|
||||
function _checkMediaTracks(constraintsRemote, onSuccess) {
|
||||
if (self.addStreamTimeout === null) {
|
||||
if (self.addStreamTimeout !== null) {
|
||||
clearTimeout(self.addStreamTimeout);
|
||||
}
|
||||
|
||||
@ -1761,11 +1761,6 @@ PeerConnectionWrapper.prototype = {
|
||||
onSuccess();
|
||||
}
|
||||
|
||||
function __checkMediaTracksTimeout(onSuccess) {
|
||||
ok(false, self + " checkMediaTracks() timed out waiting for onaddstream event to fire");
|
||||
onSuccess();
|
||||
}
|
||||
|
||||
// we have to do this check as the onaddstream never fires if the remote
|
||||
// stream has no track at all!
|
||||
var expectedRemoteTracks =
|
||||
@ -1783,7 +1778,8 @@ PeerConnectionWrapper.prototype = {
|
||||
_checkMediaTracks(constraintsRemote, onSuccess);
|
||||
};
|
||||
addStreamTimeout = setTimeout(function () {
|
||||
self._checkMediaTracksTimeout(onSuccess);
|
||||
ok(false, self + " checkMediaTracks() timed out waiting for onaddstream event to fire");
|
||||
onSuccess();
|
||||
}, 60000);
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user