getUserMedia API suport for Opera Local screen share - opera

I am creating an Opera extension that will open a webpage which will allow user to stream a local window on to the browser html file. Since Opera extension structure is similar to the chrome, I tested the structure on Opera.
For manifest having permissons :
"permissions": ["desktopCapture","activeTab"],
Error :
There were warnings when trying to install this extension:
Permission 'desktopCapture' is unknown or URL pattern is malformed.
And for using the method :
chrome.desktopCapture.chooseDesktopMedia(["screen", "window"], onAccessApproved);
Console error :
Uncaught TypeError: Cannot read property 'chooseDesktopMedia' of undefined
Is there some documentation available for Opera regarding getUserMedia API usage that can help in the matter
Already gone through :
* https://dev.opera.com/articles/getusermedia-access-camera-privacy-ui/
* https://dev.opera.com/tags/getusermedia/
* WebRTC official page

The desktopCapture is not supported in Opera yet so you can't use it. There is no other way to share other application window I could see to work now.

Related

understanding and/or troubleshooting XMLHttpRequest - No 'Access-Control-Allow-Origin' error

I am not an experienced web developer by any means, so I apologize if this is very basic / newb question. I did try researching this error message, but my skillset lies in different areas, so I was hoping someone could maybe give me a pointer.
We have a SWG (secure web gateway) inline that may or may not be causing this, since access works in IE, but not in Chrome - and the SWG just went inline recently - so am trying to find some root cause for this error.
here is the error message that I pull out of Chrome's Console debugger:
XMLHttpRequest cannot load .... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.youtube.com' is therefore not allowed access. The response had HTTP status code 403.
the "..." shows a URL that referes to a googlevideo.com link, but I am trying to view a video on youtube.com - any video for that matter.
seems that this is an XSS defense mechanism, but I dont see any blocks in the SWG, nor are some of the next-gen features even enabled
Chrome version - Version 51.0.2704.63 m (64-bit)
IE version - 11.0.9600.18314
any help is appreciated.
--disable-web-security now requires the use of the --user-data-dir flag.
Start-up your chrome with below command on windows:
chrome.exe --disable-web-security --user-data-dir
OR
Open Properties window of Google Chrome short cut icon available on desktop.
Go to the Shortcut tab
Specify the following flag at the end of path
"C:...\Application\chrome.exe" --disable-web-security --user-data-dir
Just specifying --disable-web-security --user-data-dir (without a value) worked for me.
If this didn't work for you then try specifying some folder path:
--user-data-dir=$HOME/path/to/some/folder

Strange getUserMedia issue?

I'm working on an html application that uses getUserMedia. It works great so far but there is one little problem:
The web application is also being called from local file system. That means file://.
Ok, WebRTC is unavailable in this case. When the Browser tries to call
navigator.getUserMedia({video: true, audio: false}, function(localMediaStream) {...}, function(error) {alert("blabla webrtc unavailable";)});
it should run into an error and call the error callback.
In case of file://, none of these two callbacks will be ever called.
In another case, the web application is running over regular http://, a warning is given, that the WebRTC feature is unavailable in insecure environments, but here the error callback is working as expected.
I need the error callback to tell the user, that WebRTC is unavailable.
What is wrong here?
(It is used for an unimportant feature. And only getUserMedia() is used, not the entire WebRTC-Workflow. But it is ugly, if it run into a blank screen)
And no, there is no waiting popup which ask the user for permission :-)
The problem is Chrome only. Probably a Browser bug?
Thanks.
Silently failing for file:// is documented Chrome behaviour, see here. If you can control Chrome, the allow-file-access-from-files flag enables getUserMedia from file urls.

Cannot read property 'chooseDesktopMedia' of undefined

I am working on desktopCapture API of google chrome webrtc. When I run the application I am getting error "Cannot read property 'chooseDesktopMedia' of undefined". Means browser is not able to find the chrome.desktopCapture inside chrome browser.
My chrome browser version is 38.
Yep, access to the desktopCapture API is disabled by default. You either need to write an extension or modify the browsers internal flags.
I wrote such an example extension which might be helpful.

How to export Safari Web Inspector timeline data?

Just like in Chrome Developer Tool, I was wondering if there is any tool/extension/plugin which would allow me to export timeline data in Safari. I tried the nightly build of webkit but it does not have that feature. Seems like this is a Chrome specific functionality.
I have to use Safari because I am testing a webapp on iPhone.
I searched around for any hints but could not get any. As of now I am thinking of two options to get the timeline information:
Build a Safari extension
Get Chrome Dev Tool's timeline code and build my own version of webkit (if that's even possible!)
Any guides/insights would be highly appreciated!
Update 1: I downloaded Webkit and found out that it supports remote iPhone debugging through USB. Probably I can find the code for web inspector for Webkit and use that code to export the timeline data.
Safari's Web inspector does use the WebKit remote debugging protocol.
However, Safari does not use TCP/HTTP as a transport layer, thus
making it incompatible with Chrome. source
Thankfully, someone from Google wrote a proxy allowing to overcome this limitation.

Webkit audio Api createMediaElement Source

with reference to Working example for MediaElementAudioSourceNode with Chrome Canary?
anything ever came of this? I get a JS error
Uncaught TypeError: Object # has no method 'createMediaElementSource'
I'm using the latest chrome
It's now finally supported in Chrome 18 (currently Canary)!
See this article: HTML5Rocks Updates - HTML5 and the Web Audio API are BFFs!