title: Can I use experimental WebKit features in my iOS app?
body: <p>I am developing an iOS app with react-native. I wanted to use MediaRecorder which is still in 'experimental' phase. I turned it on in advanced Safari settings but when I try to use it in my app: </p>
  
  <pre><code>var mediaRecorder = new MediaRecorder(stream)
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>ReferenceError: Can't find variable: MediaRecorder
  </code></pre>
  
  <p>This feature works well in safari, but I can't get it to work in my app. Is there a way to turn it on in Xcode/real-native settings?</p>
  
  <p>EDIT:</p>
  
  <p>Here is the larger section of my code. I use <a href="https://github.com/react-native-webrtc/react-native-webrtc" rel="nofollow noreferrer">react-native-webrtc</a> that provides <code>mediaDevices</code> component. I do capture the stream, the problem I have is with MediaRecorder. I know that MediaRecorder works in safari browser, the question I have is if it can be used in a mobile iOS app and if so, how to enable it.</p>
  
  <pre><code>import {
    RTCPeerConnection,
    RTCIceCandidate,
    RTCSessionDescription,
    RTCView,
    MediaStream,
    MediaStreamTrack,
    mediaDevices,
    registerGlobals
  } from 'react-native-webrtc';
  
  var mediaRecorder;
  const pc_config = {
    "iceServers": [
      {
        urls: 'stun:stun.l.google.com:19302'
      }
    ]
  }
  var pc = new RTCPeerConnection(pc_config)
  
  const success = (stream) =&gt; {
    mediaRecorder = new MediaRecorder(stream) //this line throws the error
    pc.addStream(stream)
  }
  
  const failure = (e) =&gt; {
    console.log('getUserMedia Error: ', e)
  }
  
  const constraints = {
    audio: true,
    video: {
      mandatory: {
        minWidth: 200,
        minHeight: 200*(16/9),
        minFrameRate: 24
      },
      facingMode: "user" 
    }
  }
  
  mediaDevices.getUserMedia(constraints)
    .then(success)
    .catch(failure);
  </code></pre>