Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question How can I get mediaStream?

Discussion in 'Web' started by unity_01audtjr, Sep 15, 2023.

  1. unity_01audtjr


    Apr 4, 2022
    I want to integrate the media stream obtained through getdisplaymedia in js.
    webRTC has a MediaStream class, but building with webGL is not supported.
    Can you tell me how to get it?
    Last edited: Sep 15, 2023
  2. jukka_j


    Unity Technologies

    May 4, 2018
    Unity does not provide or integrate with any desktop recording or screen sharing technologies.

    The Web platform builds of Unity do not prevent one however from developing such features, so if you so wish, you can write JavaScript to do navigator.mediaDevices.getDisplayMedia() to acquire a screen share, and then implement a WebRTC connection to send it out.

    Searching the web, web developers have been discussing such techniques e.g. at , maybe that might be helpful?