title: webrtc with firebase :how to fix black screen on ios/safari
body: <p>I work on video calling in my web app. I tried [<a href="https://github.com/webrtc/FirebaseRTC/tree/solution][1]" rel="nofollow noreferrer">https://github.com/webrtc/FirebaseRTC/tree/solution][1]</a>
  example which on <a href="https://webrtc.org/getting-started/firebase-rtc-codelab" rel="nofollow noreferrer">https://webrtc.org/getting-started/firebase-rtc-codelab</a> here.</p>
  
  <p>It works in these browsers:</p>
  
  <ul>
  <li>desktop/chrome----->desktop/chrome    </li>
  <li>desktop/chrome----->desktop/firefox   </li>
  <li>desktop/firefox----->desktop/firefox</li>
  </ul>
  
  <p>but not Safari I can see just a black screen. It doesn't work.</p>
  
  <ul>
  <li>desktop/chrome---->ios/safari</li>
  <li>ios/safari---->ios/safari</li>
  </ul>
  
  <p>actually I see black screen but I think safari get mediastream but cant show.</p>
  
  <p>I have this code in codelab:</p>
  
  <pre><code> peerConnection.addEventListener('track', event =&gt; {//other pc track
        console.log('Got remote track:', event.streams[0]);
         event.streams[0].getTracks().forEach(track =&gt; {
          console.log('Add a track to the remoteStream:', track);
          remoteStream.addTrack(track);
        });
      });
  </code></pre>
  
  <p>How can I fix this problem?</p>