Friday 14 October 2011

Charging ahead

After a few missteps and misunderstandings it looks like I now have a handle on what to do for slideshow.js, hopefully I'll have enough time to get something ready for 0.2.  It appears that my initial understanding of how slideshow will operate was totally off;  as it stands I will only need to work on one file called popcorn.slideshow.js that will be responsible for playing the slides created by the user using slideshare; with the slideshow itself being provided to my application via a link from the slideshare site.   All the events such as the time interval to pass between each slide or if the slideshow is manual or auto will be set when the slideshow is created in slideshare. Slideshow is only responsible for playing the slide and attaching popcorn events with Baseplayer.js handling the video events (play, pause, mute, etc..) that  the user may wish to include with their slideshow.


I've looked at the different players and plugins for ideas on how to implement this and off the players currently in popcorn, it looks like the Vimeo and Youtube players are the closest to what I'm doing for slideshow.js.    Both are embedding videos from an external sources and adding in additional functionality via the plugins.  Of course mine will be embedding a slideshow with some video elements (which makes looking at how these players run a pretty good idea).  The Vimeo player itself has an anonymous constructor that accepts up to three parameters that relate to how the vimeo video will be played as well as the link to the video iteslf

(ie: from an html page creating an instance of the Vimeo player -->var player = Popcorn( Popcorn.slideshow( "player_1", "http://player.vimeo.com/video/11127501")

This won't be unlike how slideshow will work(intially anyway).   The html page will create an instance of slideshow.js which will contain point to a link to a slideshare slideshow which will in this case contain a link to a slideshow which will be embedded into the html page.   When I last looked at the slideshow site, they do provide you with the javascript to add to your website to show a slideshow in your website so there's another resource I can use.


I'm currently going through the vimeo player code right now and cutting and pasting bits of it to see how it works as well as the html file that runs it so I have an idea on how to create my own html file to test if my slideshow player is running.   I have yet to create a unit test, I'll work on one soon enough right now I'd like to play around with cutting and pasting code from the vimeo and youtube players onto slideshow.js and slideshow.html and try to see if I can figure out how to load a slideshare slideshow.

No comments:

Post a Comment