This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #main { | |
| z-index: 50; | |
| margin: 0; | |
| border: 0; | |
| padding: 0; | |
| position: relative; | |
| overflow: hidden; | |
| width: 1024px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "js": [ | |
| { | |
| "path": "resources/js/pubnub-3.1.min.js" | |
| }, | |
| { | |
| "path": "../sencha-sdk/sencha-touch.js" | |
| }, | |
| { | |
| "path": "app.js", | |
| "update": "delta" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div pub-key="demo" sub-key="demo" id="pubnub"></div> | |
| <script src="http://cdn.pubnub.com/pubnub-3.1.min.js"></script> | |
| <script>(function(){ | |
| // Listen For Events | |
| PUBNUB.subscribe({ | |
| channel : "hello_world", // Channel | |
| error : function() { // Lost Connection (auto reconnects) | |
| alert("Connection Lost. Will auto-reconnect when Online.") | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pubnub.grant({ | |
| channel : 'chat', | |
| auth_key : 'abxyz12-auth-key-987tuv', | |
| read : true, | |
| write : true, | |
| ttl : 1 | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git clone https://github.com/pubnub/c.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // RECEIVE MESSAGES | |
| PUBNUB.subscribe({ | |
| channel : 'my-game-channel', | |
| callback : function(message) { | |
| // A message is received here and it contains | |
| // the information from the original publish. | |
| // With this hook, you update the Player UI. | |
| // The message in this case contains information that | |
| // a new purchase has been placed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "pubnub" | |
| -- | |
| -- GET YOUR PUBNUB KEYS HERE: | |
| -- http://www.pubnub.com/account#api-keys | |
| -- | |
| multiplayer = pubnub.new({ | |
| publish_key = "demo", -- YOUR PUBLISH KEY | |
| subscribe_key = "demo", -- YOUR SUBSCRIBE KEY | |
| secret_key = nil, -- YOUR SECRET KEY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src=”http://cdn.pubnub.com/pubnub.min.js”></script> | |
| <script src=”http://pubnub.github.io/webrtc/webrtc-beta-pubnub.js”></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="http://cdn.pubnub.com/pubnub.min.js"></script> | |
| <script src="components/angular/angular.js"></script> | |
| <script src="scripts/pubnub-angular.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var pubnub = PUBNUB.init({ | |
| subscribe_key: 'sub-c-50d56e1e-2fd9-11e3-a041-02ee2ddab7fe' | |
| }); |