Tutorial: Trick Play

Shaka Player supports trick play, a rewind/fast-forward style of seeking. Trick play is supported through the shaka.player.Player method setPlaybackRate. The setPlaybackRate method should always be used instead of setting video.playbackRate directly as video.playbackRate does not support rewind (on any browser we have tested). Standard playback rate is 1 and paused is 0. To rewind, use a negative playback rate. To fast-forward, use a positive playback rate greater than 1.

var video = document.getElementById('video');
var player = new shaka.player.Player(video);

// Fast-Forward (2x).
player.setPlaybackRate(2);

// Rewind (-2x).
player.setPlaybackRate(-2);

See control.js for a fully functional sample implementation.