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!
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
Thank you so much,i appreciate it!
You're welcome, glad it helped :)