Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailer integration #679

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Trailer integration #679

wants to merge 2 commits into from

Conversation

empee
Copy link

@empee empee commented Mar 14, 2014

Getting trailers trough trailersapi.com and embedding them trough video.js
Not really 100% accurate but close enough..

setTrailer: function() {
var model = this;
App.findTrailer(model.get('title'), function(data) {
model.set('trailer', data);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a question about asynchronous programming. If findTrailer took forever to get a response back, and you wrote var trailer = model.get('trailer') right after this.setTrailer(); on line 75, would trailer be undefined? How can you avoid that?

@ghost
Copy link

ghost commented Mar 14, 2014

this api could get false-positives
ex: http://trailersapi.com/trailers.json?movie=12%20years%20a%20slave (12 years a slave) get trailer of "How to Train Your Dragon 2"

@isra17
Copy link

isra17 commented Mar 14, 2014

Duplicate: #344

@davidgumberg
Copy link

Hey! Thanks for the contribution! Unfortunately this project is no longer being maintained, but it is being forkd by the very reputable folks at YiFy, so please resubmit your pull request to: https://github.com/Yify/popcorn-app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants