'getUserMedia mediaRecorder how to convert event.data from safari

This question is about event.data returned by SAFARI

CONTEXT : something like this tutorial https://webkit.org/blog/11353/mediarecorder-api/

navigator.mediaDevices.getUserMedia( {  audio: true, video: true } ).then( successCallback, errorCallback );

function successCallback(stream) { window.stream = stream; gumVideo.srcObject = stream; }

function handleDataAvailable(event) { console.log(event.data); ...code to send to server... }

function startRecording() {
  try { mediaRecorder = new MediaRecorder(window.stream); } catch (e0) { return false; }
  mediaRecorder.ondataavailable = handleDataAvailable; mediaRecorder.start(3000); 
}

IN SAFARI THE LOG Blob {size: 0, type: "", slice: function, stream: function, text: function, …}Blob

IN CHROME THE LOG data: Blob {size: 11985, type: 'video/x-matroska;codecs=avc1,opus'}

so WHY event.data in safari is EMPTY ?????

Is there a way to convert to string to base64 ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source