apr
apr

Reputation: 696

WebRTC video recording using RecordRTC showing error in IE and Safari

I am working on WebRtc and javascript library RecordRtc for video recording. Currently both will works on Chrom and Mozilla. Using another javascript library adaper.js I am able to make work navigator.getUserMedia() in Internet Explorer and Safari. So The below code is detecting the input device eg: inbuilt camere in all browsers.

<video id="video" autoplay="" loop="" controls="" muted=""></video>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://www.webrtc-experiment.com/RecordRTC.js"> </script>
<script type="text/javascript" src="https://cdn.temasys.com.sg/adapterjs/0.13.3/adapter.min.js"></script> 
<script type="text/javascript">
   var recorder;
   var video = document.getElementById('video');
   AdapterJS.webRTCReady(function(isUsingPlugin) {
        navigator.getUserMedia  = navigator.getUserMedia ||
            navigator.webkitGetUserMedia ||
            navigator.mozGetUserMedia ||
            navigator.msGetUserMedia;

    navigator.getUserMedia({ audio: true, video: true }, function(stream) {
        //console.log("hai");
        video.src = URL.createObjectURL(stream);

        video.width = 320;
        video.height = 240;

        var options = {
            type: 'video',
            video: {
                width: 320,
                height: 240
            },
            canvas: {
                width: 320,
                height: 240
            }
        };

        recorder = window.RecordRTC(stream, options);
        //console.log(recorder);
        recorder.startRecording();
    }});
   });
</script>

This is working fine in Chrome and Mozilla and able to get recorded blob. But in IE and Safari It is showing one error after detecting the camera as below

In line

video.src = URL.createObjectURL(stream);

it is showing

"No such interface supported"

Can any one suggest any solution or alternative, a help will be highly appreciated because basically I am stuck.

Upvotes: 2

Views: 3165

Answers (2)

Chip Wilcox
Chip Wilcox

Reputation: 11

You can use the Temasys WebRTC Plugin and Adapter.js to support all four major browsers. We also shim to ORTC and Edge although as explained Edge does not support WebRTC video streams at this time.

Skylink.io, Temasys's PaaS also makes recording and archiving available in private beta and upon request. The GA release will be later in Q2 2016.

Disclosure: I am the COO and CMO of Temasys.

Upvotes: 1

Istvan
Istvan

Reputation: 1665

This is because IE and Safari doesn't have WebRTC implemented yet in their latest stable public release.

Check the WebRTC browser support page for the details.

Upvotes: 1

Related Questions