1
我可以使用默認媒體接收器顯示網頁或HTML5應用程序嗎?在Chrome瀏覽器中使用JavaScript,向Chromecast發送單個png圖像(內容類型圖像/ png)沒有問題,但如果指定html鏈接(content type text/html),則會失敗。 session.loadMedia將觸發錯誤處理程序,並且e.code/e.description報告session_error/LOAD_FAILED。我用谷歌的主頁我的測試:默認媒體接收器限制
//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);
};
我問如何做到這一點正好在新問題:http://stackoverflow.com/questions/21945115/display-web-sites-and-web-apps-with-chromecast – kbriggs