How can a google chrome extension (like Aviary) capture the screen (webpage)? - google-chrome

I wonder how does chrome extension (like Aviary) capture the screen (webpage). Is is done on server side?

Of course it's not server-side. Each client may have a completely different render on their screen (size of the window, custom font size, etc.)!
Chrome extension API has a dedicated method to capture a page of a specified tab: chrome.tabs.captureVisibleTab. Please read the Chrome Extension doc.

Related

Capture screen on chrome

I saw a cool feature on slack that allows to share screen between users (like teamviewer or skype). But I can't find anywhere documentation how to capture a screen (e.g. on chrome). It seems slack does it without any extension, so it should be integrated into browsers.
Can anyone please provide me a link to documentation or throw me an exampe.
chrome.desktopCapture API offered by Chrome is useful to capture screen content, individual tabs or windows.

chrome.desktopCapture throws an error on "tab" as DesktopCaptureSourceType

I am developing a chrome extension, and my point here is to record a browser tab , like Screencastify chrome extension records the browser tab. I referred desktopCapture , a chrome API which works perfectly for "screen" and "window" as DesktopCaptureSourceType, whereas for "tab" as DesktopCaptureSourceType, it throws an error as
desktopCapture.chooseDesktopMedia: Tab capture is not supported yet.
I have configured the required permissions in manifest.json of my extension. Could anyone suggest me a solution?
P.S : I need to record the chrome browser tab only, am not asking for a screen or window recording
This is a known issue: https://crbug.com/488262
However, you can use the chrome.tabCapture api instead. The downside is that you will have to split your interface between capturing tabs and screens/windows, as chrome.tabCapture doesn't provide an equivalent picker.
Why does Google have two separate screen capture apis? Good question.
The stream object generated by the chrome.tabCapture cant be shared outside the plugin code.
You will have to write the code to share the stream to server within the chrome plugin.

How would I open my Chrome app in split screen rather than a new window?

I'm doing a little research on how to develop a Chrome app for a project I have in mind. I would like to open my app in a split screen inside a person's browser tab, so that they can still see the webpage in the browser while interacting with my app. (In the same way that the console and developer tools work.)
Everything I've seen so far indicates that apps can only open a new window, not "split the screen". Is that correct? I haven't seen it explicitly stated.
If splitting the screen is possible - what's the notation/api?
The other option I'm aware of would be to create a DevTools extension (that operates in the Developer Tools split screen window.) I'm not sure that's preferable for this particular app, though
thanks.
Yes, this is correct. Chrome Apps cannot integrate with the browser UI, that's a design choice by Google.
If you need to interact with a browser tab, it must be an extension.
A DevTools panel is not a bad idea, since it frees you from the burden of injecting your own UI into the page. Otherwise, you'll need to modify the page's DOM (perhaps by injecting an iframe with your extension's page).
There is a proposal for a sidebar API, but it's not implemented (or rejected) as of yet.

What are the steps needed to enable a Chrome extension to do screen sharing?

Google offers the Remote Desktop extension, which allows remote control of a desktop.
However, if all we want is to allow screen sharing from a Chrome extension, what are the APIs we should look at?
The ideal workflow:
Bob starts screen sharing from a Chrome extension.
Alice can see Bob's screen by visiting a specific URL.
Thanks!
Referring to SCREENSHARING A BROWSER TAB IN HTML5, you can easily get this accomplished.
Start by
1) Creating a Browser Action
2) Use Tab's API to capture screen
3) Use Binary WebSocket to transfer information over wire .
References
Browser Action
Tabs API
HTML5 Article.

Chrome Extension: Capture entire page

I am developing a Chrome plugin. I want to Capture the entire page rather than just the visible area. I found that Chrome provides API calls where we can capture only the visible part of the screen using
chrome.tabs.captureVisibleTab
How can I capture the entire page? Is there any native solution or do we need to go for other plugins for extensions? Please help.
Yes, take a look at the (still experimental) savePage API: