title: How to interact with RAMP in a custom receiver application for Chromecast
body: <p>I've created a custom sender and receiver applications for Chromecast.  The sender should be sending a url (dash mpd) over the wire.  The receiver should create a video element and upon receiving the dash mpd url create some extra files that interact with the video element.</p>
  
  <p>On the sender I'm doing this:</p>
  
  <pre><code>var request = new cast.LaunchRequest(APP_ID, receiver);
  request.parameters = params;
  cast_api.launch(request, onLaunch);
  </code></pre>
  
  <p>Followed by:</p>
  
  <pre><code>var request = new cast.MediaLoadRequest("http://dash.edgesuite.net/envivio/dashpr/clear/Manifest.mpd");
  request.parameters = params;
  cast_api.loadMedia(cv_activity.activityId, request, onLoad);
  </code></pre>
  
  <p>Then in the receiver I have:</p>
  
  <pre><code>var receiver = new cast.receiver.Receiver(APP_ID, [cast.receiver.RemoteMedia.NAMESPACE]);
  var rampHandler = new cast.receiver.RemoteMedia();
  rampHandler.addChannelFactory(receiver.createChannelFactory(cast.receiver.RemoteMedia.NAMESPACE));
  rampHandler.onOpen = onOpen;
  rampHandler.onMessage = onMessage;
  rampHandler.onLoad = onLoad;
  rampHandler.onInfo = onInfo;
  rampHandler.onPlay = onPlay;
  rampHandler.onStop = onStop;
  rampHandler.onEnded = onEnded;
  rampHandler.onMetadataLoaded = onMetadataLoaded;
  rampHandler.onLoadMetaDataError = onLoadMetaDataError;
  rampHandler.onVolume = onVolume;
  </code></pre>
  
  <p>onOpen and onMessage get fired once when I launch the receiver.  Nothing appears to happen after I call api.loadMedia.  From what I've read it appears that the api is accessing the RAMP calls which the RemoteMedia should respond to.  I'm expecting either onLoad or onMessage to get triggered after api.loadMedia is called..  But nothing happens.  There's no traces at all in the Chromecast debugger.</p>