title: how receiver app receives the url from sender app in chrome-cast
body: <p>My question is straightforward..</p>
  
  <p>When we select any url for media from sender app, and click on cast icon that video is getting played. As all of us know that chrome-cast supports <code>HTML5 &lt;video&gt; tag</code> which needs any <code>URI</code> to play video. So when we select any <code>URL</code> from  sender app, so <code>&lt;video&gt;</code> is getting it as <code>src</code> attribute in it and plays it.</p>
  
  <pre><code>&lt;html&gt;
    &lt;script src="https://www.gstatic.com/cast/js/receiver/1.0/cast_receiver.js"&gt;
    &lt;/script&gt;
    &lt;script type="text/javascript"&gt;
  
      cast.receiver.logger.setLevelValue(0);
  
      // Initialize and start the media playing receiver
      var receiver = new cast.receiver.Receiver(
          'YOUR_APP_ID_HERE', 
          [cast.receiver.RemoteMedia.NAMESPACE],
          "",
          5);
      var remoteMedia = new cast.receiver.RemoteMedia();
      remoteMedia.addChannelFactory(
          receiver.createChannelFactory(cast.receiver.RemoteMedia.NAMESPACE));
  
      receiver.start();
  
      window.addEventListener('load', function() {
        var elem = document.getElementById('vid');
        remoteMedia.setMediaElement(elem);
  
        var checkStatus = function() {
          var status = document.getElementById('status');
          var st = remoteMedia.getStatus()['state'];
  
          if( st == 0 || remoteMedia.getStatus()['current_time'] == 0 ) {
              status.style.display = 'block';
          }
          else {
              if( st == 1 &amp;&amp; remoteMedia.getStatus()['current_time'] &gt; 0 ) {
                  status.innerHTML = 'Paused...';
                  status.style.display = 'block';
              }
              else {
                  status.innerHTML = remoteMedia.getStatus()['current_time'];
                  status.style.display = 'none';
                  elem.style.display = 'block';
              }
          }
        }
        setInterval(checkStatus, 1000);
      });
    &lt;/script&gt;
    &lt;title&gt;Media Player App&lt;/title&gt;
    &lt;body&gt;
      &lt;video id="vid"
             style="position:absolute;top:0;left:0;height:100%;width:100%"&gt;
      &lt;div id="status" style="display:none; font-size:300%; position:absolute;top:40%;left:40%;"&gt;
        &lt;img src="/images/chrome_loading.gif" width="60%"&gt;
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>So here my question is in <code>receiver.html</code> file, we are not providing any <code>src</code> attribute to <code>&lt;video&gt;</code> So which <a href="https://developers.google.com/cast/reference/receiver/jsdoc/" rel="nofollow">Receiver API</a> is being called to perform this action??</p>