pluscast/extension/pluscast.js
// Try to send a message to a Google Cast device
Try to send a message to a Google Cast device
Try to send a message to a Google Cast device
function sendMessage(message, cb) {
    if (session !== null) {
      session.sendMessage(namespace, message, cb.bind(global, true), cb.bind(global, false));
    } else {
      global.chrome.cast.requestSession(function(e) {
        session = e;
        session.addUpdateListener(sessionUpdateListener);
        session.sendMessage(namespace, message, cb.bind(global, true), cb.bind(global, false));
      }, onError);
    }
  }
function sendMessage ( message , cb ) { if ( session !== null ) { session . sendMessage ( namespace , message , cb . bind ( global , true ) , cb . bind ( global , false ) ) ; } else { global . chrome . cast . requestSession ( function ( e ) { session = e ; session . addUpdateListener ( sessionUpdateListener ) ; session . sendMessage ( namespace , message , cb . bind ( global , true ) , cb . bind ( global , false ) ) ; } , onError ) ; } }
Try to send a message to a Google Cast device
Try to send a message to a Google Cast device