Skip to content

Instantly share code, notes, and snippets.

@libbymiller libbymiller/test1
Created Feb 23, 2016

Embed
What would you like to do?
var radiodan = require('radiodan-client').create;
radiodan.player.discover().then(function(players) {
console.log(players); // [ playerObjects ]
});
@libbymiller

This comment has been minimized.

Copy link
Owner Author

commented Feb 23, 2016

Used in place of main.js in https://github.com/radiodan/radiodan-skeleton the result is:

npm start

radiodan-skeleton@0.0.0 start /Users/libbym/bbc/mediascape/zzzzz/radiodan-skeleton
nf start

[OKAY] Loaded ENV .env File as KEY=VALUE Format
[OKAY] Trimming display Output to 113 Columns
10:03:53 app.1 | /Users/libbym/bbc/mediascape/zzzzz/radiodan-skeleton/foo.js:3
10:03:53 app.1 | radiodan.player.discover().then(function(players) {
10:03:53 app.1 | ^
10:03:53 app.1 | TypeError: Cannot call method 'discover' of undefined
10:03:53 app.1 | at Object. (/Users/libbym/bbc/mediascape/zzzzz/radiodan-skeleton/foo.js:3:17)
10:03:53 app.1 | at Module._compile (module.js:456:26)
10:03:53 app.1 | at Object.Module._extensions..js (module.js:474:10)
10:03:53 app.1 | at Module.load (module.js:356:32)
10:03:53 app.1 | at Function.Module._load (module.js:312:12)
10:03:53 app.1 | at Function.Module.runMain (module.js:497:10)
10:03:53 app.1 | at startup (node.js:119:16)
10:03:53 app.1 | at node.js:929:3
[DONE] Killing all processes with signal null
10:03:53 app.1 Exited Abnormally
10:03:53 broker.1 Exited Abnormally
10:03:53 audio.1 Exited Abnormally

@pixelblend

This comment has been minimized.

Copy link

commented Feb 23, 2016

needs to be create() not create

@libbymiller

This comment has been minimized.

Copy link
Owner Author

commented Feb 23, 2016

should be create(); (thanks dtn)

then I get:

npm start

radiodan-skeleton@0.0.0 start /Users/libbym/bbc/mediascape/zzzzz/radiodan-skeleton
nf start

[OKAY] Loaded ENV .env File as KEY=VALUE Format
[OKAY] Trimming display Output to 113 Columns
10:11:48 audio.1 | > radiodan-skeleton@0.0.0 audio /Users/libbym/bbc/mediascape/zzzzz/radiodan-skeleton
10:11:48 audio.1 | > radiodan-server ../../config/radiodan-config.json
10:11:48 broker.1 | > radiodan-skeleton@0.0.0 broker /Users/libbym/bbc/mediascape/zzzzz/radiodan-skeleton
10:11:48 broker.1 | > radiodan-broker
10:11:48 broker.1 | Broker started 2016-02-23 10:11:48.737980459 +0000 GMT
10:11:48 broker.1 | Log Level: info
10:11:48 broker.1 | time="2016-02-23T10:11:48Z" level=info msg="Broker services on tcp://0.0.0.0:7171"
10:11:48 broker.1 | time="2016-02-23T10:11:48Z" level=info msg="Broker publishes on tcp://0.0.0.0:7172"
10:11:48 broker.1 | time="2016-02-23T10:11:48Z" level=info msg="Broker subscribes on tcp://0.0.0.0:7173"
10:11:48 app.1 | []
10:11:48 audio.1 | 2016-02-23T10:11:48.951Z - info: [server] Set logging to info
10:11:48 broker.1 | time="2016-02-23T10:11:48Z" level=info msg="Adding worker "audio-d9e68600-da15-11e5-9f3c-b7b2ef41b63e" to audio…
10:11:49 audio.1 | 2016-02-23T10:11:49.035Z - info: [client] ready on port 49154
10:11:49 audio.1 | 2016-02-23T10:11:49.037Z - info: [radio-controller] Registered Worker: player.main
10:11:49 broker.1 | time="2016-02-23T10:11:49Z" level=info msg="Adding worker "radiodan-player-main-d9f245d0-da15-11e5-9f3c-b7b2ef41…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.