I’ve used the YouTube and Vimeo Javascript API’s for controlling videos in the past. An example of which is pausing a playing video in a slider when the user moves away from the slide.
If the user is limited to one type of video in the slider, it’s not too bad to incorporate that services API to control the video. However, when both YouTube and Vimeo and even others are allowed, it quickly becomes unweildy to use each API in turn to control the respective videos.
Is there a Javascript wrapper library out there that abstracts the details of each service’s API to create a common interface?
AFAIK there is no library to abstract the details of the players. There are projects such as OSM (http://mediafront.org/osmplayer/) that will provide their own players that link to the various types of media (youtube, vimeo, etc.).