Adobe Pass Integration Reference

Player parameters, the APIs, and events associated with Adobe Pass integration.

Player Parameters

Parameter Description
staticResourceId Player parameter that is passed to Adobe Pass Server. Match with the resourceId on the Backlot label.
showLoginAtStart Whether to show the login at startup.

TRUE - If the end user is not yet authenticated, automatically show MVPD to login.

FALSE (default) - Do not show MPVD to login.

API Reference

OO.Pass API
API Call Description
OO.Pass.login() Check authentication and login. You can listen to OO.EVENTS.ADOBE_PASS_AUTH_STATUS if you're already logged in. Otherwise it will show login dialog.
OO.Pass.logout() Attempt to logout the current user.
OO.Pass.checkAuthentication() Will do a full check if authenticated. You can listen to OO.EVENTS.ADOBE_PASS_AUTH_STATUS with the current auth status.
OO.Pass.isAuthenticated() Returns true if authenticated.
OO.Pass.selectProvider(event) See useProviderDialog(). You can use this function to parse out the provider and to tell Adobe Pass your MVPD choice.
OO.Pass.getSelectedProvider() Returns the provider that you are currently logged into.
OO.Pass.useProviderDialog(dialog) Use custom MVPD dialog callback function. See the Sample Web Page.
OO.Pass.checkAuthorization(resourceId) If the end user is authenticated, check whether they have authorization with the given resourceId.

Success: Publishes OO.EVENTS.ADOBE_PASS_TOKEN_FETCHED and setToken (specific within Adobe Pass).

Failure : Publishes OO.ERROR.ADOBE_PASS_TOKEN and tokenRequestFailed (specific within Adobe Pass).

OO.Pass.getAuthorization(resourceId) Attempt to get authorization for the provided resourceId. If the end user is not authenticated, it will attempt to login first.

Success: Publishes OO.EVENTS.ADOBE_PASS_TOKEN_FETCHED and setToken (specific within Adobe Pass).

Failure: Publishes OO.ERROR.ADOBE_PASS_TOKEN and tokenRequestFailed (specific within Adobe Pass).

OO.Pass.isEntitlementLoaded() Returns true if the Access Enabler is loaded and initialized.

OO.PASS CALLBACK API

API Call Description
OO.Pass.onSetToken(func) Takes a function in the form of function func(event, resId, token) to callback when Adobe Pass dispatches a setToken event.
OO.Pass.onTokenRequestFailed(func) Takes a function in the form of function func(event, stat, errorCode) to callback when Adobe Pass dispatches a tokenRequestFailed event.
OO.Pass.onSetAuthenticationStatus(func) Takes a function in the form of function func (event, stat, errorCode) to callback when Adobe Pass dispatches the setAuthenticationStatus event.
OO.Pass.onEntitlementLoaded(func) Takes a function in the form of function func(event, stat, errorCode) to callback when Adobe Pass dispatches the entitlementLoaded event.

Event Reference

Event Description
OO.EVENTS.ADOBE_PASS_AUTH_STATUS When someone checks for authentication.
OO.EVENTS.ADOBE_PASS_TOKEN_FETCHED When a successful token is fetched for authorization.
OO.EVENTS.ERROR When an error is produced. Adobe Pass has additional parameters passed to listeners for some Adobe Pass errors.

Note: More detailed errors from MVPD will be in params.passDetails.

Most Common Adobe Pass Events

The following list includes the most common Adobe Pass events.

  • setToken
  • tokenRequestFailed
  • setAuthenticationStatus
  • entitlementLoaded

Consult your Adobe Pass documentation for more information about these events.

Example Implementations

Sample Web Page Integration
<html>
  <head>
    <script src="http://player.ooyala.com/v3/[your_player_branding_id]"> </script>
    <script>
      OO.ready(function() {
        window.pp =
          OO.Player.create("video-container", "[your_embed_code]", {
            width: '400px',
            height: '300px',
            staticResourceId: '[your_resource_id]',
          });
      });
    </script>
  </head>
  <body>
    <div class="video-container" id="video-container"></div>

    <a href="#" onclick="javascript:OO.Pass.login();return false;">Log In</a>

    <a href="#" onclick="javascript:OO.Pass.logout();return false;">Log Out</a><br />
  </body>
</html>
  </codeblock>
  <b>Sample Web Page Integration</b>
  <p>In the following example:</p>
  <ul>
   <li>In order to authenticate, the code must contain mvpd_id.</li>
   <li>The name ooyalaMvpdPickerContainer is fixed and cannot be changed.</li>
  </ul>
  <codeblock >
<html>
  <head>
    <script src='http://code.jquery.com/jquery-1.8.2.min.js'></script>
    <script src="http://player.ooyala.com/v3/[your_player_branding_id]"> </script>
    <script>
        // Custom Display Provider Dialog
        function customDisplayProviderDialog(event, providers) {
          var selectTitle = "This is my custom display for providers";
          $('#ooyalaMvpdPickerContainer').remove();

          //  build provider list.
          var loginContainerDiv = $('<div id="ooyalaMvpdPickerContainer"/>');
          $('body').append(loginContainerDiv);
          var cancelButton = $("<div class='cancelDiv'/>");
          cancelButton.html('&nbsp;');
          var titleBar = $("<div class='titleBar'/>");
          titleBar.html(selectTitle);
          var providerList = $("<div class='providerList'/>");
          var bottomList = $("<div class='bottomList'/>");
          var innerDiv = $("<div class='innerDiv'/>");
          loginContainerDiv.append(innerDiv);
          innerDiv.append(cancelButton);
          innerDiv.append(titleBar);
          innerDiv.append(providerList);
          innerDiv.append(bottomList);
          var list = $("<ul>");

          providerList.append(list);
          //Note the use of list elements and their attribute of mvpd_id.
          $.each(providers, function(index, item){
            var li = $("<li>");
            li.attr("mvpd_id", item.ID);
            li.append("<img src='" + item.logoURL + "' onclick='function(){return false;}'> " + item.displayName);
            list.append(li);
          });

          $("#ooyalaMvpdPickerContainer li").click(OO.Pass.selectProvider);
          cancelButton.click(function() {
            $('#ooyalaMvpdPickerContainer').remove();
          });
        }// end custom Display Provider Dialog
    </script>
  </head>
  <body>
    <div class="video-container" id="video-container"></div>

    <a href="#" onclick="javascript:OO.Pass.login();return false;">Log In</a>

    <a href="#" onclick="javascript:OO.Pass.logout();return false;">Log Out</a><br />
  </body>
</html>
  

Was this article helpful?