1

Can I use the Default Media Receiver to display a web page or an HTML5 app? Using Javascript in the Chrome browser, I have no problem sending a single png image (content type image/png) to the Chromecast but it fails if I specify an html link (content type text/html). session.loadMedia will fire the error handler and e.code/e.description reports session_error/LOAD_FAILED. I used Google's home page for my test:

//var currentMediaURL = "https://www.google.com/images/srpr/logo11w.png";
//var currentMediaType = "image/png";
var currentMediaURL = "https://www.google.com";
var currentMediaType = "text/html";

function startApp()
{
  var mediaInfo = new chrome.cast.media.MediaInfo(currentMediaURL, currentMediaType);
  var request = new chrome.cast.media.LoadRequest(mediaInfo);
  session.loadMedia(request, onMediaDiscovered.bind(this, 'loadMedia'), onMediaError);
};
kbriggs
  • 1,267
  • 1
  • 12
  • 16

1 Answers1

3

I think you need to have custom receiver, just have it run your code accordingly...

Brian
  • 76
  • 2
  • I've asked how to do that exactly in a new question: http://stackoverflow.com/questions/21945115/display-web-sites-and-web-apps-with-chromecast – kbriggs Feb 21 '14 at 21:06