new Easyrtc_No_IframeCapture()
Provides a method for window/screen capture using an iframe.
Please read the comments in the source code about setting the
chrome extension that this requires to be installed in each browser.
Methods
(static) easyrtc.chromeInstaller(extensionId, successCallback, failureCallback)
This method builds a function that can be attached to a button to install an extension.
The install will only work on a Google Verified Website
with a `link` tag pointing to the extension, which is required by chrome for
Inline Installations.
Parameters:
Name | Type | Description |
---|---|---|
extensionId |
String | The id of the `link` tag pointing to your extension. |
successCallback |
function | Function to call on success. |
failureCallback |
function | Function to call on failure. Will pass argument `errorCode` and `errorMessage`. |
Example
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/bemabaogbdfpbkkganibcmhbgjogabfj" id="custom-app-id" />
easyrtc.chromeInstall("custom-app_id", function() {
// success
},
function(errorCode, errorText) {
// failure
});
(static) easyrtc.initDesktopStream(successCallback, errorCallback, streamName, iframeUrl)
Create a local media stream for desktop capture.
This will fail if a desktop capture extension is not installed.
not granting permission.
Parameters:
Name | Type | Description |
---|---|---|
successCallback |
function | will be called with localmedia stream on success. |
errorCallback |
function | is called with an error code and error description. |
streamName |
String | an optional name for the media source so you can use multiple cameras and screen share simultaneously. |
iframeUrl |
String | an optional url for the iframe. The default is to use Muaz Khan's. |
Example
easyrtc.initDesktopStream(
function(mediastream){
easyrtc.setVideoObjectSrc( document.getElementById("mirrorVideo"), mediastream);
},
function(errorCode, errorText){
easyrtc.showError(errorCode, errorText);
});
(static) easyrtc.isDesktopCaptureInstalled()
Check if desktop capture installed
Returns:
boolean