web/js/for_cast.js
/**
 * send a message to the receiver using the custom namespace
 * receiver CastMessageBus message handler will be invoked
 * @param {string} message A message string
 */
send a message to the receiver using the custom namespace
receiver CastMessageBus message handler will be invoked
@param {string} message A message string
send a message to the receiver using the custom namespace receiver CastMessageBus message handler will be invoked @param { string } message A message string
function sendMessage(message) {
    if (session!=null) {
      session.sendMessage(namespace, message, onSuccess.bind(this, "Message sent: " + message), onError);
    }
    else {
      chrome.cast.requestSession(function(e) {
          session = e;
          if (!!callbackHasSession) callbackHasSession(true);
          session.sendMessage(namespace, message, onSuccess.bind(this, "Message sent: " + message), onError);
        }, onError);
    }
  }
function sendMessage ( message ) { if ( session != null ) { session . sendMessage ( namespace , message , onSuccess . bind ( this , "Message sent: " + message ) , onError ) ; } else { chrome . cast . requestSession ( function ( e ) { session = e ; if ( ! ! callbackHasSession ) callbackHasSession ( true ) ; session . sendMessage ( namespace , message , onSuccess . bind ( this , "Message sent: " + message ) , onError ) ; } , onError ) ; } }
send a message to the receiver using the custom namespace
 receiver CastMessageBus message handler will be invoked
 @param {string} message A message string
send a message to the receiver using the custom namespace receiver CastMessageBus message handler will be invoked @param { string } message A message string