13
Views
3
Comments
Solved
Is it possible Running Movie Trailers via TMDB API?

Is it possible to stream movie trailers directly through the TMDB API? If so, how can I configure the API and my app to facilitate video playback of these trailers? 

Thank you in advance for any help you can provide! 

ALGA.oml
2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Darya,

If you observe the GetVideos API response, you'll notice it contains arrays of objects with various types of video information. To display the trailer video, you need to filter the response by type or name (I filtered by the Name property value).

Also, Instead of using the video widget (which requires a video file URL), you'll need to use the HTML Element widget as iframe passing the embed url as shown below.

For the Iframe src, you will need to tailor the (YouTube) video embed URL by referencing the key property value from the filtered response, for example:

https://www.youtube.com/embed/j7jPnwVGdZ8?autoplay=0&controls=0


Demo app: Movies

Refer to the attached oml.


Kind regards,

Benjith Sam

ALGA_Ben.oml
UserImage.jpg
Darya Kazinets

Thank you so much,i appreciate it!

2021-03-18 21-03-15
Benjith Sam
 
MVP

You're welcome, glad it helped :)


Kind regards,

Benjith Sam

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.