title: Embed h264 stream using HTML5 video tag on iOS
body: <p>I'm trying to get work Ionic 2 application on iOS. Stream comes from Raspberry pi (gStreamer + Janus WebRTC gateway)</p>
  
  <p>Application is a streaming application with the following logic:</p>
  
  <ol>
  <li>Create connection to RPi using Janus WebRTC gateway</li>
  <li>Obtain stream and create video tag with src: <code>URL.createObjectURL(stream)</code></li>
  </ol>
  
  <p>I'm getting WebRTC support by the following plugin: <a href="https://github.com/eface2face/cordova-plugin-iosrtc" rel="nofollow noreferrer">https://github.com/eface2face/cordova-plugin-iosrtc</a></p>
  
  <p>Streaming <strong>works great</strong> in FireFox browser by <code>ionic serve --platform=ios</code> command.</p>
  
  <p>Streaming is <strong>NOT works</strong> inside iOS emulator and on a real device. I just got a green rectangle instead of stream, like on the picture above:</p>
  
  <p><a href="https://i.stack.imgur.com/5UGc4.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5UGc4.jpg" alt="enter image description here"></a></p>
  
  <p>gStreamer command:</p>
  
  <p><code>raspivid --verbose --nopreview --width 640 --height 480 --framerate 15 --bitrate 1000000 --profile main --timeout 0 -o - |  gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! udpsink host=127.0.0.1 port=8004</code></p>
  
  <p>Janus config:</p>
  
  <pre><code>[gst-rpwc]
  type = rtp
  id = 1
  description = RPWC H264 test streaming
  audio = no
  video = yes
  videoport = 8004
  videopt = 96
  videortpmap = H264/90000
  videofmtp = profile-level-id=4D401F\;packetization-mode=1
  </code></pre>
  
  <p>I have googled a similar problem (<a href="https://stackoverflow.com/questions/21120717/h-264-video-wont-play-on-ios">h.264 video won&#39;t play on iOS</a>). </p>
  
  <p>They say iOS safari support Main profile with AVC level 3.1. I'm tried this proposal but it doesn't help me too..</p>
  
  <p>I'm also tried the following "pairs" (profile-level-id + profile) without success:
  <code>
  "42e028 + baseline"
  "640028 + hight"
  </code></p>