Tab Sharing using tabCapture APIs / Demo
Using the chrome.tabCapture API to interact with tab media streams.
Sharing realtime screenshots of the selected tab over many users using WebRTC peer-to-peer model.
=
You can install chrome tab capturing extension from Google App Store:
https://chrome.google.com/webstore/detail/tab-capturing-sharing/pcnepejfgcmidedoimegcafiabjnodhk
Source code of the chrome extension is available here:
https://github.com/muaz-khan/WebRTC-Experiment/tree/master/Chrome-Extensions/tabCapture
Official resource: tabCaputure documentation: https://developer.chrome.com/extensions/tabCapture
=
chrome.tabs.getSelected(null, function (tab) {
var video_constraints = {
mandatory: {
chromeMediaSource: 'tab'
}
};
var constraints = {
audio: false,
video: true,
videoConstraints: video_constraints
};
chrome.tabCapture.capture(constraints, function (stream) {
// it is a LocalMediaStream object!!
});
});
=
You can share tab, only from chrome.
Browser | Support |
---|---|
Firefox | Stable / Aurora / Nightly |
Google Chrome | Stable / Canary / Beta / Dev |
Opera | Stable / NEXT |
Android | Chrome / Firefox / Opera |
=
TabCapture Extension is released under MIT licence . Copyright (c) Muaz Khan.