Synphonyte / leptos-use

Collection of essential Leptos utilities inspired by React-Use / VueUse
https://leptos-use.rs/
Apache License 2.0
322 stars 70 forks source link

Add mediaDevices.getUserMedia #128

Closed hcandelaria closed 3 months ago

hcandelaria commented 3 months ago

the mediaDevices.getUserMedia is similar to getDisplayMedia. I tried experimenting with this using the user_display_media as a starting point and it looks to be working for me.

I can submit a PR, but I would need guidance on the new function template and running the tests.

maccesch commented 3 months ago

That sounds great!

Just follow this https://github.com/synphonyte/leptos-use?tab=readme-ov-file#new-function-template and all the necessary files will be generated for you. You can then paste your code that you already wrote. You might have to rename you current file first so the template doesnt have any conflicts.

To run tests:

cargo test --features math,docs,ssr