Skip to content

Blazor WASM Switching cameras doesn't work #21

@rajkishan16

Description

@rajkishan16

Hi,

I'm trying to create a Blazor WebAssembly Hosted app in which a user can use their PC's webcam or connected webcams to take a picture and then save it. Based on the available features, BlazorMedia is exactly what I want, and thank you for creating this.

When I try to just display the camera stream in the page and take a photo, it works perfectly fine. However, if I want to give the user the option to select which camera they want to use, it doesn't work correctly. As you can see in the below image, the selected camera in the dropdown is my USB webcam, whereas the video actually being displayed is from my laptop's webcam (please ignore that placeholder image, my laptop's webcam has a privacy shutter which is closed in this pic).

BlazorMedia Camera Selection

When I switch cameras in the dropdown, it doesn't seem to change the video source either. The sample project was a bit too big to just upload normally here, so I've shared a Google Drive link to the zipped project folder.

https://drive.google.com/file/d/1Azzirwp8WHDeaHicIwgOnsCadFafnD1m/view?usp=sharing

Can you please let me know what I'm doing wrong here, or how I can fix it to make it work the way I want it?

Thanks,
Rajkishan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions