Possible to embed a youtube video in an svg?

2019-03-19 12:41发布

Sozi is an inkscape extension that allows Prezi-like panning/zooming of an svg file when viewed in an svg-enabled web browser. A youtube video can be embedded in a Prezi, and I'd like to be able to embed a youtube video (or any kind of video) in an svg. I know that html links can be made in svg documents (and inkscape supports this directly). Is there a way to embed a video (via an iframe or video tag?) into an svg?

1条回答
小情绪 Triste *
2楼-- · 2019-03-19 12:55
<foreignObject width="560" height="349">
  <iframe xmlns="http://www.w3.org/1999/xhtml"
    width="560" height="349"
    src="http://www.youtube.com/embed/YOUR-MOVIE-ID"
    frameborder="0"></iframe>
</foreignObject>

That should do the trick. Be careful, that the xmlns attribute stays on the iframe element. foreignObject is explained here.

查看更多
登录 后发表回答