Skip to content

Is it possible to use data-uri for data-background-video? #3362

Answered by t-fritsch
jeertmans asked this question in Q&A
Discussion options

You must be logged in to vote

thank you for the jsfiddle, it is strange that it works well on my side and not in this fiddle, my supposition is that it's because I use markdown plugin and you use plain html slides, it may impact the order in which everything is parsed/displayed 🤷‍♂️

Anyway, I managed to fix the snippet by setting the src attribute on the <video> element instead of the <source> tag. This is also the recommended way to do so (https://stackoverflow.com/a/27934769).
This way it works fine :

https://jsfiddle.net/kzpqxv94/1/

I also updated the code to make it work on first load (it was working on my side but again maybe because I use markdown).

function fixBase64VideoBackground(event) {
    // event.previou…

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@jeertmans
Comment options

@t-fritsch
Comment options

@jeertmans
Comment options

@t-fritsch
Comment options

Answer selected by jeertmans
@jeertmans
Comment options

@t-fritsch
Comment options

@Rapsssito
Comment options

@jeertmans
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants