title: Opentok end-user denied permission to hardware devices
body: <p>I'm setting up a prototype for using Opentok Webrtc in Safari IOS11 for the Iphone. It all worked fine, untill today (and I don't remember changing anything). The error I'm receiving is </p>
  
  <blockquote>
    <p>OT.Publisher Access Denied: Permission Denied: End-user denied permission to hardware devices (getUserMedia error: 
    NotAllowedError)</p>
  </blockquote>
  
  <p>You would say this is local, but i've tried it with the phone of a colleague and the same error now occurred. So it should be somewhere in the code or OpenTok library in my opinion. </p>
  
  <p>Any idea? </p>
  
  <pre><code>// Handling all of our errors here by alerting them
  function handleError(error) {
    if (error) {
      alert(error.message);
    }
  }
      // make the agent id dynamic alteron, now hardcoded
      var agentIdAvailable = '007';    
      var SERVER_BASE_URL = 'https://XXX.herokuapp.com';
      fetch(SERVER_BASE_URL + '/room/'+ agentIdAvailable).then(function(res) {
        return res.json()
      }).then(function(res) {
        apiKey = res.apiKey;
        sessionId = res.sessionId;
        token = res.token;
        initializeSession();
      }).catch(handleError);
  
  function initializeSession() {
    var session = OT.initSession(apiKey, sessionId);
  
    // Subscribe to a newly created stream
    session.on('streamCreated', function(event) {
      session.subscribe(event.stream, 'subscriber', {
        insertMode: 'append',
        width: '100%',
        height: '100%'
      }, handleError);
    });
  
    // Create a publisher
    var publisher = OT.initPublisher('publisher', {
      insertMode: 'append',
      width: '100%',
      height: '100%'
    }, handleError);
  
    // Connect to the session
    session.connect(token, function(error) {
      // If the connection is successful, initialize a publisher and publish to the session
      if (error) {
        handleError(error);
      } else {
        session.publish(publisher, handleError);
        console.log('*** publishing', publisher);
      }
    });
  }
  </code></pre>