# cast.[framework](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework).PlaybackConfig

class static

Configuration to customize playback behavior.

## Constructor

### PlaybackConfig

new
PlaybackConfig()

## Properties

### autoPauseDuration

(number or undefined)

Duration of buffered media in seconds to start buffering. Not supported
by Shaka Player.

### autoResumeDuration

(number or undefined)

Duration of buffered media in seconds to start/resume playback after
auto-paused due to buffering.

### autoResumeNumberOfSegments

(number or undefined)

Minimum number of buffered segments to start/resume playback. For DASH
content use autoResumeDuration instead.

### captionsRequestHandler

(function(non-null [cast.framework.NetworkRequestInfo](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.NetworkRequestInfo)) or undefined)

A function to customize request to get a caption segment. Not supported
by Shaka Player.

### enableSmoothLiveRefresh

boolean

A flag to enable manifest refresh logic for Smooth Live streaming.

### enableUITextDisplayer

boolean

A flag to enable Shaka Player's DOM-based text renderer,
[shaka.text.UITextDisplayer](https://shaka-player-demo.appspot.com/docs/api/shaka.text.UITextDisplayer.html).
The videoContainer used to construct the UITextDisplayer defaults to the
parent of the Cast video element. Use of this text displayer may incur
synchronization issues between the text track and audio/video track(s),
especially on older generation Cast devices. The videoContainer may not
be properly aligned relative to the screen size, should custom UI be used
in the receiver application.

### ignoreTtmlPositionInfo

boolean

A flag whether to ignore TTML positioning information.

### initialBandwidth

(number or undefined)

Initial bandwidth in bits in per second.

### licenseCustomData

(string or undefined)

Custom license data. Not supported by Shaka Player.

### licenseHandler

(function(non-null Uint8Array, non-null [cast.framework.NetworkResponseInfo](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.NetworkResponseInfo), optional non-null Object) returns (non-null Promise containing non-null Uint8Array or non-null Uint8Array) or undefined)

Handler to process license data. The handler is passed the license data,
and returns the modified license data.

<br />


The Object parameter represents the original Shaka request
(shaka.extern.Request) which gave rise to this response, and is
undefined if Shaka Player is not being used.

### licenseRequestHandler

(function(non-null [cast.framework.NetworkRequestInfo](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.NetworkRequestInfo)) or undefined)

A function to customize an outgoing request to get a license. The handler
is passed network request information to be modified. The SDK processes
the modified network request information to initiate the license request.
Asynchronous handlers are only supported on Shaka Player.

### licenseUrl

(string or undefined)

Url for acquiring the license.

### manifestHandler

(function(string, non-null [cast.framework.NetworkResponseInfo](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.NetworkResponseInfo), optional non-null Object) returns (non-null Promise containing string or string) or undefined)

Handler to process manifest data. The handler is passed the manifest, and
returns the modified manifest.

<br />


The Object parameter represents the original Shaka request
(shaka.extern.Request) which gave rise to this response, and is
undefined if Shaka Player is not being used.

### manifestRequestHandler

(function(non-null [cast.framework.NetworkRequestInfo](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.NetworkRequestInfo)) or undefined)

A function to customize request to get a manifest. The handler
is passed network request information to be modified. The SDK processes
the modified network request information to initiate the manifest
request. Asynchronous handlers are only supported on Shaka Player.

### protectionSystem

[cast.framework.ContentProtection](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework#.ContentProtection)

Preferred protection system to use for decrypting content.

### segmentHandler

(function(non-null Uint8Array, non-null [cast.framework.NetworkResponseInfo](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.NetworkResponseInfo), optional non-null Object) returns (non-null Promise containing non-null Uint8Array or non-null Uint8Array) or undefined)

Handler to process segment data. The handler is passed the segment data,
and returns the modified segment data.

<br />


The Object parameter represents the original Shaka request
(shaka.extern.Request) which gave rise to this response, and is
undefined if Shaka Player is not being used.

### segmentRequestHandler

(function(non-null [cast.framework.NetworkRequestInfo](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.NetworkRequestInfo)) or undefined)

A function to customize request information to get a media segment. The
handler is passed network request information to be modified. The SDK
processes the modified network request information to initiate the
segment request. Asynchronous handlers are only supported on Shaka
Player.

### segmentRequestRetryLimit

(number or undefined)

Maximum number of times to retry a network request for a segment.
Defaults to 3.

### shakaConfig

(non-null Object or undefined)

This object is merged with CAF's default Shaka configurations (with
options set in this object taking precedence). Developers should use
caution when applying values to the Shaka configuration as it could
result in playback issues.
For allowed options in this object, see
[shaka.util.PlayerConfiguration](https://shaka-player-demo.appspot.com/docs/api/shaka.extern.html#.PlayerConfiguration)
for more information.