i try to navigate to a mp4 video link in code on a webbrowser. but instead of playing the video, it popup a download link. How do i make it play instead?
A browser does not understand MP4 files the way it does a JPG or the like. You would need to load some HTML code that could play the file. MP4 is also not a format that HTML 4.x understands natively, so your HTML would have to use some media player to actually play the file. Here are some examples:
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
www.w3schools.com
You would need to craft the appropriate HTML code and, assuming that you're using the WebBrowser control, assign it to the (I believe) DocumentText property. That said, I'm not 100% sure that the WebBrowser control supports HTML 5. If it doesn't, you'd have to use a WebView2 instead.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.