我曾经尝试过将iframe嵌入sencha的html标签内的youtube视频。
....
html:'<iframe>Youtube URL</iframe>'
....
我将以上代码添加到了标签栏的第二个图标中。第二个图标是滚动 View 。即我将其设置为
scroll:'vertical'
我的问题是当我添加youtube视频时,就像这样...
看。仅显示视频的一部分。
当我切换到其他选项卡面板时,视频显示如下。
任何帮助!!!
最佳答案
我已经在面板内使用HTML完成了此操作。当然,它不能嵌入sencha应用程序中。它跳到youTube播放器。
html: '<div style="margin-left:12px; margin-top:20px"><h1>Syndicate Trailer</h1><p><iframe class="youtube-player" type="text/html" src="http://www.youtube.com/embed/ewwtznVkSxA" frameborder="0"></iframe></p><h1>Prometheus Trailer</h1><p><iframe class="youtube-player" type="text/html" src="http://www.youtube.com/embed/sftuxbvGwiU" frameborder="0"></iframe></p></div>'
这会在视频框架中留下不适合我的应用的链接,因此我修改为改为使用此链接:
html: '<div style="margin-left:12px; margin-top:20px"><h1>Eddies Cinema Slot </h1><p><embed id=\"yt\" src=\"http://www.youtube.com/watch?v=5a9-ORWn0fY\" type=\"application/x-shockwave-flash\" width=\"290\" height=\"260\"></embed></p></div>'
关于javascript - 如何使用sencha嵌入youtube视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7058694/