Hello,
I am completely new to JS and Kotlin/JS, so be kind
So, I have a custom JS file and function like this:
function playUrl(url) {
var options = {};
var player = videojs(‘my-video_html5_api’, options, function onPlayerReady() {
player.src({ type: ‘application/x-mpegURL’, src: url});
this.play();
});
}
I would like to call this function in the main .kt class as
js(“playUrl(myURL)”)
this js() doesn’t allow to change string dynamically, so I need help on how to overcome this issue.
If I hardcode myURL it will work, but I need to change it on keyboard actions (up, down. etc.)
I have imported all needed files (JS files) in main html page as
Demo WEB app