-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
Handle for device permission before start record #468
Comments
Your question looks similar to this: https://stackoverflow.com/questions/15993581/reprompt-for-permissions-with-getusermedia-after-initial-denial Apparently Chrome provides a Permissions API that allows you to query device permissions: navigator.permissions.query({name: 'microphone'})
.then((permissionObj) => {
console.log(permissionObj.state);
})
.catch((error) => {
console.log('Got error :', error);
})
navigator.permissions.query({name: 'camera'})
.then((permissionObj) => {
console.log(permissionObj.state);
})
.catch((error) => {
console.log('Got error :', error);
}) There is also a polyfill for the navigator.permissions.request() API (because the And this should be called before getUserMedia is called. Can you try this permissions API and see how it works @freedytag so we can discuss how to implement it in videojs-record? |
The current flow I used is For prevent, the end-user think their microphone was still getting recorded And user click play to playback the recorded audio to check is ok to submit If the recorded audio was not good, the end-user may use the "⬤" to record again. In this case, I try to use ref code:
|
I misunderstood. I re-read your original report and was able to reproduce the "empty audio" situation. Will call this a bug instead of an enhancement. |
In Firefox (76 on Ubuntu 18) I see this error message:
In Chrome 81 it's not possible to revoke the permissions after allowing them (unless the page is reloaded). |
* bump required version for video.js (7.0.5) and videojs-wavesurfer (3.2.0) * update examples for videojs-wavesurfer 3.x * update tests config for videojs-wavesurfer 3.x * update changelog * build: adjust config for copy-webpack-plugin update * bump required version for recordrtc to 5.6.1 * fix milliseconds in formatTime (#443) * replace msDisplayMax with displayMilliseconds option * add exportImage * add mime module * fix mime-type for lamejs plugin * doc: add multi example * ci: disable firefox for now * ask again for device permissions in Firefox when user cleared them manually (#468) * audio+screen: add missing error handler * add optional fileExtension param * update dev dependencies
Description
When starting the record, better add a handle for device permission is author not.
Steps to reproduce
For audio-only case, when I click start record middle button.
And press the record, and then stop record.
Now it was finished record audio success.
Now If I cancel the permission from browser address bar(Firefox)
(That is also same as video case if the user warry the personal privacy issue)
And then press the start record button.
And stop the record button.
Now try to play the record result (It was empty audio)
Results
Expected
If permission was cancel, when press record, better ask permission again.
Actual
It did not ask permission again. and record an empty audio
Error output
Not error output.
Additional Information
That was better stop the device after the user click "stop record", special for video record, as user will warry it about the personal privacy.
versions
videojs
VideoJS 7.7.5
VideoJS record 3.11.0
browsers
Firefox 76.0
OSes
Mac/Windows
The text was updated successfully, but these errors were encountered: