*** This example uses Alexa NodeSDK v1 ***
Template for streaming a single Live Stream, for example a Radio Station
-
Edit src/constants.js
- Add Skill ID as 'appID'
// App-ID. TODO: set to your own Skill App ID from the developer portal. appId : '<Skill ID>',
- Define a DynamoDB Table name
// DynamoDB Table name. TODO: define a name for the table to store playback info for users dynamoDBTableName : '<Table Name>',
- Add Skill ID as 'appID'
-
Edit src/audioAssets.js
- Fill out the Station info
// Station Name - Displayed on card in Alexa App 'title' : '<Radio Station Name>', // URL to Live Stream - Should be HTTPS 'url' : '<https://radio.stream.url>', // URL to Station Logo - Should be HTTPS, S3 works great 'image' : '<https://s3.amazonaws.com/radiostation/logo.png>'
- Fill out the Station info
Note: The rest of this readme assumes you have your developer environment ready to go and that you have some familiarity with CLI (Command Line Interface) Tools, AWS, and the ASK Developer Portal. If not, click here for a more detailed walkthrough.
- Node.js (> v4.3)
- Register for an AWS Account
- Register for an Amazon Developer Account
- Install and Setup ASK CLI
-
Clone the repository into a folder named stream-test.
$ git clone https://github.com/JennJin/single-live-stream stream-test
-
Initiatialize the ASK CLI by Navigating into the repository and running npm command:
ask init
. Follow the prompts.$ cd stream-test $ ask init
-
Install npm dependencies by navigating into the
/lambda/custom
directory and running the npm command:npm install
$ cd lambda/custom $ npm install
ASK CLI will create the skill and the lambda function for you. The Lambda function will be created in us-east-1 (Northern Virginia)
by default.
-
Navigate to the project's root directory. you should see a file named 'skill.json' there.
-
Deploy the skill and the lambda function in one step by running the following command:
$ ask deploy
-
To test, you need to login to Alexa Developer Console, and enable the "Test" switch on your skill from the "Test" Tab.
-
Once the "Test" switch is enabled, your skill can be tested on devices associated with the developer account as well. Speak to Alexa from any enabled device, from your browser at echosim.io, or through your Amazon Mobile App and say:
Alexa, open radio test