chromecast调试器可以运行,但是什么也没显示? [英] chromecast debugger works, but does not show anything?
问题描述
我最近安装了一个chrome-cast设备,并在该设备上启用了调试器模式.将接收方应用程序发送给Google并从他们那里获取应用程序ID.
I recently installed a chrome-cast device and enabled the debugger mode on that device. Send the receiver aplication to google and got the application id back from them.
将应用程序ID设置到我的发件人应用程序中,一切正常.但是问题是我在调试器上看不到任何东西,也无法在线调试我的代码.
Set the application id into my sender application and everything works great. But the problem is I can not see anything on the debugger and can not debug my code online.
http://chrome-cast-ip:9222/正在运行,并向我显示调试器链接
the http: // chrome-cast-ip:9222/ is working and shows me the debugger link
https://chrome-devtools-frontend.appspot.com/serve_rev/@185691/inspector.html?ws = .....
https: // chrome-devtools-frontend.appspot.com/serve_rev/@185691/inspector.html?ws=.....
因此,我的设备上没有任何问题,也没有激活调试模式.
So there is no issue on my device or activating the debugging mode.
我还已将调试级别设置到我的接收器应用程序中
I also have set the debugging level into my receiver application
cast.receiver.logger.setLevelValue(cast.receiver.LoggerLevel.DEBUG);
但是,这仍然无法正常工作,也没有向我显示任何内容.
however this is still not working and does not show anything to me.
http://i.stack.imgur.com/G2WJD.png
<script type="text/javascript">
window.onload = function() {
cast.receiver.logger.setLevelValue(cast.receiver.LoggerLevel.DEBUG);
//window.location.reload(true);
console.log('Starting Receiver Manager');
debugger;
window.castReceiverManager = cast.receiver.CastReceiverManager.getInstance();
// handler for the 'ready' event
castReceiverManager.onReady = function(event) {
console.log('Received Ready event: ' + JSON.stringify(event.data));
window.castReceiverManager.setApplicationState("Application status is ready...");
};
//debugger;
// handler for 'senderconnected' event
castReceiverManager.onSenderConnected = function(event) {
console.log('Received Sender Connected event: ' + event.data);
console.log(window.castReceiverManager.getSender(event.data).userAgent);
};
// handler for 'senderdisconnected' event
castReceiverManager.onSenderDisconnected = function(event) {
console.log('Received Sender Disconnected event: ' + event.data);
if (window.castReceiverManager.getSenders().length == 0) {
window.close();
}
};
// handler for 'systemvolumechanged' event
castReceiverManager.onSystemVolumeChanged = function(event) {
console.log('Received System Volume Changed event: ' + event.data['level'] + ' ' +
event.data['muted']);
};
// create a CastMessageBus to handle messages for a custom namespace
window.messageBus = window.castReceiverManager.getCastMessageBus('urn:x-cast:com.google.cast.sample.helloworld');
// handler for the CastMessageBus message event
window.messageBus.onMessage = function(event) {
console.log('Message [' + event.senderId + ']: ' + event.data);
// display the message from the sender
displayText(event.data);
// inform all senders on the CastMessageBus of the incoming message event
// sender message listener will be invoked
window.messageBus.send(event.senderId, event.data);
}
// initialize the CastReceiverManager with an application status message
window.castReceiverManager.start({statusText: "Application is starting"});
console.log('Receiver Manager started');
};
推荐答案
您是否单击了网址框中星形旁边的盾牌图标?这样做并接受来自不安全来源的内容,那么它应该对您有用.
Did you click on the shield icon next to the star in the url box? Do that and accept the content from unsafe source and that should make it work for you.
这篇关于chromecast调试器可以运行,但是什么也没显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!