-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
4,337 additions
and
727 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"use strict"; | ||
|
||
// TODO taken from "get-browser-rtc" | ||
function getBrowserRTC() { | ||
if (typeof globalThis === "undefined") return null; | ||
var wrtc = { | ||
RTCPeerConnection: | ||
globalThis.RTCPeerConnection || | ||
globalThis.mozRTCPeerConnection || | ||
globalThis.webkitRTCPeerConnection, | ||
RTCSessionDescription: | ||
globalThis.RTCSessionDescription || | ||
globalThis.mozRTCSessionDescription || | ||
globalThis.webkitRTCSessionDescription, | ||
RTCIceCandidate: | ||
globalThis.RTCIceCandidate || | ||
globalThis.mozRTCIceCandidate || | ||
globalThis.webkitRTCIceCandidate, | ||
}; | ||
if (!wrtc.RTCPeerConnection) return null; | ||
return wrtc; | ||
} | ||
|
||
module.exports = getBrowserRTC(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
declare module 'isomorphic-wrtc' { | ||
const wrtc: { | ||
RTCPeerConnection: typeof RTCPeerConnection | ||
RTCSessionDescription: typeof RTCSessionDescription | ||
RTCIceCandidate: typeof RTCIceCandidate | ||
} | ||
export type WRTC = typeof wrtc | ||
export default wrtc | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"use strict"; | ||
|
||
module.exports = require("@roamhq/wrtc"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "isomorphic-wrtc", | ||
"version": "1.0.0", | ||
"description": "load WebRTC implementation available on platform", | ||
"main": "node.js", | ||
"browser": "browser.js", | ||
"types": "index.d.ts", | ||
"license": "ISC", | ||
"scripts": { | ||
"build": ": nothing", | ||
"lint": ": nothing", | ||
"test": ": nothing" | ||
}, | ||
"peerDependencies": { | ||
"@roamhq/wrtc": "^0.7.1", | ||
"get-browser-rtc": "*" | ||
} | ||
} |
Oops, something went wrong.