可以在svg中嵌入YouTube视频吗? [英] Possible to embed a youtube video in an svg?

查看:525
本文介绍了可以在svg中嵌入YouTube视频吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Sozi是一个inkscape扩展,在启用svg的Web浏览器中查看时,允许类似Prezi的平移/缩放svg文件。 youtube视频可以嵌入Prezi中,我希望能够在svg中嵌入YouTube视频(或任何类型的视频)。我知道可以在svg文档中创建html链接(并且inkscape直接支持这一点)。有没有办法将视频(通过iframe或视频标签?)嵌入到svg中?

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?

推荐答案

<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>

这应该可以解决问题。请注意, xmlns 属性保留在iframe元素上。 foreignObject 此处说明

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

这篇关于可以在svg中嵌入YouTube视频吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆