We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I can't switch between two webcams in image-only mode.
Just use one of your default examples with two webcams and this config:
const videoJsOptions = { controls: false, bigPlayButton: false, fluid: false, fill: true, width: 640, height: 480, plugins: { record: { debug: true, imageOutputType: 'dataURL', imageOutputFormat: 'image/png', imageOutputQuality: 0.92, image: true, // video: true }, }, }
And then just try to switch between them calling setVideoInput(deviceId)
Video should switch to another webcam.
Have same webcam loaded or just an error (in 30-50% of tries).
DOMException: Failed to allocate videosource
DeviceId is set in setVideoInput method only for video, not for image mode.
I made a simple workaround by implementing setImageInput method, just like setVideoInput:
setImageInput(deviceId) { if (this.recordImage === Object(this.recordImage)) { // already using image constraints this.recordImage.deviceId = {exact: deviceId}; } else if (this.recordImage === true) { // not using image constraints already, so force it this.recordImage = { deviceId: {exact: deviceId} }; } // release existing device this.stopDevice(); // ask for video input device permissions and start device this.getDevice(); }
videojs-record: 4.5.0
firefox, chrome, electron
windows
Sorry, I'm not a native English speaker
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
I can't switch between two webcams in image-only mode.
Steps to reproduce
Just use one of your default examples with two webcams and this config:
And then just try to switch between them calling setVideoInput(deviceId)
Results
Expected
Video should switch to another webcam.
Actual
Have same webcam loaded or just an error (in 30-50% of tries).
Error output
DOMException: Failed to allocate videosource
Possible reason and solution
DeviceId is set in setVideoInput method only for video, not for image mode.
I made a simple workaround by implementing setImageInput method, just like setVideoInput:
Additional Information
versions
videojs
videojs-record: 4.5.0
browsers
firefox, chrome, electron
OSes
windows
Sorry, I'm not a native English speaker
The text was updated successfully, but these errors were encountered: