forked from muaz-khan/DetectRTC
-
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.
ignoring "document" object if not available. maybe fixed muaz-khan#44 ?
"window" object is still being set (forced) and used. Need a better solution to ignore "window" object as well. Should we add "DetectRTC.version" to detect library's own version number?
- Loading branch information
Showing
14 changed files
with
93 additions
and
64 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 @@ | ||
// Latest file can be found here: https://cdn.webrtc-experiment.com/DetectRTC.js | ||
|
||
// Muaz Khan - www.MuazKhan.com | ||
// MIT License - www.WebRTC-Experiment.com/licence | ||
// Documentation - github.com/muaz-khan/DetectRTC | ||
// ____________ | ||
// DetectRTC.js | ||
|
||
// DetectRTC.hasWebcam (has webcam device!) | ||
// DetectRTC.hasMicrophone (has microphone device!) | ||
// DetectRTC.hasSpeakers (has speakers!) | ||
|
||
(function() { | ||
|
||
'use strict'; |
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,8 +1,17 @@ | ||
// https://tonicdev.com/npm/detectrtc | ||
|
||
var DetectRTC = require('detectrtc'); | ||
var DetectRTC; | ||
|
||
try { | ||
DetectRTC = require('detectrtc'); | ||
} | ||
catch(e) { | ||
DetectRTC = require('./DetectRTC.js'); | ||
} | ||
|
||
console.log(DetectRTC.browser.name + ' version ' + DetectRTC.browser.version); | ||
console.log(DetectRTC.osName + ' version ' + DetectRTC.osVersion); | ||
console.log(JSON.stringify(DetectRTC)); | ||
console.log(DetectRTC); | ||
|
||
process.exit() |
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