Forum Discussion

mkemalgokce's avatar
mkemalgokce
Copper Contributor
May 08, 2023

Image proccessing on MS Teams

 

Hello,

 

I want to build an application about image processing with MS Teams Meetings. So how can i get frames on live stream? Can I get video frames or video stream data ? Is there any possible way to do this ?

 

Thanks.

6 Replies

    • mkemalgokce's avatar
      mkemalgokce
      Copper Contributor
      Thanks for your answer. I am using teams-js extension. I want to access my camera frames or other peers camera frames on live meeting from teams-js. Is there any way to do this? Have a nice days..
      • Sayali-MSFT's avatar
        Sayali-MSFT
        Icon for Microsoft rankMicrosoft

        mkemalgokce - Could you please try with the below sample code-

        const CaptureImage = () => {
          const [capturedImage] = useState('');
          const [capturedImages, setCapturedImages] = useState<any[]>([]);
        
          useEffect(() => {
            // initializing microsoft teams sdk
            microsoftTeams.app.initialize()
          })
        
          // Method to validate before capturing media
          function captureMultipleImages(mediaCount: number) {
            // Method to ask for image capture permission and then select media
               let imageProp: microsoftTeams.media.ImageProps = {
              sources: [microsoftTeams.media.Source.Camera, microsoftTeams.media.Source.Gallery],
              startMode: microsoftTeams.media.CameraStartMode.Photo,
              ink: false,
              cameraSwitcher: false,
              textSticker: false,
              enableFilter: true,
            };
        
           
            let mediaInput: microsoftTeams.media.MediaInputs = {
              mediaType: microsoftTeams.media.MediaType.Image,
              maxMediaCount: mediaCount,
              imageProps: imageProp
            };

        Also refer the below sample-

        Microsoft-Teams-Samples/CaptureImage.tsx at main · OfficeDev/Microsoft-Teams-Samples · GitHub 

Resources