I would like to retrieve the curTime
and remaining
value of the event in my QMediaPlayer component as cleanly as possible.
I have tested several syntaxes, but without success.
Example of my code:
this.$root.$on('timeupdate', (curTime, remaining) => {
console.log('curTime: ', curTime)
console.log('remaining', remaining)
}))
Do you have an idea ? thanks in advance
Try something like this @timeupdate="onTimeUpdate"
:
In a template
// other component options
@timeupdate="onTimeUpdate"
In code:
methods: {
onTimeUpdate(curTime, remaining) {
console.log('curTime: ', curTime)
console.log('remaining', remaining)
}
}