Difference between revisions of "Online Service Developer"

From Winamp Developer Wiki
Jump to: navigation, search
(Registering an Account)
(Integrating Online Services with Winamp)
Line 27: Line 27:
 
#Open the Winamp player
 
#Open the Winamp player
 
#Select Options->Preferences->Plug-ins->Media Library.  
 
#Select Options->Preferences->Plug-ins->Media Library.  
#Select "API 2 Test Platform" and press "Configure selected plugin".  
+
#Select "WebDev Test Platform v2.0" and press "Configure selected plugin".  
 
#On the Web Dev Preferences dialog, set the URL field to the URL of the initial web page for the online service. For example, file://c:\myonlineservice\webdev.html  
 
#On the Web Dev Preferences dialog, set the URL field to the URL of the initial web page for the online service. For example, file://c:\myonlineservice\webdev.html  
 
#Click on "Web Dev Test Platform" in the Media Library. You may have to right click and choose refresh to see the new web page.  
 
#Click on "Web Dev Test Platform" in the Media Library. You may have to right click and choose refresh to see the new web page.  

Revision as of 19:10, 30 July 2009

Breadcrumb -- Wiki Main : Skin Developer : Visual Developer : Plug-in Developer : Online Service Developer : Articles Page : FAQ : Glossary : Spam

The What and Why of Online Services

What is a Winamp Online Service

A Winamp online service has several distinctive features. The first is that it is a web site that appears embedded within the Winamp client. The second, and more fun feature, is that the web pages so displayed are able to interact with the Winamp Client. The third is that access to the online services is presented to the large Winamp community as part of the Winamp client's Online Services Gallery.

Benefits to creating an Online Service

There are many benefits for developing an Online Service. Before we delved into the list, the most important benefit is distribution. Winamp is a great distribution platform as it has 77 million unique users every month!!

Hence, a) if your website needs page views and more monetization b) if your brand needs more eye balls c) if your blog needs more readers d) if you want to develop an web application which has something to do with music, video, photo, streaming, podcasts, music events, e-commerce, games

then you will never regret making an Online Service in Winamp.

Try it now!

Integrating Online Services with Winamp

The Winamp Online Services API is designed to allow web pages, hosted (displayed) within the embedded browser of the Winamp client. In order to make this happen you have to do the following:

  • Make sure you have the latest version 5.55 (or above) of the Winamp client. You can download the client from this forum link
  • Make sure you have the latest version of the ml_webdev plugin (ml_webdev.dll). Get the plugin from this link. This plugin will create a "Web Dev Test Platform" within the Medial Library pane. It has it's own special installer.

In order to change the starting web page for the online service, start the Winamp client and configure the plugin.

  1. Open the Winamp player
  2. Select Options->Preferences->Plug-ins->Media Library.
  3. Select "WebDev Test Platform v2.0" and press "Configure selected plugin".
  4. On the Web Dev Preferences dialog, set the URL field to the URL of the initial web page for the online service. For example, file://c:\myonlineservice\webdev.html
  5. Click on "Web Dev Test Platform" in the Media Library. You may have to right click and choose refresh to see the new web page.

You should now see the initial page of your online service in the Winamp embedded browser.

Registering an Account

While you can start developing an online service immediately, you will need to create a Winamp account before you can submit your service. To do this follow these steps:

  • Open your favorite web browser and go to http://www.winamp.com
  • Choose "Register" from the top of the page.
  • Enter your First Name.
  • Enter your Last Name.
  • Enter an email address where you can be contacted. (Note: the email must be unique for each registration as this is used as your Login name.)
  • Enter a password to use when you login.
  • Enter your Birthdate.
  • Click on the TERMS link and read the Winamp.com Terms of Use.
  • Click BACK to return to the registration form.
  • Make sure the checkbox is checked to say you've read and agree to the TERMS.
  • Click the "register" button.

Style Guide

Some tips for Online Service developers:

  • Be aware that online services are rendered within the Winamp client browser so make sure you take into account the size available to your service.
  • Make use of the Winamp Javascript API methods. Online services should exercise the power of the Winamp client to improve user experience. For example, you might want to use the Skins API to adjust the colors of your service to blend with the client.

JavaScript APIs

Here is a summary of the API methods that can be called from an online service.

For more details on the methods available check out the complete JavaScript API technology framework

  • Transport API
    • Play
    • Stop
    • Pause
    • Advance to next track
    • Back up to previous track
    • Shuffle
    • Repeat
    • Event Notifications - so the web page can tell when the events happen
      • When the player starts playing
      • When the player is stopped
      • When the player is paused
      • When the player reaches the end of a file
    • Metadata - get metadata for currently playing song
    • position - change the playback position of currently playing song
  • Playqueue API
    • The ability to alter the Winamp Queue of songs about to be played.
      • Play - clear the queue and play a song.
      • Enqueue - add a song to the queue
      • Insert - add a song to the queue at a position
      • Clear - clear the queue
      • Metadata - get metadata for a song in the queue
  • Playlists API
    • Get a list of all playlists
    • Open a playlist for alteration
    • Save a modified playlist
  • Playlist methods - once a playlist is opened these are available.
    • Get and set info about individual items in the playlist
    • Swap two songs
    • Randomize the order of songs
    • Reverse the order of songs
    • Sort By Filename
    • Sort By Title
    • Clear (empty) the playlist
  • Bookmarks API
    • Add a bookmark
    • TBD
  • Podcasts API
    • Subscribe to a Podcast
    • More TBD
  • Secuirty API
    • In place, but not fully ready
    • TBD
  • LocalMedia API
    • TBD
  • History API
    • Query the History DB - retrieve info about songs played previously
  • Config API
    • The ability to store JavaScript properties persistantly.
  • Application API
    • Launch the internal Winamp browser.
    • Launch an external browser.
    • Get the version of the internal browser.
    • Get the language pack info
  • Skins API
    • Retrieve color and font information regarding the currently assigned Winamp client skin.
  • MediaCore API
    • Retrieve metadata for a specified file
    • Determine whether a specific file format (file extension) is supported by the Winamp Client.

User Feedback

There are several methods by which users can provide feedback on your online service.

Ratings by Users

The Winamp client allows users to rate your online service. You can see the average rating and the number of times that your service has been rated using the "My Profile" link on winamp.com after logging in. This way you can tell whether thousands of people adore your service, or perhaps it was a single rating from your best friend.

Abuse Reporting

Users can also complain if they find something objectionable. These "abuse reports" may be forwarded to the online service developer to be resolved. So don't do bad things. And no, SlyHawk, parcour will not help you here.

Additional Considerations

Security

In order to help protect users from potential abuse by online services, Winamp has implemented a strategy to notify users that a web service is about to issue one of the online service api methods. The warning message will ask the user whether the method should proceed. Each security prompt will be applied to the action being requested as well as certain related actions of the same API. There is also a way to indicate that the selection should be used for ALL other security prompts for the current online service. This prevents the user from being bombarded with what may sound like repetitive requests. If the author of the online service upgrades their service, these choices will be carried forward to the new release.

For a more in depth discussion of the security prompts go to Online Service Security Prompts. [link title]