how to pass native application selected device info to cef3

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

how to pass native application selected device info to cef3

Postby kpsingh79 » Wed Apr 15, 2015 8:28 am

I am working with a native application (in C++, Javascript) using CEF3 framework and need to select device like Speaker, Camera, MIC and Network (LAN or WiFi etc.). 1. I have written JS API that gets the information from C++ Native app. 2. C++ app retrieves the device info from OS using IEnumMoniker, IMMDeviceCollection and Windows Waveform Functions.

Qus: How to force CEF3 (chrome browser) to use devices selected by C++ native app? means during the WebRTC call, CEF3 (chrome browser) must use the devices (Speaker, Camera, MIC and Network) selected by my C++ app.

I have gone through with many blogs but didn't get related information or solution. Please help me & let me know if need more info.
kpsingh79
Newbie
 
Posts: 2
Joined: Wed Apr 15, 2015 8:17 am

Re: how to pass native application selected device info to c

Postby magreenblatt » Fri Apr 17, 2015 5:29 am

If you're using HTML5 WebRTC to access the camera or mic then you can select the device via JavaScript. There is no capability in Chromium for selecting the network interface.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: how to pass native application selected device info to c

Postby kpsingh79 » Mon Apr 20, 2015 4:49 am

Thanks for the sharing the information.

Yes! using JavaScript it is possible. But in my case I need to access audio/video/network devices from C++ a native application to CEF3. So that Chrome can use the devices selected my C++ native application.
kpsingh79
Newbie
 
Posts: 2
Joined: Wed Apr 15, 2015 8:17 am

Re: how to pass native application selected device info to c

Postby simontolham » Fri May 08, 2015 2:30 pm

@kpsingh79 I think the following is what you're after here?
https://bitbucket.org/chromiumembedded/ ... ntegration

in particular:
https://bitbucket.org/chromiumembedded/ ... -functions

This allows you to exchange data between the browser using javascript and the C++ backend. This mechanism will only be able to exchange information about the devices though. There is no real way you can get a pointer or handle to the device from the browser and somehow ask Chrome to use this device for you. As @magreenblatt points out, this is already possible with WebRTC and javascript.

Also, are you going to try to render the video from your C++ native application in the browser window? If so how are you planning on doing this?
simontolham
Techie
 
Posts: 11
Joined: Fri May 08, 2015 2:16 pm

Re: how to pass native application selected device info to c

Postby dverma05 » Thu May 14, 2015 7:30 am

@simontolham
are you going to try to render the video from your C++ native application in the browser window?

No, We are not trying to render the video from our C++ native app. What we are trying is as below:

- We want to select specific device (Ex. camera, microphone, speaker) for WebRTC communication. So if we are having 3 cameras available say- camera1, camera2 and camera3 and user have selected the camera3 then while initiating the WebRTC video session, camera3 should be used. Here the problem we are facing is that all device related API's we have written in C++ and we have to pass (or link) these selected device info to WebRTC API's. How to achieve this binding that is the question?
dverma05
Techie
 
Posts: 35
Joined: Wed Apr 01, 2015 5:23 am

Re: how to pass native application selected device info to c

Postby Arthur » Wed Mar 09, 2016 9:52 am

Any Progress on this one ?
Arthur
Newbie
 
Posts: 3
Joined: Thu Feb 18, 2016 12:19 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 77 guests