Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome MediaRecorder API share pre-selected tab

So, here's is my doubt. I'm using the MediaRecorder API, to make a recording of my browser's screen. I can capture the whole browser screen + audio(tab) + my microphone. Everything is working fine. But I only need to capture the screen+audio from the tab that started the recording. On that popup thats opens on google chrome, when I want to screenshare some tab or application, is it possible to show only the tab that started the screenshare? So I don't have to seek everytime the tab that I want to share.

I didn't find any information about that.

When working with the google chrome API, I see that we can capture only a tab, but outside this API, is it possible to accomplish something similar? Or is only possible to work with pre-selected tab if I develop a google chrome extension?

chrome.tabCapture.capture({audio: true, video: true}, callback);
like image 395
heliosk Avatar asked Jan 29 '26 20:01

heliosk


1 Answers

Unfortunately you can't specify it or limit it to the current tab.

Note: Constraints never cause changes to the list of sources available for capture by the Screen Sharing API. This ensures that web applications can’t force the user to share specific content by restricting the source list until only one item is left

https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API/Using_Screen_Capture

like image 51
Fyrestar Avatar answered Jan 31 '26 23:01

Fyrestar