Recorderjs icon indicating copy to clipboard operation
Recorderjs copied to clipboard

Safari compatability??

Open ghost opened this issue 9 years ago • 8 comments

Hello All,

I am facing an problem in using it in safari browser. I think it has some safari compatibility issues with AudioContext and navigator.getUserMedia. Please provide me any solution or alternative to make it run in safari.

ghost avatar Aug 28 '15 08:08 ghost

Safari doesn't support the getUserMedia API which allows library to work. http://caniuse.com/#search=getusermedia

There is nothing much that can be done other than using a native plugin to provide that functionality.

notthetup avatar Aug 28 '15 09:08 notthetup

Can you suggest me a alternative for it. I really need it.

On Fri, Aug 28, 2015 at 3:00 PM, Chinmay Pendharkar < [email protected]> wrote:

Safari doesn't support the getUserMedia API which allows this to work. http://caniuse.com/#search=getusermedia There is

— Reply to this email directly or view it on GitHub https://github.com/mattdiamond/Recorderjs/issues/131#issuecomment-135712762 .

ghost avatar Aug 28 '15 09:08 ghost

@hitesh5 Have you found any alternative for Safari yet?

rahul-desai3 avatar Nov 11 '15 19:11 rahul-desai3

If you don't mind having to use a plugin (only works on OSX not iOS), you can consider http://skylink.io/plugin/

notthetup avatar Nov 12 '15 00:11 notthetup

Not yet Rahul. Currently we are deprecated safari in our app for audio recording.

On Thu, Nov 12, 2015 at 1:19 AM, Rahul Desai [email protected] wrote:

@hitesh5 https://github.com/hitesh5 Have you found any alternative for Safari yet?

— Reply to this email directly or view it on GitHub https://github.com/mattdiamond/Recorderjs/issues/131#issuecomment-155891645 .

ghost avatar Nov 12 '15 05:11 ghost

Check out this piece of code for webRTC on Safari

<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
    margin: 0;
}
.video {
    max-width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}
button {
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate3d(-50%, -50%, 0);
    z-index: 101;
}
.pre {
    background: rgba(255,255,255,.8);
    /*display: none;*/
    height: 300px;
    overflow: auto;
    position: relative;
    z-index: 100;
}
</style>

<div class="pre"></div>
<canvas class="video"></canvas>
<video autoplay muted playsinline style="width: 1px; height: 1px"></video>
<button onclick="start()">START</button>

<script>
const video = document.querySelector('video');
const pre = document.querySelector('.pre');
const canvas = document.querySelector('.video');
const ctx = canvas.getContext('2d');

function handleUserMedia(stream) {
    var videoTracks = stream.getVideoTracks();

    video.addEventListener('loadeddata', function () {
        canvas.width = video.videoWidth;
        canvas.height = video.videoHeight;
    });

    video.srcObject = stream;
}

function start () {
    document.querySelector('button').style.display = 'none';

    // Capture camera
    navigator.mediaDevices.getUserMedia({
        audio: false,
        video: { facingMode: { exact: 'environment' } }
    }).then(handleUserMedia, error => {
        console.log(error);
    });

    function paint() {
        requestAnimationFrame(paint);
        ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
    }
    paint();
}
</script>

It should be possible to save pixel data inside RAF

tomasdev avatar Jun 09 '18 20:06 tomasdev

It just worked for me on Safari on an iPhone. I had to make sure the website was running 'trusted', i.e. under https://

kevinjfq avatar Mar 11 '19 06:03 kevinjfq

I guess its coming.

According to https://caniuse.com/#search=Record you can enable it via settings.

On Mon, Mar 11, 2019, 2:17 AM kevinjfq [email protected] wrote:

It just worked for me on Safari on an iPhone. I had to make sure the website was running 'trusted', i.e. under https://

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mattdiamond/Recorderjs/issues/131#issuecomment-471417244, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWOAU-ja8AFog4B4_Muy4aO1KuDEvW8ks5vVfT7gaJpZM4Fz5vO .

tomasdev avatar Mar 11 '19 13:03 tomasdev