I have an issue with a custom sender/receiver application was written a while back.
We recently merged to the cloud and the sender application which is a simple web page was moved and changed its URL from what it used to be.
http: //sdpc.webpage.com
to what it is now https: //webpage.com/sdpc.
Now it appears my messages are not being sent over to the receiver application.
I have the following code to send the message to the receiver:
var applicationID = 'F7000000';
var namespace = 'urn:x-cast:com.webpage.cast.sdpc';
var session= null;
var driverRequest;
function sendMessage(message) {
if (session != null) {
location.reload();
session.sendMessage(namespace, message, onSuccess.bind(this,
"Message sent: " + message), onError.bind(this, "Error: " + message));
// $('messageDiv').set('html', session.sendMessage(namespace, message, onSuccess.bind(this, "Message sent: " + message), onError));
} else {
chrome.cast.requestSession(function(e) {
session = e;
location.reload();
session.sendMessage(namespace, message, onSuccess.bind(this,
"Message sent: " + message), onError.bind(this, "Error: " + message));
// $('messageDiv').set('html', session.sendMessage(namespace, message, onSuccess.bind(this, "Message sent: " + message), onError));
}, onError);
}
}
this all worked before we moved the folder over to what is now it's new location on the cloud. I made sure to change the receiver URL in the developer google console to point to its new location, but no luck. Could the namespace be the issue? It's the only thing I'm not sure about.
I believe the sender to receiver connection isn't even being established because I have code setup for any errors while displaying the image to the chrome cast and I am not seeing anything.
I've looked on the google forums and GitHub but I can't think of anything else that might be causing this issue.