dwnarvaez at gmail.com
Fri Sep 20 17:47:27 EDT 2013
What about using the custom protocol? Something like
activity://.../api/screenshot.png could trigger a get_snapshot and return
the image data.
It's an hack, and I would not suggest to go this way on Android for
example, but if we don't feel like writing a webkit extension, it's
certainly cleaner, easier and faster than going through apisocket.
On 20 September 2013 23:41, Daniel Narvaez <dwnarvaez at gmail.com> wrote:
> Very tricky...
> The gtk3 API allows activities to override the preview and it seems like
> we should keep that feature here. I feel like to do that sanely the js code
> needs to be able to see the screenshot.
> firefox has one for extensions fwiw) would require to write a webkit
> "extension". Those must be written in C unfortunately, epiphany has one I
> think so we could at least take inspiration. An extension might be useful
> to do other stuff in the future, for example the environment stuff could be
> implemented more cleanly that way.
> the apisocket, the shell gets it from the activity trough dbus. Though it
> requires two ipc steps and it doesn't even make much sense conceptually.
> I'm not sure what we should here exactly, just dumping my brain.
> On 20 September 2013 22:28, Suraj K S <suraj.gillespie at gmail.com> wrote:
>> I'm able to capture the screenshot of a web activity by making use of
>> (The image quality seems to be pretty good. In fact, way better than the
>> current preview screenshots in python activities)
>> I make those calls here,
>> The question is, do we need to pass it(base64 encoded image) to the js
>> Or would it suffice to just add it to the datastore object on the shell
>> side (how)?
> Daniel Narvaez
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Sugar-devel