Skip to content

Commit

Permalink
ask again for device permissions in Firefox when user cleared them ma…
Browse files Browse the repository at this point in the history
…nually (#468)
  • Loading branch information
thijstriemstra committed May 19, 2020
1 parent 6779cf0 commit 4d2de73
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
`exportImage` (#417)
- Fix file extension for `video/x-matroska` mime-type (#464, #469)
- Fix milliseconds in `formatTime` (#443)
- Ask again for device permissions in Firefox when user cleared them
manually (#468)
- Move documentation to website (#472)
- Bump required version for:
- video.js (7.0.5 or newer)
Expand Down
8 changes: 7 additions & 1 deletion src/js/videojs.record.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ class Record extends Plugin {
}
};
}
// open browser device selection dialog
// open browser device selection/permissions dialog
this.surfer.surfer.microphone.start();
break;

Expand Down Expand Up @@ -811,6 +811,12 @@ class Record extends Plugin {
*/
start() {
if (!this.isProcessing()) {
// check if user didn't revoke permissions after a previous recording
if (this.stream && this.stream.active === false) {
// ask for permissions again
this.getDevice();
return;
}
this._recording = true;

// hide play/pause control
Expand Down

0 comments on commit 4d2de73

Please sign in to comment.