anon
anon

Reputation: 1117

Customizing HTML5 Videos

Can I dynamically change the videos in HTML5 to show custom content, for example the user name shown in the video?

(If not HTML5 what other ways this could be done)

Upvotes: 0

Views: 218

Answers (1)

brianchirls
brianchirls

Reputation: 7853

Yes. I recommend Popcorn.js, which is a Javascript library that will make it easy to synchronize your dynamic content to the video. There are many plugins for Popcorn that will generate different types of dynamic content and effects, and some will even do pretty rich animation. Or, you can write your own plugins.

There's a graphical interface to Popcorn if you want to give it a try without having to write code. https://popcorn.webmaker.org/

You can accomplish quite a lot with HTML and CSS if you just want to overlay content on top of your video. The main advantage of using a canvas is that you can run pixel effects on your dynamic content and/or the video itself. (e.g., Seriously.js).

There is one other strange reason to use a canvas, which is that HTML/CSS content tends to look much cleaner than the video, since the video is compressed and usually scaled, where HTML content is not. If you want to really make the dynamic content look like part of the video, you can generate it in a canvas and scale, blur or otherwise degrade it.

Upvotes: 1

Related Questions