-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
18 changed files
with
337 additions
and
390 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { util } from './util'; | ||
import { Utils } from './utils'; | ||
import logger from './logger'; | ||
|
||
export class API { | ||
|
@@ -31,7 +31,7 @@ export class API { | |
|
||
let pathError = ''; | ||
|
||
if (this._options.path === '/' && this._options.host !== util.CLOUD_HOST) { | ||
if (this._options.path === '/' && this._options.host !== Utils.CLOUD_HOST) { | ||
pathError = | ||
' If you passed in a `path` to your self-hosted PeerServer, ' + | ||
"you'll also need to pass in that same path when creating a new " + | ||
|
@@ -53,7 +53,7 @@ export class API { | |
if (response.status === 401) { | ||
let helpfulError = ''; | ||
|
||
if (this._options.host === util.CLOUD_HOST) { | ||
if (this._options.host === Utils.CLOUD_HOST) { | ||
helpfulError = | ||
"It looks like you're using the cloud server. You can email " + | ||
'[email protected] to enable peer listing for your API key.'; | ||
|
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 |
---|---|---|
@@ -1,15 +1,11 @@ | ||
import { util } from './util'; | ||
import { Utils } from './utils'; | ||
import { Peer } from './peer'; | ||
|
||
export const peerjs = { | ||
Peer, | ||
util, | ||
}; | ||
export { Peer, Utils }; | ||
|
||
export default Peer; | ||
|
||
if (typeof window !== 'undefined') { | ||
(window as any).peerjs = peerjs; | ||
/** @deprecated Should use peerjs namespace */ | ||
(window as any).Peer = Peer; | ||
if (typeof window === 'object') { | ||
// @ts-expect-error | ||
window.Peer = Peer; | ||
} |
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
Oops, something went wrong.