When getUserMedia is invoked in JS, the Camera has been opened in Crosswalk 
already.
But now you are planning to open the second time in Extension, so you are 
getting the RuntimeException.

Currently, we don't expose Camera instance in Crosswalk to extensions. So the 
Camera instance can't be accessed in extensions.
I wander to know why you want to zoom? Can you clarify your scenario in more 
details?

Regards,
Li Yin
From: Frédéric Luart [mailto:[email protected]]
Sent: Thursday, April 03, 2014 3:05 PM
To: Yin, Li; [email protected]
Subject: RE: [Crosswalk-help] access to camera during WebRTC call

Hi,

I am using our JS library (www.apirtc.com<http://www.apirtc.com>) to establish 
the WebRTC call, it is loaded in my index.html file so getUserMedia() is done 
using Chrome.

I have then build an extension using XWalkExtensionClient in order to access to 
the camera API to be able to control zoom ...
but it is blocking when a call is established as the camera instance is not 
shared between chrome and my extension.

I have a "RuntimeException:Fail to connect to camera service"

Best regards,

Fred

From: Yin, Li [mailto:[email protected]]
Sent: jeudi 3 avril 2014 05:25
To: Frédéric Luart; 
[email protected]<mailto:[email protected]>
Subject: RE: [Crosswalk-help] access to camera during WebRTC call

Hi,
Thanks for using WebRTC feature on Crosswalk.
Currently, Camera device can be used by only one application (one process), it 
can't be shared at the same time, I think it is resulted from Camera driver.

Now, Crosswalk app and Chrome are two different applications, running in two 
different processes.
So when Crosswalk is capturing the camera, Chrome can't get the real camera 
content.

About extension, are you using chrome package app?
As far as I know, getUserMedia can be accessed in packaged app.

Regards,
Li Yin
From: Crosswalk-help 
[mailto:[email protected]] On Behalf Of 
Frédéric Luart
Sent: Wednesday, April 02, 2014 11:16 PM
To: 
[email protected]<mailto:[email protected]>
Subject: [Crosswalk-help] access to camera during WebRTC call

Hello,

I have build an android app that use WebRTC to established a call on crosswalk.
It works very well without any issues.

I am now trying to access to camera for instance to modify Zoom during call.
For that I have developed a custom extension to access the camera and set the 
zoom level :

if (camera == null){
              camera = Camera.open();
}
Parameters p = camera.getParameters();
int currentZoom = p.getZoom();
              p.setZoom(currentZoom + 1);
              camera.setParameters(p);

The issue that I have (I think) is that the camera is already used by Chromium 
and so when I access the camera, the video is freezed.
Is there a way to access to the camera device/process used by Chromium in an 
extension ?

Thanks in advance

Fred


_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to