The Movie Database 支持

Hi how to display trailer from particular movie say for eg: from upcoming movies if selected one movie, where I need to display video trailer. How to get that link.

Thanks.

67 回复(第 1 页,共 5 页)

Jump to last post

下一页末页

Hi Ramkumar,

I assume your'e referring to doing this on the API? If so, once you have an id, lets say Interstellar (id 157336), you can call the /videos method.

http://api.themoviedb.org/3/movie/157336/videos?api_key=###

You can of course use append_to_response to get the movie details and videos in a single query too:

http://api.themoviedb.org/3/movie/157336?api_key=###&append_to_response=videos

Cheers.

How do I create the video url from key, name, site, size and type information form the json file?

Since we link to YouTube, it's as simple as taking the key value and appending it to a youtube.com address like so:

http://api.themoviedb.org/3/movie/550/videos?api_key=###

Has the YouTube key of SUXWAEX2jlg, so:

https://www.youtube.com/watch?v=SUXWAEX2jlg

Cheers.

Hi, in my apllication I have to search films by name. Is it possible to append video informations using "/search/movie" (I get always video=false). Thanks in advance!

The video field returned in results has nothing to do with YouTube videos. It's simply the designation as to whether or not the item is what we call a video here on TMDb. For more about videos, check this link: https://www.themoviedb.org/documentation/editing/videos

So, how can I get YouTube videos (trailers) with "/search/movie"? If this can't be done I have to get the id with the first api call and than get video informations with a second api call

You can't from any of the list methods at this time. You would have to call the id via a second API call.

Ok, thanks for the very fast replies

What may be the second api call? Can you please provide details steps for implementing the video trailer (I am creating this app using java) Also, I am doing a similar "search" api call, like informatica.

Hi @a.salem2 I created an API doc page that kind of goes through the basic process of what you're asking. You can read it here.

how can I display the image for any trailer embedded in the movie?

@NayirMichel Which image are you wanting to display?

@travisbell I think he means the thumbnail to display, with e.g. a play icon on it, showing that it's a video that will be played on tapping that play icon.

@travisbell said:

Since we link to YouTube, it's as simple as taking the key value and appending it to a youtube.com address like so:

http://api.themoviedb.org/3/movie/550/videos?api_key=###

Has the YouTube key of SUXWAEX2jlg, so:

https://www.youtube.com/watch?v=SUXWAEX2jlg

Cheers.

??

@Flixmag Do you have a question?

找不到电影或剧集?登录并创建它吧。

全站通用

s 聚焦到搜索栏
p 打开个人资料菜单
esc 关闭打开的窗口
? 打开键盘快捷键窗口

在媒体页面

b 返回(或返回上级)
e 进入编辑页面

在电视季页面

(右箭头)下一季
(左箭头)前一季

在电视集页面

(右箭头)下一集
(左箭头)前一集

在所有图像页面

a 打开添加图片窗口

在所有编辑页面

t 打开翻译选择器
ctrl+ s 提交

在讨论页面

n 创建新讨论
w 切换关注状态
p 设为公开 / 私密讨论
c 关闭 / 开放讨论
a 打开活动页
r 回复讨论
l 跳转至最新回复
ctrl+ enter 发送信息
(右箭头)下一页
(左箭头)前一页

设置

想给这个条目评分或将其添加到片单中?

登录

还不是会员?

注册加入社区