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?
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by ticao2 ๐ง๐ท pt-BR
on September 20, 2020 at 1:08 PM
Who is this "movie trailer module"? What module is it from?
Reply by shresritik
on September 20, 2020 at 1:16 PM
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
Reply by ticao2 ๐ง๐ท pt-BR
on September 20, 2020 at 1:36 PM
I think it will be easier for you to get help on Github from the developers.
https://github.com/npm/rfcs
Reply by shresritik
on September 20, 2020 at 1:43 PM
Ok But I just want to get the YouTube movie trailer url from the TMDB movies Is this possible?
Reply by Bogdan
on September 20, 2020 at 6:50 PM
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
Reply by ticao2 ๐ง๐ท pt-BR
on September 20, 2020 at 9:15 PM
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.
Reply by shresritik
on September 21, 2020 at 8:28 AM
Thank you very much @ticao2 and @kironet your suggestions worked and I didn't even have to use movie-trailer module.
Reply by lucaselbestprogramer
on October 19, 2021 at 4:51 PM
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...
Reply by Travis Bell
on October 29, 2021 at 10:55 AM
Hi @lucaselbestprogramer, your best bet is to read through YouTube's documentation.
Reply by mariaxx9
on December 31, 2021 at 9:17 AM
if i only want to get the videos with TYPE trailer how can i do that?
Reply by ticao2 ๐ง๐ท pt-BR
on December 31, 2021 at 9:50 AM
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: