2

I am trying to build screensharing over the browser. I am trying to find the best native implementation and did some initial online research

  1. MediaDevices.getUserMedia() - available in FF. In chrome its a little weird
  2. WebRTC Tab Content Capture - I see its in proposal stage
  3. Screensharing a browser tab in HTML5 - A blog explaining other methods

Researching above everything seems to be around 2012 time frame and I want to know what is the latest?

Question: Which current technologies/javascript API can i use and what is its support across browsers

footy
  • 5,803
  • 13
  • 48
  • 96

2 Answers2

1

Screensharing is alive and kicking in Firefox, but atm requires the user modifying about:config. See my answer to another question for how. I believe they're working on removing that obstacle.

Chrome is similar but not quite the same, and AFAIK requires the user to install an extension.

I don't believe other browsers support this natively yet.

Community
  • 1
  • 1
jib
  • 40,579
  • 17
  • 100
  • 158
  • 1
    and you can have an extension to modify about:config for you! See [here](https://github.com/otalk/getScreenMedia/tree/master/firefox-extension-sample) – Philipp Hancke Jul 29 '16 at 18:44
0

You can save html document onto <canvas> or <foreignObject> of <svg> element, then send data URL, ArrayBuffer or Blob of <canvas> or <svg>; or alternatively, send html document as encoded string.

guest271314
  • 1
  • 15
  • 104
  • 177
  • how will this help? – footy Jul 30 '16 at 21:50
  • @footy _"how will this help?"_ Not certain what you mean? _"Question: Which current technologies/javascript API can i use and what is its support across browsers"_ `canvas.toDataURL()` and, or sending `` as `Blob`, `data URL` or `ArrayBuffer` using `FileReader` should be currently supported in most modern browsers – guest271314 Jul 30 '16 at 22:02
  • @footy For example, you can use [`canvas2html.js`](https://raw.githubusercontent.com/niklasvh/html2canvas/master/dist/html2canvas.js) to draw the current `document` onto `` element, send `Blob`, `ArrayBuffer` or `data URI` of `canvas` using `webRTC` – guest271314 Jul 30 '16 at 22:11
  • Got it! Thanks. Will give it a shot – footy Jul 30 '16 at 23:01