I make a action that blow:
async function getVideoStream (args, ctx) {
try{
const stream = await navigator.mediaDevices.getUserMedia({
video:true
})
ctx.triggerActionEvent()
const event = new Event({
type:'get-video-stream-success',
stream
})
ctx.triggerActionEvent('success',stream,event)
}catch(error){
ctx.triggerActionEvent('error',error)
}
}
then i use it when click some element.
i am trying to log the success event object to console. bug i can't find the event.