5

Is it possible to get url and stream and play movies trailor on my android application? i find some useful meterials that help me to play from youtube but due to some reason youtube is banned in my country. does imdb provides any API to doing this?

  • 1
    possible duplicate http://stackoverflow.com/questions/1966503/does-imdb-provide-an-api – Karan_Rana Mar 16 '13 at 07:38
  • this for only getting data from imdb. but i want to stream new movies trailor in my android app –  Mar 16 '13 at 07:44
  • you can also go through this link http://deanclatworthy.com/imdb/ after you get data from imdb api you need to parse it and extract the required tags from it and get the trailer url and stream it in andorid media player – Karan_Rana Mar 16 '13 at 07:48

1 Answers1

3

I don't believe there is an API that will allow you to retrieve trailer URLs directly; However you could use http://imdbapi.org/ to search for your movie and get the imdb_id field.

Once you have the imdb_id, you can have a webview in your app that loads the page http://m.imdb.com/title/imdb_id/videogallery which plays a trailer for the movie.

Carlo B.
  • 1,183
  • 1
  • 11
  • 23
  • If you use the second link you provided, you are redirected to the video gallery, which may contain multiple videos related to the movie. Do you know how to specifically play the trailer given the IMDb ID? – syfantid Oct 23 '16 at 09:42
  • Despite the name of the URL it actually only shows one video which is usually the movie/TV show trailer. For example Mr. Robot has 10 videos on their IMDB page but only the trailer plays here: http://m.imdb.com/title/tt4158110/videogallery – Carlo B. Oct 27 '16 at 18:52
  • Thanks! You're right! However, how would you emded (pop-up window possibly) the video in your page, since IMDb prevents hotlinking? For instance iframe hasn't worked for me. http://stackoverflow.com/questions/41204139/how-can-you-embed-an-imdb-video-gallery-to-your-website-as-a-pop-up-video – syfantid Dec 19 '16 at 20:02
  • You could add a hyperlink and set the target to popup, like this: `Watch trailer` – Carlo B. Dec 19 '16 at 20:08
  • It redirects to IMDb, but apart from this, isn't there a way to have something line a "preview" on the site, like a small frame, which the user can click to open the pop-up? – syfantid Dec 19 '16 at 20:16