I am using Dialogflow and would like to implement a media response in my project. I have tried to do so using the following link: https://developers.google.com/actions/assistant/responses but have been unsuccessful. How to do the implementation?
const functions = require('firebase-functions')
const {dialogflow} = require('actions-on-google')
const TEST = 'test'
const app = dialogflow({
debug: true,
})
app.intent('test', (conv) =>{
conv.ask('we will now play a song for you');
conv.ask(new MediaObject({
name: 'Jazz in Paris',
url: 'https://storage.googleapis.com/automotive-media/Jazz_In_Paris.mp3',
}));
conv.ask(new MediaResponse({
mediaObject: 'Jazz in Paris',
mediaType: AUDIO,
}));
});
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app)