如何制作YouTube无边框播放器? [英] How to make a YouTube chromeless player?

查看:104
本文介绍了如何制作YouTube无边框播放器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能听起来很愚蠢,但我在网上看了一段时间,我找不到如何让YouTube播放器无光泽。我正在制作一个网络应用,我正在使用YouTube JavaScript API。无论我在网上看到有关如何真正让玩家无铬的一些信息,它只是给我提供了如何使用无边框播放器进行操作的信息。没有人解决这个问题(这似乎很明显),但我无法弄清楚如何做到这一点。有人可以向我解释如何做(我需要在某处传递某个参数吗?)谢谢。

This may sound stupid but I looked online for some time and I could not find how to make a YouTube player chromeless. I am making a web app and I am using the YouTube JavaScript API. Wherever I look online for some information on how to actually make the player chromeless, it just gives me information on how to operate with a chromeless player. Nobody addresses this question (it seems to be obvious), but I just can't figure out how to do it. Could someone please explain to me how to do it (do I need to pass a certain parameter somewhere?) Thanks.

推荐答案

好吧所以我明白了。所以,如果你像我一样使用JavaScript(我相信它也适用于AS3),简单地说,不是写入URL中的视频ID(你给embedswf()函数的那个​​),写apiplayer。然后,在视频播放器加载后,只需在其上调用cueVideo()函数(传递您想要显示的视频的视频ID)。这将使视频播放器无光泽。

Alright, so I figured it out. So, if you are using JavaScript as I did (I believe it also works for AS3), simply, instead of writig the video ID in the URL (the one that you give to the embedswf() function), write "apiplayer". Then, after the video player has loaded, simply call the function cueVideo() on it (passing it the video ID of the video you want to show). This will make the video player chromeless.

这篇关于如何制作YouTube无边框播放器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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