Merge branch 'beta' of github.com:sampotts/plyr into beta

This commit is contained in:
Sam Potts 2018-02-11 15:09:40 +11:00
commit 58c2c52c95

View File

@ -124,7 +124,8 @@ const captions = {
setCue(input) { setCue(input) {
// Get the track from the event if needed // Get the track from the event if needed
const track = utils.is.event(input) ? input.target : input; const track = utils.is.event(input) ? input.target : input;
const active = track.activeCues[0]; const {activeCues} = track;
const active = activeCues.length && activeCues[0];
const currentTrack = captions.getCurrentTrack.call(this); const currentTrack = captions.getCurrentTrack.call(this);
// Only display current track // Only display current track