Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

176
Views
Problema de codificación Alexa SDK

Estoy tratando de terminar mi aplicación Alexa para música, pero por alguna razón, la parte de detener y cancelar de mi aplicación no funciona. Este es mi código (parte de él):

(la parada asíncrona es lo que se llama cuando se llama a controller.stop)

 const CancelAndStopIntentHandler = { canHandle(handlerInput) { return ( Alexa.getRequestType(handlerInput.requestEnvelope) === "IntentRequest" && (Alexa.getIntentName(handlerInput.requestEnvelope) === "AMAZON.CancelIntent" || Alexa.getIntentName(handlerInput.requestEnvelope) === "AMAZON.StopIntent" || Alexa.getIntentName(handlerInput.requestEnvelope) === "AMAZON.PauseIntent") ); }, handle(handlerInput) { console.log("CancelAndStopIntentHandler"); handlerInput.responseBuilder.speak("Okay") return controller.stop(handlerInput, "okay"); //Goodbye!"); }, }; ------------------------------------------------------------------------- async stop(handlerInput, message) { var device_id = handlerInput.requestEnvelope.context.System.device.deviceId; var info = await getstuffindb(device_id); console.log(info.length); var deviceMap = JSON.parse(info.devicemap); deviceMap[device_id]["is_playing"]=false; if (deviceMap[device_id]) { deviceMap[device_id]["g_offset"] = handlerInput.requestEnvelope.context.AudioPlayer.offsetInMilliseconds; console.log('Stopped at offset', deviceMap[device_id]["g_offset"]); } await insertintodb(device_id, JSON.stringify(deviceMap), device_id); return handlerInput.responseBuilder .speak(message) .withShouldEndSession(true) .addAudioPlayerStopDirective() .getResponse(); },

Imagen de error: ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!