'How to open video in external application (assuming supported application already installed)

I want to create streaming-website where I upload video and users can stream it. I want to use external application (like MX player or VLC player which user might already have in their device) rather than the browser to play those videos.

Even after spending hours on the internet I couldn't find the solutions.

Currently I am using following JavaScript code...

const video = document.querySelector("video")
const btn = document.querySelector("button")

btn.addEventListener("click", ()=>{
  window.open(video.src)
})

Which plays video within the browser...

What do I do to get desired results?

Thanks is Advance



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source