otvplayer.js
Methods
-
innerotvplayer(id, options, ready){Player}
-
Doubles as the main function for users to create a player instance and also the main library object. The
otvplayer
function can be used to initialize or retrieve a player.Name Type Description id
string | Element Video element or video element ID
options
Object optional Optional options object for configuration settings of HTML5 and plugins including the OtvToolkit for
opy-sdk-js
Name Type Description html5
Object optional HTML5 video playback configuration
Name Type Description nativeCaptions
Boolean optional Must be set to true for Safari/HLS subtitles and captions to be enabled
nativeAudioTracks
Boolean optional Must be set to true for Safari/HLS multi-audio tracks to be enabled
liveui
Boolean optional Set to
true
to display the progress bar for seeking within the seekable range during live stream playbackautoplay
Boolean optional muted
Boolean optional Initial mute setting
plugins
Object optional Structure for configuration of HTML5 plugins such as our SDK
Name Type Description otvtoolkit
Object optional Structure for the configuration relating to our SDK
Name Type Description drm
Object optional Optional DRM configuration
Name Type Description system
'nagra-ssp' | 'nagra-ssp-fps' | 'customer' | 'customer-ssm' | 'customer-fps' | 'microsoft-azure' | 'nagra-conax' | 'nagra-conax-fps' | 'nagra-conax-upfront' | 'nagra-conax-upfront-fps' optional To specify the DRM system to be used
config
Object optional Optional object for further configuration
Name Type Description mode
'token' | 'classictoken' | 'upfronttoken' optional To specify the DRM mode of operation.
classictoken
andupfronttoken
are only relevant when using the Conax systems.tenantId
String optional To specify the tenant identifier on the SSP/SSM head end instance
licenceServer
String optional URL of the SSP head end instance
ssmServer
String optional URL of the SSM head end instance
preferredDRM
'com.microsoft.playready' | 'com.widevine.alpha' | 'com.apple.fps' optional Use this attribute to designate your preferred DRM system
widevineServerCertificate
String optional base64 encoded Widevine certificate of the license server
fairplayServerCertificate
String optional base64 encoded FairPlay certificate of the license server
requestLicenceCallback
String optional Required when
system
iscustomer
to specify the name of the function that the SDK will call to perform a customer specific licence retrieval mechanism.ready
Component~ReadyCallback optional Optional ready callback
Returns:
Type Description Player A player instance