tabCapture's stream and desktopCapture's streamId

373 views
Skip to first unread message

Sagar Pilkhwal

unread,
Feb 28, 2017, 1:51:07 AM2/28/17
to discuss-webrtc
Hi,

I have been using chrome.desktopCapture.chooseDesktopMedia for over a year which works perfectly and recently tried out chrome.tabCapture.capture. The problem which I came across is the callback which chooseDesktopMedia returns i.e streamId which is getUserMedia()  compatible, but in case of chrome.tabCapture.capture  the callback returns LocalMediaStream stream object which HAS to be processed in the extension itself.
In case desktopCapture, I am able to send the streamId back to my website js and use it to create RtcPeerConnnection but as I cant pass a complex object like stream to my website js as the message's are JSON.Stringify, I'm forced to move code logic of my website to the extension.

My question : Is this as expected & accepted by the webrtc community ? On one hand we are returning a getUserMedia() compatible streamId and on the other hand we are returning just the stream object which can not be passed back to the website from the extension ?
I searched around a bit and didn't find any bug/change request around this problem. Do we have a roadmap to make this change and return the streamId in case of chrome.tabCapture.capture ?

Regards,
Sagar Pilkhwal

Niklas Enbom

unread,
Feb 28, 2017, 4:36:45 PM2/28/17
to discuss...@googlegroups.com
I'm aware of the problem and the situation isn't ideal, but one way this is now mitigated is by supporting tab capture through chooseDesktopMedia. Would that be an option for you?

Niklas

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/838bd2af-10aa-44c8-a5bb-8017fedba177%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sagar Pilkhwal

unread,
Mar 1, 2017, 2:11:47 AM3/1/17
to discuss-webrtc

chooseDesktopMedia is an option with "tab" enum but the way tabCapture works with a single click pageAction/browserAction/contextMenu is more easy for developer rather than giving a popup to the user to choose between screens.

Also on Ubuntu 14.04 (user-agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36)
dataSources = ['tab']; isn't working. Is this a knows issue ?
Error in extension->background page ->console "Unchecked runtime.lastError while running desktopCapture.chooseDesktopMedia: At least one source type must be specified."

Regards,
Sagar Pilkhwal

Niklas Enbom

unread,
Mar 1, 2017, 1:03:18 PM3/1/17
to discuss...@googlegroups.com
No that's not a known issue, and it doesn't repro for me. Can you test with: https://chrome.google.com/webstore/detail/screen-recorder/gdamcnkmddbfhaadidkhahllkabienpk

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages