This chrome extension not only captures content of the selected tab, but also provides multi-user peer-to-peer tab-streaming.
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!!
});
});
Make ZIP of the directory. Then navigate to Chrome WebStore Developer Dashboard and click Add New Item blue button.
To learn more about how to publish a chrome extension in Google App Store:
Make sure that you added and verified your webpage/domain using Google WebMaster tools. Additional instructions available here.
<!DOCTYPE html>
<html>
<head>
<!-- head; this <link> tag MUST be in <head> section -->
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/your-chrome-extension-id">
</head>
<body>
<!-- body; the button element that is used to invoke inline installation -->
<button onclick="" id="install-button" style="padding: 0;background: none;height: 61px;vertical-align: middle;cursor:pointer;">
<img src="https://www.webrtc-experiment.com/images/btn-install-chrome-extension.png" alt="Add to Chrome">
</button>
<script>
document.querySelector('#inline-install').onclick = function() {
!!navigator.webkitGetUserMedia
&& !!window.chrome
&& !!chrome.webstore
&& !!chrome.webstore.install &&
chrome.webstore.install(
'https://chrome.google.com/webstore/detail/your-chrome-extension-id',
successCallback,
failureCallback
);
};
function successCallback() {
location.reload();
}
function failureCallback(error) {
alert(error);
}
</script>
</body>
</html>
For additional information, click this link.
- Personal Webpage: http://www.muazkhan.com
- Email: [email protected]
- Twitter: https://twitter.com/muazkh and https://twitter.com/WebRTCWeb
- Google+: https://plus.google.com/+WebRTC-Experiment
- Facebook: https://www.facebook.com/WebRTC
Chrome-Extensions are released under MIT licence . Copyright (c) Muaz Khan.