Skip to content

Commit

Permalink
fix(useUserMedia): stop stream on scope dispose
Browse files Browse the repository at this point in the history
  • Loading branch information
Waleed-KH committed Jan 31, 2024
1 parent 5857342 commit 168b22a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core/useUserMedia/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ export function useUserMedia(options: UseUserMediaOptions = {}) {
{ immediate: true },
)

tryOnScopeDispose(() => {

Check failure on line 112 in packages/core/useUserMedia/index.ts

View workflow job for this annotation

GitHub Actions / test (16.x)

Cannot find name 'tryOnScopeDispose'.

Check failure on line 112 in packages/core/useUserMedia/index.ts

View workflow job for this annotation

GitHub Actions / test (18.x)

Cannot find name 'tryOnScopeDispose'.

Check failure on line 112 in packages/core/useUserMedia/index.ts

View workflow job for this annotation

GitHub Actions / test (20.x)

Cannot find name 'tryOnScopeDispose'.
stop()
})

return {
isSupported,
stream,
Expand Down

0 comments on commit 168b22a

Please sign in to comment.