Skip to content

Latest commit

 

History

History
 
 

tabCapture

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Chrome tabCapture extension

This chrome extension not only captures content of the selected tab, but also provides multi-user peer-to-peer tab-streaming.

How to install?

How to capture stream using tabCapture APIs?

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!!
    });
});

How to publish yourself?

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:

How to add inline-install button?

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 more information

For additional information, click this link.

Credits

Muaz Khan:

  1. Personal Webpage: http://www.muazkhan.com
  2. Email: [email protected]
  3. Twitter: https://twitter.com/muazkh and https://twitter.com/WebRTCWeb
  4. Google+: https://plus.google.com/+WebRTC-Experiment
  5. Facebook: https://www.facebook.com/WebRTC

License

Chrome-Extensions are released under MIT licence . Copyright (c) Muaz Khan.