New popup window created by Chrome extension does not show video streamed via WebRTC on WebApp

382 views
Skip to first unread message

Ricardo De Lemos

unread,
Dec 4, 2014, 2:54:26 AM12/4/14
to chromium-...@chromium.org
HI,

I have an WebApp that creates a WebRTC peerconnection and I have a video call between 2 browsers. Now, i want to "pop-up" the video in a new window, and for that, I have an extension that creates a new window via chrome.windows.create, and then I inject a content script on this new window to allow the communication between this new window and the extension. All working fine.

The issue is that I pass the videoUrl displayed on my WebApp to the content-script, and use it to update the <video> element of new window. The issue is that I always get a 404 (below).

I did a quick test using window.open to create the window (from the WebApp, instead of the extension), and update the video URL via a jQuery function, and it works.

Failed to load resource: the server responded with a status of 404 (Not Found)                  blob:https%3A//vmw-server.yourcircuit.com%3A8094/e08e3d13-ddf5-400c-bbe9-afccd0d8a704


Could this be caused by the Content Security policy? if yes, how can I overcome this?  Do I need create a new peer connection on the new window created by the extension, or there is a way to use the videoUrl provided by the WebApp??

Rob Wu

unread,
Dec 5, 2014, 6:20:21 PM12/5/14
to Ricardo De Lemos, Chromium-extensions
Media stream blob:-URLs are only known to pages/tabs within the same process.
Same-origin tabs opened using window.open() are hosted in the same process as the opener, whereas tabs that are created using chrome.tabs.create are always opened in a new process. That's why you're observing different behavior for seemingly equivalent actions.

You should call getUserMedia from the page/frame where you intend to you use it.

Kind regards,
 Rob
 https://robwu.nl

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/104cdca5-efec-4d54-9862-8b0f91ab17b2%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Ricardo De Lemos

unread,
Dec 6, 2014, 11:19:18 AM12/6/14
to chromium-...@chromium.org
Thanks Rob,

I have suspected that it was something related to the same origin policy. What I plan to do is start a new peer connection from the new popup window created, and forward the remote media from the original window to the pop up window. 

Ajey Charantimath

unread,
May 9, 2018, 1:20:01 AM5/9/18
to Chromium-Extensions-Announce
Ricardo,

Can you shed some light on how did you succeed to implement this?
Reply all
Reply to author
Forward
0 new messages