Table of Contents

Annotations On Embedded Videos

As of now, we support the embedding of the following videos

1. You tube

2. Vimeo

3. Metacafe.

There is no common way to support annotations for all the 3 of these. You tube supports JS API to add annotations and draw them on the video with the styles we want.

So, the only uniform way we could support annotations is by playing all these videos using jwplayer for which we already have an annotation plugin. refer - https://wiki.exphosted.com/doku.php/annotations_on_video_content.

1. Playing You tube videos using jwplayer

Jwplayer has a default support for you tube videos. We just need to pass the url to file attribute to play the video.

Ex -

        :javascript
          jwplayer('player').setup({
            height: '100%',
            width: '100%',
            id: 'playerId',
            allowfullscreen: true,
            allowscriptaccess: 'always',
            flashplayer: '/jwplayer/player.swf',
            file: "http://www.youtube.com/watch?v=ylLzyHk54Z0",
            type: "",
            source: '/jwplayer/player.swf'
            })

2. Playing Vimeo videos using jwplayer

We need the flash source of vimeo player so that we can specify the 'type' of the video for jwplayer to play it. It is nothing but the media type provider so that jwplayer understands the media type it is playing.

Vimeo player media provider for jwplayer can be found at - http://sourceforge.net/projects/jwplayervimeo/

We need to place this vimeo.swf in the same directory as jwplayer's player.swf.

We can play the videos as below -

jwplayer('player').setup({
            height: '100%',
            width: '100%',
            id: 'playerId',
            allowfullscreen: true,
            allowscriptaccess: 'always',
            flashplayer: '/jwplayer/player.swf',
            file: "http://vimeo.com/28299236",
            type: "/jwplayer/vimeo.swf",
            source: '/jwplayer/player.swf'
            })
 

Open issue

With the above mentioned media player for vimeo, we have an issue where seeking back to already played part of the video does not update the current position. This results in showing/not showing the annotations at that time. This issue is also observed on - http://www.pickmusic.com/

Possible Fixes

1. Use a different mdedia player for vimeo videos - http://wessite.com/labs/vimeoprovider This is not free. We can also explore if there is any other alternative to this.

or

2. And try to write our own media player/plugin API for vimeo videos which is similar to what mentioned in 1.

3. Playing Metacafe videos using jwplayer

At present we do not have a media provider for metacafe videos. So, they cannot be played using jwplayer. So, we cannot annotate them.