Plugin to provide access to functionality only available in the Flash-only player API when otherwise using the Smart Player API
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Flash Player API Bridge

This plugin exposes some methods of the Flash-only Player API to javascript. The intended use is for when you want to use the Smart Player API in the page, but need to access some functionality that is only implemented in the Flash-only player API.


Add the swf plugin to the player as a plugin in player settings or as a module in the BEML template. Remember to have a crossdomain policy file on your server hosting the plugin to enable Flash to load the plugin

The Flash-only player API methods that have been implemented can be accessed from the swf object on the page. For instance, to have the player volume set to 50% and update the sharing link:

<object id="myExperience123456789" class="BrightcoveExperience">
  <param name="includeAPI" value="true" />
  <param name="templateReadyHandler" value="onReady" />

function onReady(event) {
  // Get the player object after the player has been generated:
  var fapiPlayer = document.getElementById(;


  console.log('Volume ' + fapiPlayer.fapiGetVolume());


  // Some regular Smart Player API code could also be used:
  // var player = brightcove.api.getExperience(;
  // ... Smart Player API code...

Note there's no hard requirement to put this into the Smart Player ready handler as above, but this will generally be the most convenient way to slot this into your existing code.

Events will be triggered only if a window.fapiEvent function has been defined before the plugin is loaded.

function fapiEvent(id,event) {
  console.log ("Player " + id + " dispatched event " + event.type);

Methods implemented

Events implemented

  • ExperienceEvent.ENTER_FULLSCREEN
  • ExperienceEvent.EXIT_FULLSCREEN
  • MediaEvent.BUFFER_BEGIN
  • MediaEvent.MUTE_CHANGE
  • MediaEvent.VOLUME_CHANGE


Copyright 2015 Ben Clifford

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.