问题
I have a custom sender and receiver app that both work as expected on desktop. However if I try to run my app from chrome on iOS I run into issues.
Based on the info Im gathering from debugging the receiver app, it is getting into my castReceiverManager.onSenderConnected function and I can log out the event.data and useragent (iOS CastSDK,,iPhone,iPhone OS,8.1.2). It never gets into where I listen for onMessage though.
window.messageBus = window.castReceiverManager.getCastMessageBus('urn:x-cast:com.whatever');
window.messageBus.onMessage = function(event) {
console.log('Message [' + event.senderId + ']: ' + event.data);
}
UPDATE: A year later and I still haven't figured this out.
来源:https://stackoverflow.com/questions/27762558/communicate-with-custom-receiver-app-from-chrome-on-ios