This class provides a GUI interface for playing ractives, resembling a traditional web video player. It is the main entry point to the library.
Customize the player controls.
You can extend the default controls like so:
Say you wanted to have your own volume control, have the time display on the right, and not have the Settings control. Then you would write
At this time, it is not possible to provide your own scrubber bar. This will be corrected in a future release.
The Script to use.
Provide thumbnail previews for the scrubber bar. You can generate thumbnail sheets with
colshow many columns per sheet
rowshow many rows per sheet
widththe width of each thumbnail
heightthe height of each thumbnail
frequencyhow many seconds between thumbnails
pathpattern where the sheets are located. Must contain
highlightspoints of interest in the video, these will be highlighted on the scrubber bar
Prevents intercepting of scroll on mobile. See Scroll events in the Authoring guide.
Prevents a click from pausing/playing the video. See Canvas clicks in the Authoring guide.
The div where ractive content is attached (which is separate from ractive controls).
An EventEmitter that your code can subscribe to. Emits the following events:
|canplay||Fired when the ractive is ready to start playing, but may not be able to play to its end without having to stop for further buffering of content.|
|canplaythrough||Fired when the ractive is ready to start playing, and will be able to play up to its end without having to stop for further buffering of content.|
|canvasClick||Fired when a click happens anywhere on the canvas, which by default pauses/resumes the video. See Canvas clicks in the Authoring guide.|
The KeyMap instance attached to this player.
The underlying Playback instance.
The underlying Script instance.
Call this method when the ractive is ready to begin playing.
Resumes keyboard controls. See Forms in the Authoring guide.
Suspends keyboard controls so that components can receive keyboard input. See Forms in the Authoring guide.