Fixing background video not playing on certain small factor devices (android) #3078
+4
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There has been reports in the past of background video not playing properly on some devices. See #1027 or #2179.
I've been facing the same issue recently when trying to play
Reveal.js
presentations on some IoT-type devices (android board, with WebView) and even from my phone (Samsung, Android 11, both Samsung Internet and Brave)Could not easily reproduce the problem because of also using embedded videos (full screen) that where properly working.
Until I spotted a slight difference between the two video injection: the background video didn't have
type
added to thesource
tag generated from thedata-background-video
attribute inReveal.js
The solution in this PR seems to be fixing the problem on all my devices. I cannot explain why it is working (or bugging in the first place), nor whether it will now work on every devices, including older versions of OS or browsers.
Also, worth noting that the solution in this PR is simply generating the MIME type out of the file extension, which is not a very reliable solution. But it will do, unless we want to make the specification of the
data-background-video
attribute more complicated