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

Branch/jplayer preload #489

Merged
merged 4 commits into from
Apr 21, 2015
Merged

Conversation

n8xm
Copy link

@n8xm n8xm commented Apr 21, 2015

Separated URL from the "Play" method (this matches the old jPlayer driver), and also added a wrapper for the "load" function (which preloads video).

if( node.url ) {
node.jPlayerElement.jPlayer( "play" );
} else {
this.logger.errorx( "No URL given!" );
Copy link
Contributor

Choose a reason for hiding this comment

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

Should play require a URL? Doesn't it just play the video that was previously set using the load command?

Copy link
Author

Choose a reason for hiding this comment

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

The load command does not set the URL. I'm following the convention that JPlayer uses - you set the URL first (With our driver, it's a set of the url property. With JPlayer, it's in the setMedia command), and the load method tells it to preload what was at the previously-set URL.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahhh, makes sense. 👍

n8xm pushed a commit that referenced this pull request Apr 21, 2015
@n8xm n8xm merged commit 61daccf into branch/mars-game-development Apr 21, 2015
@n8xm n8xm deleted the branch/jplayer-preload branch April 21, 2015 18:10
@n8xm n8xm restored the branch/jplayer-preload branch April 23, 2015 14:17
@kadst43 kadst43 deleted the branch/jplayer-preload branch December 11, 2015 21:49
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.

2 participants