Hi.
Video components wrap DOM elements, so you'll need CSS for it.
You can add the styles in the HTML file using a publish template or use the .animate method in JavaScript, for example.
var root = this;
// the two methods below could live in the first frame
root.onDrawEnd = function(e, data)
{
root.fadeVideo(data.id, data.from, data.to, data.duration);
};
root.fadeVideo = function(id, from, to, duration)
{
currentVideo = document.getElementById(id);
currentVideo.animate([{ opacity: from }, { opacity: to }], { duration: duration });
currentVideo.addEventListener("ended", function(e)
{
e.currentTarget.animate([{ opacity: to }, { opacity: from }], { duration: duration, fill: "forwards" });
});
};
// you can call this in each frame
stage.on("drawend", root.onDrawEnd, null, true, { id: "video0", from: 0, to: 1, duration: 1000 });
Regards,
JC
... View more