chromecast 调试器可以工作,但不显示任何内容?

chromecast debugger works, but does not show anything?

我最近安装了一个 chrome-cast 设备并在该设备上启用了调试器模式。将接收者应用程序发送到 google 并从他们那里取回应用程序 ID。

将应用程序 ID 设置到我的发件人应用程序中,一切正常。但问题是我在调试器上看不到任何东西,也无法在线调试我的代码。

http://chrome-cast-ip:9222/ 正在运行并向我展示了调试器 link

https://chrome-devtools-frontend.appspot.com/serve_rev/@185691/inspector.html?ws=.....

所以我的设备或激活调试模式没有问题。

我还在我的接收器应用程序中设置了调试级别

            cast.receiver.logger.setLevelValue(cast.receiver.LoggerLevel.DEBUG);

但是这仍然不起作用,并且没有向我显示任何内容。

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');

        };

您是否单击了 url 框中星号旁边的盾牌图标?这样做并接受来自不安全来源的内容,这应该适合您。