Cordova Android: Is is possible to install Chrome plugins in Crosswalk?

I would like to ship a custom Chrome plugin with my Android app running under Crosswalk. Does anybody know if this is possible?

@waldgeist,

Last we checked this was not possible. Crosswalk uses a stripped down / slightly customized version of Chromium / Webkit. The full fledged Chrome and ChromeBooks have the Chrome developer API built into them.

Good news is, your Chrome plugin (extension or app?) is in JS. If you are using Crosswalk webviews to open third-party sites, you can inject JS.

1 Like

Thanks for this info. Injecting JS into other sites won’t help me, though, I need access to the Chrome settings. I want to enable desktop sharing of Android screen, if this is even possible with Chrome on Android.

WebRTC is built into the Crosswalk (last I checked)

Yes, I am already using it. But I would like to try out if screen sharing is also possible. And this requires to modify a Chrome setting. On desktop browsers, Google recommends to provide an extension for doing this.

Don’t know, sorry. However, sending a stream from a Webview on a mobile device could be demanding GPU and CPU-wise.

What we do is use html2canvas with no images, and we do it every 5s. Not real-time, just enough to see what is happening.

1 Like

The canvas approach sounds interesting. Do you have a repo for this or any further information about how you setup this?

Here is our code

html2canvas(document.body, { onrendered: function(canvas) { img = canvas.toDataURL(format, quality); self.dispatchEvent(new self.Event(self.EVENT_ONSCREENSHOT, img)); } });

[Edit] Repo here: https://github.com/niklasvh/html2canvas

1 Like