Click here to Skip to main content
16,004,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
we have build an application on winui3. using MediaCapture we are fetching the camera stream. we are enabled SharingMode as "SharedReadOnly" we expect other applications like teams can access the same stream. It was working fine. No we are facing issue like teams grabbing the camera in exclusive mode.

C#
var settings = new MediaCaptureInitializationSettings
    {
        SourceGroup = mediaFrameGroup,
        SharingMode = MediaCaptureSharingMode.SharedReadOnly
        StreamingCaptureMode = StreamingCaptureMode.Video,
        MemoryPreference = MediaCaptureMemoryPreference.Cpu,
        MediaCategory = MediaCategory.Communications
    };


How can use shareReadOnly?

Teams accessing camera feed as exclusive mode it should not happen.
winui-3


What I have tried:

Tried by upgrading
Microsoft.Windows.SDK.BuildTools
and
Microsoft.WindowsAppSDK
to latest version in windows 11 but not affected

OP comment from solution:
Quote:
tried with Teams running in a web browser, camera acquired by teams and able to stream in teams but already running the app which we developed, in that camera become blur, cant able to preview the camera parallely in both the application even if we set SharingMode = MediaCaptureSharingMode.SharedReadOnly
Posted
Updated 22-Aug-24 5:39am
v2

tried with Teams running in a web browser, camera acquired by teams and able to stream in teams but already running the app which we developed, in that camera become blur, cant able to preview the camera parallely in both the application even if we set SharingMode = MediaCaptureSharingMode.SharedReadOnly
 
Share this answer
 
Comments
CHill60 22-Aug-24 11:38am    
Use the "Improve Question" link to add information to your post, or the "Have a Question or Comment?" link to respond directly to Pete O'Hanlon. Don't post comments or additional information as a solution
I suspect the problem isn't your code, but rather it's Teams. As a test, try running your application and Teams running in a web browser. If your app works when Teams is using browser access to get to the camera, then the problem is with Teams and, unfortunately, there's not a lot you're going to be able to do about that other than raise a report with Microsoft.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900