问题描述:

How we mask the video in html with available SVG?

I tried with following code but it will not dispalying in chrome?

<video id="video_target" src="oceans-clip.ogg" type="video/ogg" autoplay></video>

<svg>

<mask id="video_mask" maskUnits="userSpaceOnUse">

<text x="300" y="190">VIDEO</text>

</mask>

</svg>

Can anyone please answer how to display a SVG masked video in chrome?

Thanks in advance.

网友答案:

Sorry, but HTML5 video masking is currently supported by webkit browsers only. You could make a workaround with some javascript for instance this chroma-key effect as described here: https://developer.mozilla.org/En/Manipulating_video_using_canvas

But for HTmL5 canvas, you're out of luck!

相关阅读:
Top