当前位置: 动力学知识库 > 问答 > 编程问答 >

html5 - video masking in html

问题描述:

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!

分享给朋友:
您可能感兴趣的文章:
随机阅读: