Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.     var myApe = {};
  3.     myApe.client = new APE.Client();
  4.  
  5.     myApe.client.load({
  6.       identifier: 'kreuzmichLiveKreuze',    // Identifier of the application
  7.       channel: ['chan1', 'chan2'],  // Channel to join at startup
  8.       complete: function() {      // Function executed once APE is fully loaded
  9.         new APE.LiveKreuze(myApe.client);
  10.       }
  11.     });
  12. </script>
  13.  
  14. ---
  15.  
  16. <script type="text/javascript">
  17.   APE.LiveKreuze = function(ape, options)
  18.   {
  19.     that = this;
  20.  
  21.     // we call this function once APE has finished loading
  22.     this.initialize = function()
  23.     {
  24.       ape.core.addEvent('multiPipeCreate', that.createPipe);
  25.       ape.core.start({'name': "rnd" + Math.round(Math.random()/(1/9999))});
  26.     }
  27.  
  28.     this.createPipe = function(pipe, options)
  29.     {
  30.       console.log("createPipe " + pipe);
  31.       pipe.onRaw('postmsg', function(raw, pipe) {console.log(pipe);});
  32.     }
  33.  
  34.     this.initialize();
  35.   }
  36. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement