Skip to main content

Additional Props

Show cta​

showCTA is a boolean flag that controls whether or not CTAs are shown on this instance of the SX PlayerSDK.

const customConfig = {
...customConfig,
showCta: false
}

AllowedDomainURL​

AllowedDomainURL is an array of URLs that contains all the domains that the PlayerSDK instance is allowed to be loaded in. This is to avoid clickjacking.

const customConfig = {
...customConfig,
allowedDomainURL: ["storyxpress.co", "dev.example.com"]
}

PlaybackRates​

PlaybackRates is an array that contains all the possible playback rates for the user to select from in this instance of the SX PlayerSDK.

const customConfig = {
...customConfig,
playbackRates: [0.5, 1, 1.5, 2]
}

Time​

time is an object that contains timestamps - startime and endtime. So when the user passed these timestamps via config, player plays the video for the duration starttime to endtime.

Sample Usage:

const customConfig = {
...customConfig,
time: {
startTime: 7,
endTime: 11
}
}

Thumbnail​

Will set the thumbnail of the video according to URL. If no thumbnail attribute of video given, first frame is used.

Resume Playback​

If set to true, resume the video player from the time it previously stopped. By default set to false.

Fluid​

This will enable the generic fluid mode.

Default set to true.

fill​

If set to true, the video player will fill the root container it is contained in. For best experience, Make the div root container responsive in your website using bootstrap, this will make the video player responsive the different screen sizes.

Default set to true.

responsive​

Responsive mode will make the player's UI customize itself based on the size of the player. This is useful if you have embeds of varying sizes - or if you want a fluid/fill player to adjust its UI based on its size.

Default set to true.

aspectRatio​

fluid mode that keeps the player sized to a particular aspect ratio.

By default, fluid mode will use the intrinsic size of the video once loaded but you can change it with classes or with the aspectRatio option. Enabling fluid mode will disable fill mode. If both are enabled, fluid mode takes precedence.

Default set to "16:9"