You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand this is a feature request and questions should be posted in the Community Forum
I searched issues and couldn’t find anything (or linked relevant results below)
Problem
If there are more than one camera with PC, some one will be selected as video source. How to get the source currently selected, so that it can be stored in web stoarge, and be read for setting the default source for next use?
Solution
The best way is to add a new option to tell Uppy to remember the selected video source and to recover it as initial source for next use.
Alternatives
Expose two functions, one for getting currently selected video source, and anoth is for setting selected video source.
Or there are some similar functions existing.
The text was updated successfully, but these errors were encountered:
carlshe
changed the title
how to remember the selected video source for setting as next default source
how to remember the selected video source for setting as next default source while using Webcam?
May 2, 2023
I see how this could be useful, but I believe for rather rare use cases, so unfortunately I don't think we'll be able prioritize this anytime soon.
If you'd like to PR this, what could be done is store the chosen device in plugin optionsm and then it can be remembered / manipulated outside of uppy via uppy.getPlugin('Webcam').setOptions({ device: 'MyLogitechCam' }).
I can read the currently select video source using following code on event 'file-added': let vs=$('.uppy-Webcam-videoSource-select');let curSelected= vs.val();
But in what an event I can set the device initially? I tried the following code right after the construction of uppy. let vs2 = $('.uppy-Webcam-videoSource-select'); vs2.val('18c7032a9b7aa1f93ef65ac9cd30566f8b08dfcf7a2e5f0787e600aeda101512');
But vs2 seems always null, that means the select element has not been created yet.
I also tried the code you presented right after the uppy is constructed, just like uppy.getPlugin('Webcam').setOptions({ device: 'Surface Camera Rear' });.
But it has no effect, too. I did found that the device value is appended to the options of Webcam.
Initial checklist
Problem
If there are more than one camera with PC, some one will be selected as video source. How to get the source currently selected, so that it can be stored in web stoarge, and be read for setting the default source for next use?
Solution
The best way is to add a new option to tell Uppy to remember the selected video source and to recover it as initial source for next use.
Alternatives
Expose two functions, one for getting currently selected video source, and anoth is for setting selected video source.
Or there are some similar functions existing.
The text was updated successfully, but these errors were encountered: