gpt4 book ai didi

codeigniter - 如何使用CodeIgniter获得YouTube嵌入代码?

转载 作者:行者123 更新时间:2023-12-03 05:30:09 26 4
gpt4 key购买 nike

我需要将youtube视频嵌入正在开发的网站中。管理员应该能够在表单中插入YouTube链接;该网址将存储在数据库中,然后我必须将其嵌入页面中。

我正在尝试使用此库:http://codeigniter.com/wiki/YouTube_API_for_CodeIgniter/revision/12072/

但是使用getVideoEntry函数我得到了这个,我真的不知道该怎么做:

tag:youtube.com,2008:video:zol2MJf6XNE2009-01-14T17:21:57.000Z2011-09-01T11:36:39.000ZSyndication of this video was restricted by its owner.DominoRecordshttp://gdata.youtube.com/feeds/api/users/dominorecordsMusicDominoRecordsA video for 'My Girls' from Animal Collective's new album Merriweather Post Pavilion. Out now on Domino. Produced by: Knowmore Productions Animated by: Jon Vermilyea Edited/VFX by: Chad Von Nauanimal collective, my girls, domino, avey tare, panda bear, geologistDEAnimal Collective - My Girls (2009)widescreen2009-01-14T17:21:57.000Zzol2MJf6XNE

而且,要使用它,我需要youtube视频ID。有没有一种简单的方法来获得它,它涵盖了YouTube网址的所有可能的变体?

最佳答案

CodeIgniter似乎仅嵌入视频就显得过分了。您链接的页面上的YouTube功能主要是YouTube数据API的包装(可用于提取有关YouTube用户, channel ,视频等的信息,并便于按程序上传视频)。 Embedding videos is as easy as dropping some HTML on your page with the correct video ID.

Here's the best answer I've seen for getting the video ID from URLs.

关于codeigniter - 如何使用CodeIgniter获得YouTube嵌入代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7269902/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com