Transparent WebM (with alpha channel)
WebM uses the VP8 or VP9 codecs which support yuva420p pixel formats (alpha channel). In layman terms, it supports transparency. Video playback with transparency is widely supported in Gecko and Blink, so also in Electron. I was wondering why it wasn't working in discord. After manually injecting a video tag into discord using developer tools, I discovered that it is indeed possible to have transparent videos in discord. To try this yourself press CTRL+SHIFT+I, use the picker to select a message, right click > edit as html and replace it with this code:
<video loop autoplay height="240" controls src="https://cdn.discordapp.com/attachments/477552978698698803/753335266701344799/output.webm"></video>
I think the reason for it not working natively is because discord sets a black background behind the image by default.
2
Please sign in to leave a comment.
Comments
0 comments