Possible to embed a youtube video in an svg?

余生长醉 提交于 2019-12-04 12:21:12

问题


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:


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



来源:https://stackoverflow.com/questions/6134184/possible-to-embed-a-youtube-video-in-an-svg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!