mixins/stateful.js

Mixins

StatefulMixin

[module:stateful~StatefulMixin]($c967f415dcda3bc5.md)

Methods

inner stateful(target, defaultStateopt) → {Object}

[mixins/stateful.js](https://docs.videojs.com/mixins_stateful.js.html), [line 105](https://docs.videojs.com/mixins_stateful.js.html#line105)

Applies StatefulMixin to a target object.

If the target object is evented and has a handleStateChanged method, that method will be automatically bound to the statechanged event on itself.

Parameters:
NameTypeAttributesDescription
targetObject

The object to be made stateful.

defaultStateObject<optional>

A default set of properties to populate the newly-stateful object’s state property.

Returns:

Object -

Returns the target.