-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Supported browsers #14
Comments
After further investigation, I did find the fallbacks for the error "no native wasm support detected", and they are in fact working in older browsers. The reason I thought it wasn't working was that there were no subtitles being displayed, and the error was in the console. However, it looks like it is the same issue that I was seeing on Chrome in mobile web for Android, where the CSS display property was just set to display: none, and the positioning related styles were not applied. After resizing the window, it seems that the internal "resize" method is called, and the styling for the canvas is set, and all is well with the rendering. I am not seeing this issue with the demo page in this repo, but only in my project, where there is a lot more code running at the same time, and it is in a Iframe/webview. I suspect that there is a race condition that is not being handled, where the worker is taking longer than expected, and the "resize" function in "setVideo" is being called before it's ready. So ensuring that we call resize once the worker is ready should fix this. As a test, I added a call to resize if the css display property of the canvas was none on the canvas targeted postmessage to confirm the theory, and it seems to "fix" the issue:
However, the effect is that there is a animation of the subtitles to their new coordinates after the resize method is called. So I would imagine that this call needs to be made a bit earlier, before the first subtitle is rendered to canvas, but after the worker is ready with the canvas. |
Both width&height of My guess is that you creating video element, init subtitles and only after you're showing video element (or other JS code showing it after subtitles already inited). You could try init subtitles only after video is elemnt displayed. P.S. As of general browser support, I'm aiming to support all browers that worth supporting (i.e. subtitles are playable with adequate performance and browser supports HTML5 video with H264). |
You were right! I was instantiating both the video player and the subtitles at the same time, and the video element was not ready in time for the initial sizing in the subtitle lib. I tried to delay initializing until the video element emits a 'loadeddata' event to indicate that the content is loaded, and video is sized. However, initializing the subtitles does take some time, so instead I am continuing to init them both at the same time, but will call for a resize on the video 'loadeddata' event instead. This seems to resolve the issue, and doesn't cause any delays or strange animations for the subs in the first frame. That issue aside, while testing in Firefox, I am able to see subs rendering properly in the demo page, but when using the lib in my app, there seems to be an error emitted from the worker when posting 'worker-init' to the worker.
I was not able to successfully track down the exact location of the error by Any thoughts? I really appreciate your help on this! |
Emscripten runs "program" after all dependecies are resolved, so removing Line number looks strange (too large). You could try to wrap worker code in |
Seems that a fresh copy of the lib files from latest master did the trick! So far looking good on all browsers after tweaking my integration a bit! Thanks again for the help! |
Use patched emscripten so Octopus would work in Cordova
Moving the discussion from libjass issue#48
Is there a list of supported browsers for this library? I've already started some testing, but seems there are some tweaks here and there to get some of the things working.
I am looking to support the following:
Desktop
Mobile web iOS
Mobile web Android
Native iOS
Native Android
The 2 major issues i'm seeing are:
The text was updated successfully, but these errors were encountered: