The Smart Player API allows you to create custom dynamic solutions in JavaScript that work with both Flash and HTML players. This API facilitates development of solutions for Video Cloud smart players, those players that detect their environment, and serve videos with Flash players where supported and installed, or otherwise serve videos with HTML players. Use the Smart Player API to create dynamic solutions and extend the functionality and behavior of players created from the standard templates in the Video Cloud Studio.
Brightcove developed the Smart Player API so that Video Cloud developers can code solutions that work consistently for Flash and HTML players. In doing so, rather than building new methods on top of the existing Player API, we decided to develop a new API from scratch. Building the new Smart Player API has the advantages of saving developers the burden of deciphering which methods are supported against HTML and which are not, and gives us the opportunity to implement an asynchronous communication structure more inline with JavaScript, as well as accommodate requests we’ve heard from developers for namespaced JavaScript classes.
Going forward, we’ve changed the name of the legacy Player API to the Flash-only Player API, when coding in JavaScript, and the Flash Player Plug-In API, when coding in ActionScript. While the new Smart Player API does supports common functionality, it does not support all the functions currently available through the Flash-only Player API. We plan to build features into the Smart Player API that get it to parity with the Flash-only Player API, and phase out building new features for the Flash-only Player API.
The Smart Player API exposes objects, methods, events, and types for coding additional functionality for your Video Cloud smart players and has the following characteristics:
The Smart Player API includes the following core modules:
| Module Name | General Functionality |
| Content Module | Retrieves videos and playlists from the Video Cloud service for the player |
| Video Player Module | Handles video playback interaction and fires events related to these interactions |
| Experience Module | Parent module for all other API modules; handles the player template behavior and elements; use this module for listening for player load events, and for player resizing |
| Cue Point Module | Manages cue points for videos; provides an interface for the player to send notifications at specific points during playback |
| Advertising Module | Allows you to add listeners for ad start and complete events |
For the list of contents for the core module objects, and for definitions and sample uses of the currently available classes, methods, events, and types of the API, see The Smart API Reference.
Post new comment
Comments