forked from apidaze/apidaze-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added APIdaze.isWebRTCSupported() and APIdaze.browerDetails() functions
- Loading branch information
Philippe Sultan
committed
Oct 10, 2017
1 parent
a90d62c
commit c273c5f
Showing
1 changed file
with
15 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
import CLIENT from './CLIENT.js'; | ||
import * as WebRTCAdapter from 'webrtc-adapter'; | ||
import Logger from './Logger.js'; | ||
|
||
var __VERSION__ = process.env.VERSIONSTR // webpack defineplugin variable | ||
|
||
var version = __VERSION__ | ||
|
||
var LOG_PREFIX = 'APIdaze-' + __VERSION__; | ||
|
||
const isWebRTCSupported = function() { | ||
return typeof WebRTCAdapter.browserDetails === "object" && | ||
typeof WebRTCAdapter.browserShim === "object"; | ||
} | ||
|
||
const browserDetails = function() { | ||
return WebRTCAdapter.browserDetails; | ||
} | ||
|
||
export { | ||
version, | ||
isWebRTCSupported, | ||
browserDetails, | ||
CLIENT | ||
} |