Javascript plugins for JWPlayer?

0
Has anyone built any JS plugins for JW Player?
As a matter of interest, I just wondered whether anyone has successfully written their own plugs...

This morning, when looking into changing the event/behaviour of the play statistics in MusicCollection, I discovered some pretty awesome docs over at longtailvideo.com that explain the process of writing/implementing JS plugs for the player. The link to the intro about this is at http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/18504/building-javascript-plugins

The level of detail and the quality of the info and examples they give is incredibly encouraging! This leads me to believe that writing a custom plug to say for example, give users a button to purchase the current track on itunes or, prompt the user for feedback or social sharing activity would be straight-forward and intuitive.

Essentially, what I intend to do is;
1 - Create an event handler/listener to detect that the track has started.
2 - Display a Button that say's 'Don't share this' until the track reaches 10% played
3 - When the track reaches the greater of 10% complete or 30 seconds, if the user has not clicked 'Don't share this' then providing the user has an active facebook session and has granted permissions to my fb app, The currentItem variable is passed to a php script to process an action in my app. '[username] listened to [track name] on LearnThruSong'.
4 - Prompt user to like/rate the track with buttons (standard like button) + maybe a jquery ui slider to rate and register the rating in my app also.

As soon as I have something working, I will post what I have. In the meantime, if anyone has any knowledge, advice, dos or don'ts on the subject, they would be most welcome!

Many thanks,

Gez
Responses (12)
  • Accepted Answer

    greengeek
    greengeek
    Offline
    Friday, April 20 2012, 09:46 AM - #Permalink
    0
    I have built only some really basic ones. If you look at the music player at the front of http://www.kevinbluemel.com you will see it shows the album artwork, song name, album, and artist. All that information is pulled dynamically via the javascript api.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, April 20 2012, 09:54 AM - #Permalink
    0
    Thanks greengeek!

    Liking your site! Forgot to mention yesterday!

    The shadow on your artwork, is that css3 shadow?

    Cheers,

    Gez
    The reply is currently minimized Show
  • Accepted Answer

    greengeek
    greengeek
    Offline
    Friday, April 20 2012, 10:00 AM - #Permalink
    0
    Thank you.

    For the drop shadow I took the easy way out and added it directly to the cover art. This is mainly because we are only showcasing a few songs. Once we get a few more songs available to be shared, I will update the player to have a css based drop shadow, probably about the same time I update the code to use external playlists instead of having them hard coded into the flashvars.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, April 20 2012, 10:07 AM - #Permalink
    0
    Cool!

    RE: the playlists you said you were gonna implement, what are your plans? Presuming you mean like a 'featured' kinda thing...? Featured/Recent releases or something?

    Aren't you going to use Music collection's playlists for that? You could even use a featured module - there is one isn't there? If not, there should be!

    Be interested in remixing one of your tracks if you're up for it btw... Just for fun... What sequencer do you use - Cubase?

    Cheers,

    Gez
    The reply is currently minimized Show
  • Accepted Answer

    greengeek
    greengeek
    Offline
    Friday, April 20 2012, 10:21 AM - #Permalink
    0
    MC works great for a lot of things, but there are some limitations. For example I wanted the html5 to fail over seamlessly when flash isn't installed. MC uses html5, but it only works in some situations, mainly in mobile devices. Plus it does not use jw players html5, so the plugins and skins wont work in html5 environments. I also modified it slightly so that it provides a different file for html5 over flash. This allows me to treat what file format is being delivered. This was done mainly so that iphones / ipads would show the cover artwork when playing in quicktime in full screen.


    Kevin Bluemel is a good friend of mine and one crazy awesome piano player! I know he uses yamaha for all his keyboards and piano as he is a big fan of theirs. He uses tons of different software though, couldn't even guess to say which, nor do I know much about the mixing boards and what not. That is way out of my league, lol. I am the technical geek guy, hes the professional musician :)
    The reply is currently minimized Show
  • Accepted Answer

    Friday, April 20 2012, 10:34 AM - #Permalink
    0
    Sorry!

    I presumed you were Kevin!

    Your JS plugins should work in HTML5 too according to the docs. Yes, I know - HTML5 Javascript - surely not! like I said, according to intro to JS api, they should now work...

    Worth investigating.

    I haven't enabled HTML5 fallback within music collection yet however I have read/heard that there have been a few issues. I think that this is something that could again be dealt with within some api calls...

    Anywho, interesting stuff!!!

    Cheers,

    Gez
    The reply is currently minimized Show
  • Accepted Answer

    greengeek
    greengeek
    Offline
    Friday, April 20 2012, 10:40 AM - #Permalink
    0
    The problem I found with the jw player javascript api is that a lot of the features do not work within joomla. They seem to conflict with some of the base libraries that joomla uses. This is probably why germi couldn't get the jw player html5 to work within MC and joomla and had to go the route of writing his own.

    I took a little bit different approach. Since I could not run all the html5 fall back as well as api functions, I chose to do a workaround. I use the joomla wrapper and call my player within the iframe. That way it does not load any of the joomla libraries or code along with it.

    My main goal was to have the player on the front page to be as compatible and playable by as many devices as possible. All my other pages in MC still work great and work on most platforms and I don't mind using germi's html5 player setup there.
    The reply is currently minimized Show
  • Accepted Answer

    greengeek
    greengeek
    Offline
    Friday, April 20 2012, 10:44 AM - #Permalink
    0
    If you try to make all your modifications for the player to run with joomla and run across something that you know should work, but doesn't. I would suggest loading it in chrome and checking out the javascript console under the developer menu. It was awesome at pinpointing exactly which code was not compatible with joomla in the jw player js file. It even has an option to clean up the view so the code is a lot more readable as it has all been minified.

    That is how i discovered the conflict between jwplayer js file and some of the libraries in joomla. Unfortunately the jw player api js file is way beyond my ability to modify it to be compatible.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, April 20 2012, 10:44 AM - #Permalink
    0
    Cool! Yeah, js conflicts can be a headache!

    BTW, I noticed you use JFBConnect on the site...

    Have you read my post on generating the opengraph meta tags dynamically for music collection, auto-grabbing the title, review as description, artwork as picture etc?

    This means you get much better sociability when ppl like, comment on your music collection stuff.

    Further still, if you setup a facebook app & custom actions, you can further spread/track user interactions with your site/music.

    Gez
    The reply is currently minimized Show
  • Accepted Answer

    Friday, April 20 2012, 10:48 AM - #Permalink
    0
    Post to implement dynamic JFBC facebook meta data in music collection - http://www.joomlamusicsolutions.com/en/forum/version-2/solved-how-to-integrate-musiccollection-facebook.html
    The reply is currently minimized Show
  • Accepted Answer

    greengeek
    greengeek
    Offline
    Friday, April 20 2012, 10:56 AM - #Permalink
    0
    Awesome! I'll have to look into it. Thanks
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, April 24 2012, 01:58 AM - #Permalink
    0
    Yipee!

    Nearly there... I have my dock button script written, checking/setting whether or not a user wants to publish the play of the song to facebook app, prints feedback to the user over the player then publishes the opengraph action.

    A few bits of tidying up and done - HOPEFULLY!!!

    Will post it when done.
    The reply is currently minimized Show
Your Reply