title: Firefox screen share MediaStreamTrack to Twilio
body: <p>I use Firefox v55.0.2</p>
  
  <p>In documentation (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getUserMedia" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getUserMedia</a>), after NavigatorUserMedia.getUserMedia() normally in successCallback i have a MediaStream but in my case i have LocalMediaStream.</p>
  
  <p>I need to have MediaStreamTrack to give it at twilio.</p>
  
  <p>This is my code :</p>
  
  <pre><code>$scope.testShareFirefox = function () {
    var p = navigator.mediaDevices.getUserMedia({
      video: {
        mediaSource: 'screen',
        width: 640,
        height: 480
      },
    })
    .then(function(stream) {
      const screenLocalTrack = new twilio.Video.LocalVideoTrack(stream);
      $scope.videoConf.room.localParticipant.addTrack(screenLocalTrack);
  
      var video = document.createElement('video');
      $('#test-share-screen').append(video);
  
      video.srcObject = stream;
      video.play();
    })
    .catch(function (err) {
      console.log(err);
    });
  };
  </code></pre>
  
  <p>Thank you.</p>