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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: HTML5 video element refuses to play on all devices after update although it works on browser versions of Safari and Chrome #6622
Comments
Hey there, |
Hello, i have to give one small update: Android now works by using a workaround
iOS still does not work with this solution. Although i have preloaded the video, safari keeps trying to load the blob in small parts: |
Next comment: I also got it working in iOS and iPadOS: While createObjectURL() causes Safari trying to load the video in chunks, dataURLs are not causing this weird issue and are working perfectly when using videos. The only downside on this part is the data limitation of around 2Mb. In our application this is not important as the videos reach a maximum of 3sec playtime. Although for me this issue is fixed, i will keep it open as these described things are complete workarounds that will not work in any case. |
This issue may need more information before it can be addressed. In particular, it will need a reliable Code Reproduction that demonstrates the issue. Please see the Contributing Guide for how to create a Code Reproduction. Thanks! |
I am running in similar failure on Capacitor 4! 馃拪 Capacitor Doctor 馃拪
Latest Dependencies:
@capacitor/cli: 5.0.4
@capacitor/core: 5.0.4
@capacitor/android: 5.0.4
@capacitor/ios: 5.0.4
Installed Dependencies:
@capacitor/core: 4.8.0
@capacitor/cli: 4.8.0
@capacitor/ios: 4.8.0
@capacitor/android: 4.8.0
[success] iOS looking great! 馃憣 In my case i download the Videos with The created Object URL's are prefixt with if i remove |
Im managing the same issue on Capacitor 5 in a 10th gen iPad with iOS 16.4.
I cannot reproduce videos from Angular assets, video player fails and it crashes the iPad gallery! After trying to play a video, if i try to open a video in iOS gallery, it wont play either. Its a weird behaviour to be honest. |
Same issue here. Workaround is to use the Filesystem and Uri but thats not a great solution. I could provide a demo project if needed? |
I had also tried that way, but that had not worked either. Would be nice if you could share a few lines of code. |
writeBlob is imported from capacitor-blob-writer I needed to make sure to only write the blob once, otherwise it stops working after a while (only restarting iPhone fixed that) |
This issue may need more information before it can be addressed. In particular, it will need a reliable Code Reproduction that demonstrates the issue. Please see the Contributing Guide for how to create a Code Reproduction. Thanks! |
It looks like this issue didn't get the information it needed, so I'll close it for now. If I made a mistake, sorry! I am just a bot. Have a great day! |
Wow, you have the best bot ever . This Issue is real and needs to be adressed! |
I thought so too |
If there is no response in this week, i will open a new issue with the same problem. The problem is obvious and needs to be adressed. It would be nice if someone could respond to avoid this unnecessary work. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
Bug Report
Capacitor Version
馃拪 Capacitor Doctor 馃拪
Platform(s)
Current Behavior
HTML5 Video-Element from assets folder or blob url refuses to play.
Expected Behavior
HTML5 Video-Element should play normally
Code Reproduction
Here, every possible attribute is used for making the video play automatically and in a loop. This does completely work in the Safari and Chrome browser.
Other Technical Details
This issue is only happening due to using a local url or blob url. In the given example, content does refer to the simple string "/assets/quickstart/example.mp4". The safari dev-tools show that the video is being loaded in different chunks:
In chrome dev-tools simply many errors are sent while trying to load the mp4:
Here, two of the video elements are loaded in chunks, but neither of them does play. When manually activating the controls and pressing the play button, the timeline on the button is very bugged and always extends the duration of the video.
One interesting fact: Videos do play in this way as soon as they refer to a complete existing HTTP-URL from an other server. It looks like it has to do something with the
capacitor://
url.Local addresses are working normally when using images. Only video tags are not loading.
npm --version
output:node --version
output:pod --version
output (iOS issues only):Additional Context
This did happen at first after updating to Capacitor v5 from v4. It seems some mechanics changed here.
At least when using the local urls, it has to do something with the range requests: #1343
Hope someone can help me 馃槗
The text was updated successfully, but these errors were encountered: