src/js/pop.js
branchpopcorn-port
changeset 448 fa9400275846
parent 445 c2eac11a9053
child 458 5bafddd9e3ba
equal deleted inserted replaced
447:52aad2da881b 448:fa9400275846
     4 IriSP.PopcornReplacement = {
     4 IriSP.PopcornReplacement = {
     5   msgPump : {} /* used by jquery to receive and send messages */
     5   msgPump : {} /* used by jquery to receive and send messages */
     6 };
     6 };
     7 
     7 
     8 IriSP.PopcornReplacement.media = { 
     8 IriSP.PopcornReplacement.media = { 
     9   "paused": true
     9   "paused": true,
       
    10   "muted": false
    10 };
    11 };
    11 
    12 
    12 IriSP.PopcornReplacement.listen = function(msg, callback) {
    13 IriSP.PopcornReplacement.listen = function(msg, callback) {
    13 //  IriSP.jQuery(IriSP.PopcornReplacement.msgPump).bind(msg, function(event, rest) { callback(rest); });
    14 //  IriSP.jQuery(IriSP.PopcornReplacement.msgPump).bind(msg, function(event, rest) { callback(rest); });
    14   if (!IriSP.PopcornReplacement.msgPump.hasOwnProperty(msg))
    15   if (!IriSP.PopcornReplacement.msgPump.hasOwnProperty(msg))
    87   if (typeof(val) !== "undefined") {
    88   if (typeof(val) !== "undefined") {
    88 
    89 
    89     if (jwplayer(IriSP.PopcornReplacement._container).getMute() !== val) {
    90     if (jwplayer(IriSP.PopcornReplacement._container).getMute() !== val) {
    90       if (val) {
    91       if (val) {
    91         jwplayer(IriSP.PopcornReplacement._container).setMute(true);
    92         jwplayer(IriSP.PopcornReplacement._container).setMute(true);
       
    93         IriSP.PopcornReplacement.media.muted = true;
    92       } else {
    94       } else {
    93         jwplayer( IriSP.PopcornReplacement._container ).setMute(false);
    95         jwplayer( IriSP.PopcornReplacement._container ).setMute(false);
       
    96         IriSP.PopcornReplacement.media.muted = false;
    94       }
    97       }
    95 
    98 
    96       IriSP.PopcornReplacement.trigger( "volumechange" );
    99       IriSP.PopcornReplacement.trigger( "volumechange" );
    97     }
   100     }
    98     
   101