Using MediaRecorder for storing captured video

I am building an app in Ionic which makes use of the WebRTC APIs. To use these API’s I used the the IOSRTC plugin.

I try to record and store videos. With the MediaDevices.getUserMedia() method I successfully can stream video to a video element.

The next step is to save and store the video stream with the MediaRecorder method.

this.mediaRecorder = new MediaRecorder(this.stream, options);

It seems that this method is available and can be used in my Ionic app (iPhone / IOS15). However when the MediaRecorder is recording and the ondataavailable is triggered, the media data is always 0.

this.mediaRecorder.ondataavailable = (event) => {
    console.log(event.data.size) // <-- this is always 0
    if (event.data && event.data.size > 0) {
       chunks.push(event.data);
    }
};

In the Safari browser on my laptop the event.data.size is not 0. But on my builded Ionic app it is. Does the MediaRecorder method has no access to write or store data?

Do any of you know what the problem could be?