We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 283058c commit 7132208Copy full SHA for 7132208
src/index.ts
@@ -85,6 +85,9 @@ export function useReactMediaRecorder({
85
const stream = (await window.navigator.mediaDevices.getDisplayMedia({
86
video: video || true,
87
})) as MediaStream;
88
+ stream.getVideoTracks()[0].addEventListener("ended", () => {
89
+ stopRecording();
90
+ });
91
if (audio) {
92
const audioStream = await window.navigator.mediaDevices.getUserMedia({
93
audio,
0 commit comments