Skip to content

Using MediaRecorder in Ionic #721

Answered by hthetiot
GertBoer asked this question in Q&A
Oct 21, 2021 · 1 comments · 7 replies
Discussion options

You must be logged in to vote

TLDR: use Cordova's Media Capture Plugin.

Unfortunalty iosRTC WebRTC implementation does not support MediaRecorder and passing a MediaStream from iosRTC to MediaRecorder will simply not works.
iOS WebRTC implementation is custom (It's a giant Polyfill basicly) and would require to implement a SHIM for MediaRecorder to works with iosRTC MediaStream.

Alternativly if you want video only, you can implement video capture using "videoElement.render.save" like that:

var canvasEl;
function TestMediaRenderCatpure(videoEl) {
  canvasEl = document.createElement('canvas');
  var ctx = canvasEl.getContext("2d");
  canvasEl.width = "100";
  canvasEl.height = "100";
  canvasEl.style.position = 'absolute';

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@GertBoer
Comment options

@hthetiot
Comment options

@hthetiot
Comment options

@hthetiot
Comment options

@webbpage
Comment options

Answer selected by GertBoer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants