I successfully view local video (mp4) files in my B4J application via the HTML5 <video> tag, within a page loaded into web view controls, using this example code:
However, such page loads frequently fail with the JavaFX webkit error below (albeit if I reload enough times, it will eventually load successfully):
{date/timestamp} com.sun.javafx.webkit.prism.WCMediaPlayerImpl onError
WARNING: onError, errCode=260, msg=ERROR_MEDIA_INVALID
Since this is not from B4J code, a try/catch block obviously doesn't catch the error (so that my application could then reattempt to load the page's video content until successful).
So is there any way to capture this type error in B4J code?
Also, what actually causes this media file load failure - given it's a local file, vs. one coming from a remote web server over http - so that I might be able to eliminate it from occurring instead?
B4X:
<video style='position: fixed; right: 0; bottom: 0; min-width: 100%; min-height: 100%; width: 100%; height: 100%; object-fit: cover; controls muted loop autoplay>
<source src='file:///C:\Users\user1\Documents\testing\test01.mp4' type='video/mp4' />
</video>
However, such page loads frequently fail with the JavaFX webkit error below (albeit if I reload enough times, it will eventually load successfully):
{date/timestamp} com.sun.javafx.webkit.prism.WCMediaPlayerImpl onError
WARNING: onError, errCode=260, msg=ERROR_MEDIA_INVALID
Since this is not from B4J code, a try/catch block obviously doesn't catch the error (so that my application could then reattempt to load the page's video content until successful).
So is there any way to capture this type error in B4J code?
Also, what actually causes this media file load failure - given it's a local file, vs. one coming from a remote web server over http - so that I might be able to eliminate it from occurring instead?