Show Menu
TOPICS×

Create a Browserify-compatible player without the UI-Framework

Use the Browserify library file provided by Browser TVSDK in your app, to create a Browserify-compatible player.
The topic Create a basic player using TVSDK lists the set of Browser TVSDK libraries that you normally include when you create a basic video player. To do this you simply add script tags with src attributes pointing to the libraries.
The process is slightly different for creating a Browserify-compatible player. For this, you use the require command to include the AdobePSDK.module.js file (provided by the Browser TVSDK) in your app. This file bundles the basic player library files in their proper order of dependency, and returns the AdobePSDK namespace you use to implement features for your player.
Browser TVSDK provides the following sample Browserify application and build files in the release package:
  • [ #/samples/browserify/reference/build/Gruntfile.js]
  • [ #/samples/browserify/reference/build/package.json]
  • [ #/samples/browserify/reference/examples/sample.html]
  • [ #/samples/browserify/reference/examples/sample.js]
To create a Browserify-compatible video player:
  1. Require the Browserify-compatible library file that returns the AdobePSDK namespace:
    var AdobePSDK = require('./AdobePSDK.module.js'); 
    var player; 
    function Load () { 
        player = new AdobePSDK.MediaPlayer(); 
    […]
    
    
  2. Create your player as described in Create a basic player using TVSDK .
    Step 1 in this task replaces the step in the basic player instructions in which you source the individual basic player libraries in your app file. You can now bundle your app files using Browserify.