Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from rtc-io/specify-mandatory
Allow generation of mandatory constraints
- Loading branch information
Showing
6 changed files
with
71 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
ui: tape | ||
browsers: | ||
- name: chrome | ||
version: [35,36,beta] | ||
version: [41,42,beta] | ||
|
||
- name: firefox | ||
version: 30..latest | ||
version: [36,37,beta] |
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,36 @@ | ||
var test = require('tape'); | ||
var expect = require('./helpers/expect-constraints-mandatory'); | ||
|
||
test('camera min:1280x720 15fps', expect({ | ||
audio: true, | ||
video: { | ||
mandatory: { | ||
minFrameRate: 15, | ||
maxFrameRate: 15, | ||
frameRate: 15, | ||
minWidth: 1280, | ||
width: { min: 1280 }, | ||
minHeight: 720, | ||
height: { min: 720 } | ||
}, | ||
optional: [] | ||
} | ||
})); | ||
|
||
test('camera min:1280x720 max:1280x720 min:15fps max:25fps', expect({ | ||
audio: true, | ||
video: { | ||
mandatory: { | ||
minFrameRate: 15, | ||
maxFrameRate: 25, | ||
frameRate: { min: 15, max: 25 }, | ||
minWidth: 1280, | ||
maxWidth: 1280, | ||
width: 1280, | ||
minHeight: 720, | ||
maxHeight: 720, | ||
height: 720 | ||
}, | ||
optional: [] | ||
} | ||
})); |
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,12 @@ | ||
var captureconfig = require('../../'); | ||
|
||
module.exports = function(expected) { | ||
return function(t) { | ||
t.plan(1); | ||
t.deepEqual( | ||
captureconfig(t.name).toConstraints({ useMandatory: true }), | ||
expected, | ||
JSON.stringify(expected) | ||
); | ||
}; | ||
}; |