Skip to content

Commit

Permalink
Fix: model.set moved to model, empty cc added to avoid error on load
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-allen-89 committed Jan 25, 2024
1 parent 06a0c8a commit 28143c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
8 changes: 7 additions & 1 deletion js/simpleVideoBranchingModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ define([
}
});

// totals are useful to have too
// totals are useful to have too, set initial player state attributes
this.set({
_isMediaEnded: false,
_isMediaPlaying: false,
_media: {
cc: [],
mp4: ' '// prevent console warning 'No media is selected in components.json'
},
_mediaCount: mediaIndex,
_questionCount: questionIndex
});
Expand Down
9 changes: 0 additions & 9 deletions js/simpleVideoBranchingView.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@ define([

_.bindAll(this, 'onMediaElementPlay', 'onMediaElementPause', 'onMediaElementEnded', 'onMediaElementTimeUpdate', 'onMediaElementSeeking');

// set initial player state attributes
this.model.set({
_isMediaEnded: false,
_isMediaPlaying: false,
_media: {
mp4: ' '// prevent console warning 'No media is selected in components.json'
}
});

this.checkIfResetOnRevisit?.();
},

Expand Down

0 comments on commit 28143c1

Please sign in to comment.