first commit

This commit is contained in:
armansansd
2023-07-12 16:31:19 +01:00
commit 3424b1927b
23306 changed files with 2217776 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
/*!
{
"name": "RTC Data Channel",
"property": "datachannel",
"notes": [{
"name": "HTML5 Rocks Tutorial",
"href": "https://www.html5rocks.com/en/tutorials/webrtc/datachannels/"
}]
}
!*/
/* DOC
Detect for the RTCDataChannel API that allows for transfer data directly from one peer to another
*/
define(['Modernizr', 'prefixed', 'domPrefixes', 'test/webrtc/peerconnection'], function(Modernizr, prefixed, domPrefixes) {
Modernizr.addTest('datachannel', function() {
if (!Modernizr.peerconnection) {
return false;
}
for (var i = 0, l = domPrefixes.length; i < l; i++) {
var PeerConnectionConstructor = window[domPrefixes[i] + 'RTCPeerConnection'];
if (PeerConnectionConstructor) {
var peerConnection = new PeerConnectionConstructor(null);
return 'createDataChannel' in peerConnection;
}
}
return false;
});
});
+19
View File
@@ -0,0 +1,19 @@
/*!
{
"name": "getUserMedia",
"property": "getusermedia",
"caniuse": "stream",
"tags": ["webrtc"],
"authors": ["Eric Bidelman", "Masataka Yakura"],
"notes": [{
"name": "W3C Spec",
"href": "https://w3c.github.io/mediacapture-main/#dom-mediadevices-getusermedia"
}]
}
!*/
/* DOC
Detects support for the new Promise-based `getUserMedia` API.
*/
define(['Modernizr'], function (Modernizr) {
Modernizr.addTest('getUserMedia', 'mediaDevices' in navigator && 'getUserMedia' in navigator.mediaDevices);
});
+15
View File
@@ -0,0 +1,15 @@
/*!
{
"name": "RTC Peer Connection",
"property": "peerconnection",
"tags": ["webrtc"],
"authors": ["Ankur Oberoi"],
"notes": [{
"name": "W3C Spec",
"href": "https://www.w3.org/TR/webrtc/"
}]
}
!*/
define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
Modernizr.addTest('peerconnection', !!prefixed('RTCPeerConnection', window));
});