We have three announcements that might make developers, and those who use subtitles, happy.

PHP API Client

We’re excited to release an official PHP API client for interacting with the SproutVideo API. This will help make building integrations with SproutVideo using PHP much easier. The client is available through composer here: https://packagist.org/packages/sproutvideo/sproutvideo and the source code can be found here: https://github.com/SproutVideo/sproutvideo-php. Hopefully this makes lives much easier for PHP developers.

What language should we choose next? Read on for more details on the PHP API client, and let us know in the comments.

New JavaScript Player API and Playlist Support

We’ve updated the JavaScript Player API to be far cleaner and more flexible when it comes to event handling, and we added support to control playlists as well.

What used to look like this:

var player = SV.Player.new({
  videoId: 'abc123',
  events: {
    onStatus: function(e) {
      if (e.type == 'completed') {
        alert('The video has finished playing!')
      }
    }
  }
});

Now would look like this:

var player = SV.Player.new({videoId: 'abc123'});
player.bind('completed', function(e){
  alert('The video has finished playing!');
});

As you can see, these changes result in cleaner, more flexible, and more maintainable code.

The changes are all backwards compatible so if you are currently using the old event handling method, nothing will break.

You can read all about the JavaScript Player API in the updated documentationn.

Subtitle Support in iOS7

Thanks to recent updates, we now support subtitle tracks on all iPods, iPhones and iPads running iOS7. All of the subtitle tracks you’ve added will automatically start being displayed. Check out some screenshots below!

Subtitle Icon.

Videos with subtitles will now display a subtitle selector button in the bottom right of the controls when the video is playing.

Subtitle Selection.

Clicking on it will bring up the subtitle selection screen.

Subtitles Playing.

Selecting any of the subtitle tracks will result in the subtitles being displayed over the video.

We’re still waiting on Android and Desktop Browsers to properly support subtitle tracks but hope to release some temporary measures to get subtitles playing on those platforms until they support them natively like iOS7.

We’re hopeful that you’ll find these API updates and subtitle features useful as you use SproutVideo! Try them out and let us know what you think – we’re listening!

Written by Adam Podolnick

Posted September 25, 2013

blog comments powered by Disqus