google-chrome-extensionwebrtcdesktop-sharing

Is WebRTC's desktop sharing without calling chooseDesktopMedia possible?


I am developing a chrome extension that I can use for desktop sharing using WebRTC. I need to use this extension in a sort of automation mode i.e. without user interaction. This extension is to be used as a child process of the main application and for that any permission and/or media selection dialogs shown by 'chooseDesktopMedia' has to be avoided. As far as I have read about desktop sharing using WebRTC, I have reached to a conclusion that 'chooseDesktopMedia' is must to call api for desktop sharing thus there is no way that the selection dialog can be by passed. But one thing confused me. While reading another post at Stackoverflow i.e. Desktop capture chrome plugin I found a claim that the person managed to do the above task without showing desktop/screen selection dialog. It confused me as no proper solution was provided with the claim in this thread.

So I want to ask one simple question now. Is WebRTC's desktop sharing without calling chooseDesktopMedia possible?


Solution

  • During my research I found the below given thread:

    https://groups.google.com/forum/#!msg/discuss-webrtc/j6jmyBFt9QI/6cjiksWiYaEJ

    After reading this thread, I thought of answering "NO" to my own question. In the thread, it has been clearly mentioned that 'chooseDesktopMedia' is the new API designed as an extension API and has to be used for screen sharing as a recommended practice.

    The conclusion till date is that you have to call 'chooseDesktopMedia' from your chrome extension in order to select a media source before starting screen sharing.