Server-to-Server: Getting the Playback Position

Note: This functionality applies to Ooyala Player V4 and Player V3 (Deprecated).

After you retrieve the playback position, send it along with the formatted OPT string to the client application to initiate playback.

There are two ways to get a playback position:
  • For a specific asset for a given user
  • For all assets of a given user

This request must be signed by your Ooyala-supplied API credentials. For more information about signing requests, see the General Algorithm for Signing Requests.

To get the playback position for a specific asset for a given user:

[GET]http://api.ooyala.com/v2/cross_device_resume/accounts/account_id/viewed_assets/embed_code(identifier for the asset)/playhead_info

You may also replace embed_code with asset_id, and this will work for Backlot assets as well as third-party assets:

[GET]http://api.ooyala.com/v2/cross_device_resume/accounts/account_id/viewed_assets/asset_id/playhead_info

Response:

{  
   playhead_seconds:<position in seconds>,
   timestamp:<when the play event was received>
}

To get the playback positions for all assets viewed for a specific user:

[GET]http://api.ooyala.com/v2/cross_device_resume/accounts/account_id/playhead_info?limit=max_number_results&start_date=yyyy-mm-dd

The limit parameter is optional, and specifies the maximum number of results to return. The start_date parameter is also optional, and specifies the earliest date to return plays for (the end date is always the time when the API is called, or present time).

Response:

{  
   "items":[  
      {  
         "playhead_seconds":<position in seconds>,
         "timestamp":<when the play event was recieved>,
         "embed_code":<asset_id for Backlot asset or external asset>
      }
   ],
   "account":   <account_id> 
 "provider_id":<id of the provider or "pcode">
}

Formal reference documentation for this API request is at Cross-Device Resume: Getting the Playback Position Using the Backlot REST API.

해당 내용이 도움 되었습니까?