nativescript-videoplayer
nativescript-videoplayer copied to clipboard
Event listeners for javascript
Can't for the life of me get the event listeners working for Javascript. Anyone have a working code example they can share? Thanks
same issue in nativescript-vue
As well. NS Core, JS
i think the ticket can be closed now after 2 years ;)
function pageLoaded(args) {
//needed so that view is scrollable, even if keyboard is visible
let page = args.object;
try {
const video = page.getViewById("nativeVideoPlayer");
video.on(Video.currentTimeUpdatedEvent, (ev) => {
if (ev.position >= 4500 && highlightText == 1) {
highlightText = 2;
} else if (ev.position < 4500 && highlightText != 1) {
highlightText = 1;
}
});
} catch (err) {
console.log(err);
}
}