How can I use movie trailer module in TMDB api? The movie trailer module uses data from TMDB but I cannot get access to the youtube videos that are in TMDB from movie trailer module. I tried to use TMDB movie id in movie trailer module to get the video from the youtube. Can anyone help me with this?
找不到电影或剧集?登录并创建它吧。
ticao2 🇧🇷 pt-BR 的回复
于 2020 年 09 月 20 日 1:08下午
Who is this "movie trailer module"? What module is it from?
shresritik 的回复
于 2020 年 09 月 20 日 1:16下午
It is one of the npm packages which is used to get YouTube urls. Here is the link: https://www.npmjs.com/package/movie-trailer
ticao2 🇧🇷 pt-BR 的回复
于 2020 年 09 月 20 日 1:36下午
I think it will be easier for you to get help on Github from the developers.
https://github.com/npm/rfcs
shresritik 的回复
于 2020 年 09 月 20 日 1:43下午
Ok But I just want to get the YouTube movie trailer url from the TMDB movies Is this possible?
Bogdan 的回复
于 2020 年 09 月 20 日 6:50下午
Yes, https://developers.themoviedb.org/3/movies/get-movie-videos, you just need to get a key and merge it with youtube link. Example key from the api: h6hZkvrFIj0. Full url would look like this: https://www.youtube.com/watch?v=h6hZkvrFIj0
ticao2 🇧🇷 pt-BR 的回复
于 2020 年 09 月 20 日 9:15下午
I didn't understand that that was the problem in your first comment.
Yes, I even have a ready answer:
Trailer URL
When you make an API Request requesting Videos, in the response you will receive something like this:
Just add the Key in the respective URL:
For example:
Youtube: https://www.youtube.com/watch?v=eBKvlCf0B4g
Youtube: https://www.youtube.com/watch?v=hzfvYSIIgyc
Vimeo: https://vimeo.com/282875052
Travis Bell - 2020-09-19
Hi @user, we only support YouTube and Vimeo right now.
shresritik 的回复
于 2020 年 09 月 21 日 8:28上午
Thank you very much @ticao2 and @kironet your suggestions worked and I didn't even have to use movie-trailer module.
lucaselbestprogramer 的回复
于 2021 年 10 月 19 日 4:51下午
HI, i have a question, when you have the key and the link of youtube in the code, how do i show the video? using any html tag in specific? i try with video and media and doesnt work...
Travis Bell 的回复
于 2021 年 10 月 29 日 10:55上午
Hi @lucaselbestprogramer, your best bet is to read through YouTube's documentation.
mariaxx9 的回复
于 2021 年 12 月 31 日 9:17上午
if i only want to get the videos with TYPE trailer how can i do that?
ticao2 🇧🇷 pt-BR 的回复
于 2021 年 12 月 31 日 9:50上午
When a Video API Request is made in the response in each item, it is specified what type it is.
I believe that an answer is not possible with only trailers, without the other types.
You, on your side, must filter what interests you.
For example:
https://api.themoviedb.org/3/movie/634649/videos?api_key=THE_KEY
Look: