8 comments on “Using getDisplayMedia for local recording with audio on Jitsi

  1. Jan-Ivar over at Mozilla had a number of great comments I will review and address in an update. Here they are for readers who see this before I make that update:

    Under “iFrame Permissions” you say “Safari requires iframe allow="display"

    but for me, Safari 13.1 on macOS seems to support “display-capture” which btw is to spec.
    (Safari on iOS is another matter; no support even on ipads.)

    “API includes a displaySurface option for choosing between desktop … displaySurface selection constraints are useless … essentially the constraints are allowed to do anything”

    Yes, they’re read-only effectively, and were almost removed to avoid confusion. However, they do let JS know what category of surface the user chose, using track.getSettings(), so not 100% useless even though perhaps it’s close 😉.

    “Firefox and Safari require a user gesture”

    “Firefox, Safari, and the spec require a user gesture” — might be helpful to readers as to what changes to expect here 😉

    “there are differences in the information returned by each track”

    FWIW constraints are source-specific, and there’s an explicit list in the screen-capture spec of the only constraints that should work there. E.g. I believe all of the audio constraints you mention as specific to microphones, so I wouldn’t expect them to stick around in Chrome.

    “Inconsistent constraint checks … Audio only requests are not supported”

    True, though the error is a Chrome bug. In Firefox (even though it doesn’t support audio yet) as well as the spec, {video} defaults to true in this spec, which means calling navigator.mediaDevices.getDisplayMedia() without arguments should get you video, and {audio: true} = {video: true, audio: true}.

    I also wanted to mention the “limitations” are intentional and not likely to be lifted: sharing a web surface exposes users to unique security attacks that are hard to explain even to experts (circumventing the same-origin policy). See this blog for details.

    Oh and thanks for covering the macOS permission stuff. FWIW on the “Unfortunately this setting only takes effect after you reset the application” it seems to work for me even when I don’t, but YMMV.

  2. i tried to use this solution, but participants audio is not recording, can u please help me to know the issue

  3. Thanks for your posting.
    I have followed your steps but after download, I cannot play the video file.
    But when I click play button, it plays well.
    What should I do? please help me.

  4. Thanks for helpful posting.
    I have tried follow steps as you mentioned. After download video file, and I could not play it. It seems video file break down. but When I click play button, it plays as well,
    What should I do? please help me.

  5. hi Chad Hart,

    nice article, and its work on jitsi.but i did’t want capture entire screen display, just video large only $(‘video#largeVideo’) but also audio. could you give me insight.

  6. Hi Chad,

    I have tried your code with self hosted jitsi. After recording the voice form mic is coming but the voice of speakers is not coming in the saved webm file. I am using google chrome on windows to access the vc. Is there any permission to be given from browser?

  7. Dear Chad,

    Using the above code I am not able to capture speaker voice of participants,I am using Chrome on windows to access the self hosted jitsi application where your code is integrated

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.