K
K
Ksenia Timoshenko2021-08-26 00:11:30
HTML
Ksenia Timoshenko, 2021-08-26 00:11:30

How to embed a video with transparency (webm with alpha channel) on a website?

Hello.
Tell me how you can insert a video with transparency (webm with alpha channel) on the site.
Now it only turns out that there is no transparency, the black background is only shown

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SagePtr, 2021-08-26
@SagePtr

Through the video tag, as usual. Everything works fine for me, maybe your video file does not contain an alpha channel?

S
Sergey Sokolov, 2021-08-26
@sergiks

use VP9 codecs for Chrome and HEVC for Apple/Safari:

<video width="600" height="100%" autoplay loop muted playsinline>
    <source src="movie-hevc.mov" type='video/mp4; codecs="hvc1"'>
    <source src="movie-webm.webm" type="video/webm">
</video>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question