Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app.playbackController is not a function. #365

Open
getmohanraj95 opened this issue Aug 19, 2018 · 1 comment
Open

app.playbackController is not a function. #365

getmohanraj95 opened this issue Aug 19, 2018 · 1 comment

Comments

@getmohanraj95
Copy link

getmohanraj95 commented Aug 19, 2018

When i use this

app.playbackController('NextCommandIssued', (request, response) => {
  var stream = {
    "url": "https://next-song-url",
    "token": "some_token",
    "expectedPreviousToken": "some_previous_token",
    "offsetInMilliseconds": 0
  };
  response.audioPlayerPlayStream("REPLACE_ALL", stream);
});

i receive this error =app.playbackController is not a function.

can any one help me out from this.

@fremail
Copy link
Contributor

fremail commented Oct 14, 2018

@getmohanraj95 I suppose you don't construct Alexa.app object before calling app.playbackController.

You have to do something like this:

var Alexa = require('alexa-app');
var app = new Alexa.app('MySkill');

app.playbackController('NextCommandIssued', (request, response) => {
    // ...
});```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants