Skip to content

Commit

Permalink
isApplyConstraintsSupported & isMultiMonitorScreenCapturingSupported …
Browse files Browse the repository at this point in the history
…added.

DetectRTC.isApplyConstraintsSupported
and:
DetectRTC.isMultiMonitorScreenCapturingSupported
  • Loading branch information
muaz-khan committed Sep 25, 2015
1 parent c92db6d commit 3c2aa39
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 7 deletions.
20 changes: 19 additions & 1 deletion DetectRTC.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Last time updated at Sep 24, 2015, 08:32:23
// Last time updated at Sep 25, 2015, 08:32:23

// Latest file can be found here: https://cdn.webrtc-experiment.com/DetectRTC.js

Expand Down Expand Up @@ -584,3 +584,21 @@ if (DetectRTC.browser.isFirefox && DetectRTC.browser.version > 38) {
isRemoteStreamProcessingSupported = true;
}
DetectRTC.isRemoteStreamProcessingSupported = isRemoteStreamProcessingSupported;

//-------
var isApplyConstraintsSupported = false;

/*global MediaStreamTrack:true */
if (typeof MediaStreamTrack !== 'undefined' && 'applyConstraints' in MediaStreamTrack.prototype) {
isApplyConstraintsSupported = true;
}
DetectRTC.isApplyConstraintsSupported = isApplyConstraintsSupported;

//-------
var isMultiMonitorScreenCapturingSupported = false;
if (DetectRTC.browser.isFirefox && DetectRTC.browser.version >= 43) {
// version 43 merely supports platforms for multi-monitors
// version 44 will support exact multi-monitor selection i.e. you can select any monitor for screen capturing.
isMultiMonitorScreenCapturingSupported = true;
}
DetectRTC.isMultiMonitorScreenCapturingSupported = isMultiMonitorScreenCapturingSupported;
2 changes: 1 addition & 1 deletion DetectRTC.min.js

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ npm install detectrtc
bower install detectrtc
```

# Check all releases

* https://github.com/muaz-khan/DetectRTC/releases

Latest stable release is: [1.0.9](https://github.com/muaz-khan/DetectRTC/releases/tag/1.0.9)

# Proposed NEW API

```javascript
Expand Down Expand Up @@ -48,10 +54,6 @@ To use it:
<script src="//cdn.webrtc-experiment.com/DetectRTC.js"></script>
```

**Check all releases:**

* https://github.com/muaz-khan/DetectRTC/releases

<img src="https://cdn.webrtc-experiment.com/images/DetectRTC.png" style="width:100%;" />

# How to use it?
Expand Down
18 changes: 18 additions & 0 deletions dev/DetectRTC.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,21 @@ if(DetectRTC.browser.isFirefox && DetectRTC.browser.version > 38) {
isRemoteStreamProcessingSupported = true;
}
DetectRTC.isRemoteStreamProcessingSupported = isRemoteStreamProcessingSupported;

//-------
var isApplyConstraintsSupported = false;

/*global MediaStreamTrack:true */
if(typeof MediaStreamTrack !== 'undefined' && 'applyConstraints' in MediaStreamTrack.prototype) {
isApplyConstraintsSupported = true;
}
DetectRTC.isApplyConstraintsSupported = isApplyConstraintsSupported;

//-------
var isMultiMonitorScreenCapturingSupported = false;
if(DetectRTC.browser.isFirefox && DetectRTC.browser.version >= 43) {
// version 43 merely supports platforms for multi-monitors
// version 44 will support exact multi-monitor selection i.e. you can select any monitor for screen capturing.
isMultiMonitorScreenCapturingSupported = true;
}
DetectRTC.isMultiMonitorScreenCapturingSupported = isMultiMonitorScreenCapturingSupported;
2 changes: 1 addition & 1 deletion dev/head.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Last time updated at Sep 24, 2015, 08:32:23
// Last time updated at Sep 25, 2015, 08:32:23

// Latest file can be found here: https://cdn.webrtc-experiment.com/DetectRTC.js

Expand Down
6 changes: 6 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ <h2 id="welcome">Detect WebRTC!</h2>

appendTR('Can you change output audio devices?', printVal(DetectRTC.isSetSinkIdSupported));

appendTR('Can you change camera resolutions without making new getUserMedia request?', printVal(DetectRTC.isApplyConstraintsSupported));

appendTR('Browser Supports WebRTC (Either 1.0 or 1.1)?', printVal(DetectRTC.isWebRTCSupported));
appendTR('Browser Supports ORTC (WebRTC 1.1)?', printVal(DetectRTC.isORTCSupported));

Expand All @@ -136,6 +138,10 @@ <h2 id="welcome">Detect WebRTC!</h2>
appendTR('Browser Supports SCTP Data Channels?', printVal(DetectRTC.isSctpDataChannelsSupported));
appendTR('Browser Supports RTP Data Channels?', printVal(DetectRTC.isRtpDataChannelsSupported));
appendTR('This page Supports Screen Capturing API?', printVal(DetectRTC.isScreenCapturingSupported));

appendTR('Is this browser supports multi-monitor selection & capturing screen of any monitor?', printVal(DetectRTC.isMultiMonitorScreenCapturingSupported));


appendTR('Is it a mobile device?', printVal(DetectRTC.isMobileDevice));
appendTR('Browser Supports WebSockets?', printVal(DetectRTC.isWebSocketsSupported));

Expand Down

0 comments on commit 3c2aa39

Please sign in to comment.