webrtc-adapter
Advanced tools
Comparing version 6.4.4 to 6.4.5
{ | ||
"name": "webrtc-adapter", | ||
"version": "6.4.4", | ||
"version": "6.4.5", | ||
"description": "A shim to insulate apps from WebRTC spec changes and browser prefix differences", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
@@ -120,2 +120,3 @@ /* | ||
edgeShim.shimReplaceTrack(window); | ||
edgeShim.shimGetDisplayMedia(window); | ||
@@ -122,0 +123,0 @@ // the edge shim implements the full RTCIceCandidate object. |
@@ -891,3 +891,4 @@ | ||
shimGetDisplayMedia: function(window, getSourceId) { | ||
if ('getDisplayMedia' in window.navigator) { | ||
if (!window.navigator || !window.navigator.mediaDevices || | ||
'getDisplayMedia' in window.navigator.mediaDevices) { | ||
return; | ||
@@ -902,3 +903,3 @@ } | ||
} | ||
navigator.getDisplayMedia = function(constraints) { | ||
window.navigator.mediaDevices.getDisplayMedia = function(constraints) { | ||
return getSourceId(constraints) | ||
@@ -923,6 +924,11 @@ .then(function(sourceId) { | ||
} | ||
return navigator.mediaDevices.getUserMedia(constraints); | ||
return window.navigator.mediaDevices.getUserMedia(constraints); | ||
}); | ||
}; | ||
window.navigator.getDisplayМedia = function(constraints) { | ||
utils.deprecated('navigator.getDisplayMedia', | ||
'navigator.mediaDevices.getDisplayMedia'); | ||
return window.navigator.mediaDevices.getDisplayMedia(constraints); | ||
}; | ||
} | ||
}; |
@@ -87,3 +87,19 @@ /* | ||
} | ||
}, | ||
shimGetDisplayMedia: function(window, preferredMediaSource) { | ||
if (!('getDisplayMedia' in window.navigator) || | ||
!window.navigator.mediaDevices || | ||
'getDisplayMedia' in window.navigator.mediaDevices) { | ||
return; | ||
} | ||
var origGetDisplayMedia = window.navigator.getDisplayMedia; | ||
window.navigator.mediaDevices.getDisplayMedia = function(constraints) { | ||
return origGetDisplayMedia(constraints); | ||
}; | ||
window.navigator.getDisplayMedia = function(constraints) { | ||
utils.deprecated('navigator.getDisplayMedia', | ||
'navigator.mediaDevices.getDisplayMedia'); | ||
return origGetDisplayMedia(constraints); | ||
}; | ||
} | ||
}; |
@@ -291,6 +291,7 @@ /* | ||
shimGetDisplayMedia: function(window, preferredMediaSource) { | ||
if ('getDisplayMedia' in window.navigator) { | ||
if (!window.navigator || !window.navigator.mediaDevices || | ||
'getDisplayMedia' in window.navigator.mediaDevices) { | ||
return; | ||
} | ||
navigator.getDisplayMedia = function(constraints) { | ||
window.navigator.mediaDevices.getDisplayMedia = function(constraints) { | ||
if (!(constraints && constraints.video)) { | ||
@@ -309,5 +310,10 @@ var err = new DOMException('getDisplayMedia without video ' + | ||
} | ||
return navigator.mediaDevices.getUserMedia(constraints); | ||
return window.navigator.mediaDevices.getUserMedia(constraints); | ||
}; | ||
window.navigator.getDisplayМedia = function(constraints) { | ||
utils.deprecated('navigator.getDisplayMedia', | ||
'navigator.mediaDevices.getDisplayMedia'); | ||
return window.navigator.mediaDevices.getDisplayMedia(constraints); | ||
}; | ||
} | ||
}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
887873
21825