-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Camera switching in a dropdown list #247
Conversation
349f148
to
ede90a8
Compare
Hmm. What's the specific problem we're trying to fix in this PR? If we aren't always sure of the initial state, let's just say it's OK whatever the default is (after we give out best guess preference) and then if it's wrong the user will choose the better option from the dropdown. Would that work, or am I not quite getting your question? Thank you!! |
Sorry for the confusion 😅 I meant to say that when I tried out with wifi cam on my system, the primary cam was being identified as the wifi cam instead of the usual laptop cam So there isn't a proper way to determine if a device even has a facingMode = environment in the first place. Because then the laptop cam should've been the environment facing one
Yes that would work 💯 |
} | ||
} | ||
|
||
videoSelect.onchange = start; //repeating the process for source change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's saying Cannot set property 'onchange' of null
probably in relation to this line -- do we have to modify anything for the cypress tests to see the videoSelect
element?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there was no dropdown
element for the camera selection
in the interface, that's why the tests were failing 😅
Added dropdown element on old interface
1e9432a
to
9098e06
Compare
Congrats on merging your first pull request! 🙌🎉⚡️ |
🎉🎉 |
Should we bump the version and release a 0.0.x update? |
And, if you can link all the issues/PRs together as we do the publication process (including to this one) that would be great. |
Sounds great. Would you like to open a PR for the updated version or shall i do it when I publish? Either way works for me! |
I went ahead and bumped it and published!! |
🎉 🚀 Thanks @jywarren!!! Though I think the dropdown functionality was still on hold...😅 |
Ah, well we can release it in the next publication! Sorry, I took your 👍 as meaning we can go ahead. I'll be more careful to get an explicit "yes" in the future, thanks!!! |
I merged a bunch of dependabot PRs at https://github.com/publiclab/spectral-workbench/pulls and we should see this one reach there soon. If you want we can resolve the dropdown one and then merge after, but it's not a big deal to go through the process twice! |
No it's just that I included the dropdown element on the interface at |
Ah, ok! let's merge that too then! |
Ah, no, ok - so i guess actually the dropdown one is all good then, as we merged #247 ? |
Yes it is 🙌 |
Ah, sorry, maybe I still misunderstand. Is there something missing we need to fix now, or are we OK to take this a little slower? Ah, i see your response that it's OK now. Thanks! Let's try to document clearly the interdependencies between PRs so we can sequence them correctly. Let's use clear comments like Thanks!!! |
So the new interface also has a dropdown button which would be non-functional if we don't merge #245. The camera functionality was crucial so that is already done. |
* Update README.md * Update README.md * Bump jasmine from 3.6.1 to 3.7.0 (#216) Bumps [jasmine](https://github.com/jasmine/jasmine-npm) from 3.6.1 to 3.7.0. - [Release notes](https://github.com/jasmine/jasmine-npm/releases) - [Commits](jasmine/jasmine-npm@v3.6.1...v3.7.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Bump tape from 5.2.0 to 5.2.2 (#211) Bumps [tape](https://github.com/substack/tape) from 5.2.0 to 5.2.2. - [Release notes](https://github.com/substack/tape/releases) - [Commits](tape-testing/tape@v5.2.0...v5.2.2) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * [Security] Bump ini from 1.3.5 to 1.3.8 (#198) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. **This update includes a security fix.** - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](npm/ini@v1.3.5...v1.3.8) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * bump to v0.2.0 (#238) * Camera switching in a dropdown list (#247) * Added camera switching in a dropdown * Added dropdown element for camera switching on old and new interface Added dropdown element on old interface * bump to v0.2.1 * Bump moment from 2.10.6 to 2.19.3 (#230) Bumps [moment](https://github.com/moment/moment) from 2.10.6 to 2.19.3. - [Release notes](https://github.com/moment/moment/releases) - [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md) - [Commits](moment/moment@2.10.6...2.19.3) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump jquery from 3.5.1 to 3.6.0 (#232) Bumps [jquery](https://github.com/jquery/jquery) from 3.5.1 to 3.6.0. - [Release notes](https://github.com/jquery/jquery/releases) - [Commits](jquery/jquery@3.5.1...3.6.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Bump grunt-cli from 1.3.2 to 1.4.3 (#234) Bumps [grunt-cli](https://github.com/gruntjs/grunt-cli) from 1.3.2 to 1.4.3. - [Release notes](https://github.com/gruntjs/grunt-cli/releases) - [Changelog](https://github.com/gruntjs/grunt-cli/blob/main/CHANGELOG.md) - [Commits](gruntjs/grunt-cli@v1.3.2...v1.4.3) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Bump cypress from 5.1.0 to 8.1.0 (#244) Bumps [cypress](https://github.com/cypress-io/cypress) from 5.1.0 to 8.1.0. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js) - [Commits](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.1.0...v8.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Bump path-parse from 1.0.6 to 1.0.7 (#246) Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Upgrade to GitHub-native Dependabot (#226) Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Bump cypress from 8.1.0 to 8.3.0 (#253) Bumps [cypress](https://github.com/cypress-io/cypress) from 8.1.0 to 8.3.0. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js) - [Commits](cypress-io/cypress@v8.1.0...v8.3.0) --- updated-dependencies: - dependency-name: cypress dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump grunt from 1.3.0 to 1.4.1 (#252) Bumps [grunt](https://github.com/gruntjs/grunt) from 1.3.0 to 1.4.1. - [Release notes](https://github.com/gruntjs/grunt/releases) - [Changelog](https://github.com/gruntjs/grunt/blob/main/CHANGELOG) - [Commits](gruntjs/grunt@v1.3.0...v1.4.1) --- updated-dependencies: - dependency-name: grunt dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump jquery.steps from 1.1.1 to 1.1.2 (#250) Bumps [jquery.steps](https://github.com/oguzhanoya/jquery-steps) from 1.1.1 to 1.1.2. - [Release notes](https://github.com/oguzhanoya/jquery-steps/releases) - [Commits](oguzhanoya/jquery-steps@v1.1.1...v1.1.2) --- updated-dependencies: - dependency-name: jquery.steps dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tape from 5.2.2 to 5.3.1 (#249) Bumps [tape](https://github.com/substack/tape) from 5.2.2 to 5.3.1. - [Release notes](https://github.com/substack/tape/releases) - [Commits](tape-testing/tape@v5.2.2...v5.3.1) --- updated-dependencies: - dependency-name: tape dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump jasmine from 3.7.0 to 3.9.0 (#248) Bumps [jasmine](https://github.com/jasmine/jasmine-npm) from 3.7.0 to 3.9.0. - [Release notes](https://github.com/jasmine/jasmine-npm/releases) - [Commits](jasmine/jasmine-npm@v3.7.0...v3.9.0) --- updated-dependencies: - dependency-name: jasmine dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump moment from 2.19.3 to 2.29.1 (#257) Bumps [moment](https://github.com/moment/moment) from 2.19.3 to 2.29.1. - [Release notes](https://github.com/moment/moment/releases) - [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md) - [Commits](moment/moment@2.19.3...2.29.1) --- updated-dependencies: - dependency-name: moment dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump cypress from 8.3.0 to 8.3.1 (#259) Bumps [cypress](https://github.com/cypress-io/cypress) from 8.3.0 to 8.3.1. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js) - [Commits](cypress-io/cypress@v8.3.0...v8.3.1) --- updated-dependencies: - dependency-name: cypress dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump http-server from 0.12.3 to 13.0.1 (#258) Bumps [http-server](https://github.com/http-party/http-server) from 0.12.3 to 13.0.1. - [Release notes](https://github.com/http-party/http-server/releases) - [Commits](http-party/http-server@v0.12.3...v13.0.1) --- updated-dependencies: - dependency-name: http-server dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Added functionality for downloading spectrum image (#245) * Added function for downloading spectrum img * Adding dropdown for camera switching * download file and check length * Update spectral-workbench-demo.spec.js * Update spectral-workbench-demo.spec.js * Update spectral-workbench-demo.spec.js * increase file length test for downloaded image Co-authored-by: Jeffrey Warren <[email protected]> * Bump http-server from 13.0.1 to 13.0.2 (#260) Bumps [http-server](https://github.com/http-party/http-server) from 13.0.1 to 13.0.2. - [Release notes](https://github.com/http-party/http-server/releases) - [Commits](http-party/http-server@v13.0.1...v13.0.2) --- updated-dependencies: - dependency-name: http-server dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Mohammad Warid <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Camera switching workflow for video stream:
deviceId
associate a video streamHi @jywarren, the current implementation is such that it takes the initial
facingMode
asundefined
, since the devices have not been fetched yet.Even after fetching, it is unclear as to what device is facing the
environment
since some devices don't actually have a facingMode asenvironment
. The MDN docs recommend using it for smartphones.For instance if a laptop is connected to an external camera, that external camera is recognised as a
facingMode = environment
instead of the primary one.Thus, I wanted to know your thoughts regarding this...
Make sure these boxes are checked before your pull request is ready to be reviewed and merged. Thanks!
Please be sure you've reviewed our contribution guidelines at https://publiclab.org/wiki/contributing-to-public-lab-software
Please alert developers on [email protected] when your request is ready or if you need assistance.
Thanks!