-1

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.

uzzum07
  • 101
  • 9

1 Answers1

0

not really sure why this got flagged down without letting me know why. However I managed to solve my own question in case anyone ever needs it. As it turns out my web page was internal so by changing the url on the developer's google web page the receiver was not able to be reached from the outside world. However as soon as I transferred the project + url to a public facing web page and it worked. It took a couple of hours before it registered but it worked.

uzzum07
  • 101
  • 9