we need a Mac OS X application that can get information from the youtube and grooveshark flash players in the following browsers: Firefox, Chrome, Safari.
It must identify if the player runs on youtube or grooveshark, and to get some mandatory information - title, duration, current position, playlist.
It should be done so to always monitor the most recent video window/tab. If the most recent video window/tab is closed, it should jump to the immediately previous video window/tab, in reverse order from newest to oldest.
Also we need a small testing program that calls this application (for testing purposes only).
## Deliverables
we need a Mac OS X application that can get information from the youtube and grooveshark flash players in the following browsers: Firefox, Chrome, Safari.
It must identify if the player runs on youtube or grooveshark, and to get some basic information - title, duration, current position, playlist.
Also we need a small testing program that calls this application (for testing purposes only).
It will implement the following API:
1) GetPluginCapabilities();
returns a structure that maps all implemented features of the plugin.
Structure (this is a call that will always return the structure filled like this):
- PlayerName = "[Youtube/Grooveshark] Flash Player "
- CurrentSongInfo - 1
- CurrentPlaylistInfo - 1
- ControlVolume - 0
- ControlPlay - 0
- ControlPause - 0
- ControlStop - 0
2) GetRunningProcessID();
returns 1 if player runs in IE, 2 if player runs in FF, 3 if player runs in CH, 4 if player runs in Safari, returns 0 if the player is not running
3) CheckIfRunning(Start);
Parameter Start - to be ignored
returns true if it is running, returns false if not running;
4) GetCurrentSongInfo();
returns a song structure if there is a current song playing
structure:
- TITLE
- ALBUM (if possible, empty if not)
- AUTHOR (if possible, empty if not)
- Duration (in seconds)
- Position (current second in song)
- Sourcefile / SourceURL (youtube/grooveshark url)
- Status (Playing/Pause)
5) GetCurrentPlaylist();
returns a collection of song structures (see above) from the playlist in youtube/grooveshark.