webrtc-everywhere is an open source project (with business-friendly license) to add support for WebRTC features to Safari (Windows and MAC OSX) and Internet Explorer (Windows).
The following samples use our adapter.js and could be tested on Safari and Internet Explorer (off course they also work on Firefox and Chrome):
document.getElementById("eltId").src = mediaStream;
to:
attachMediaStream(document.getElementById("eltId"), mediaStream);
Support for screenshare was added in version 2.0. To choose your screen as video media source (instead of the camera) you need to use "X978DoubangoTelecomScreenCapturer785" as sourceId.
Sample code to select your screen as media source:
navigator.getUserMedia({ "video": {optional: [{sourceId: "X978DoubangoTelecomScreenCapturer785"}]}}, okfn, errfn);
fetch webrtc code as explained at http://www.webrtc.org/native-code/development in the same folder as webrtc-everywhere.
Move into webrtc-checkout/src directory
cd webrtc-checkout/src
For Windows you'll need to apply this patch
For all platforms you should apply this patch
OSX x86_64
python webrtc/build/gyp_webrtc -Dtarget_arch=x64 -DOS=mac -Dclang_xcode=1
ninja -C out/Debug
ninja -C out/Release
mv out/Debug out/Debug_x64
mv out/Release out/Release_x64
OSX i386
python webrtc/build/gyp_webrtc -Dtarget_arch=ia32 -DOS=mac -Dclang_xcode=1
ninja -C out/Debug
ninja -C out/Release
mv out/Debug out/Debug_i386
mv out/Release out/Release_i386
WIN64
python webrtc/build/gyp_webrtc -Dtarget_arch=x64 -DOS=win
ninja -C out/Debug_x64
ninja -C out/Release_x64
WIN32
python webrtc/build/gyp_webrtc -Dtarget_arch=ia32 -DOS=win
ninja -C out/Debug
ninja -C out/Release
To build the source code you'll need Visual Studio 2013+ (Windows) or Xcode (MAC OSX):
The best way to get help is via our dev-group.
2.0.0
1.3.1
1.2.2
1.2.1
1.2.0
1.1.0
var image = new Image();
image.onload = function () {
document.getElementById("mycanvas").getContext("2d").drawImage(image, 0, 0, width, height);
};
image.src = "data:image/png;base64," + base64;
1.0.1