Add videos to be played across all pages. #1523

Closed
dan1d wants to merge 13 commits from video-overlay-new into master
Showing only changes of commit a237de1b6e - Show all commits

View file

@ -45,7 +45,9 @@ class VideoPlayer extends React.PureComponent {
// Hide overlay video when the video ends only if its overlayed
const ended = () => {
this.props.doHideOverlay();
this.props.doPause();
this.props.savePosition(claim.claim_id, 0);
if (this.props.overlayed) this.props.doHideOverlay();
};
// use renderAudio override for mp3
@ -79,9 +81,7 @@ class VideoPlayer extends React.PureComponent {
});
mediaElement.volume = volume;
mediaElement.addEventListener('dblclick', this.toggleFullScreenVideo);
if (this.props.overlayed) {
mediaElement.addEventListener('ended', ended);
}
mediaElement.addEventListener('ended', ended);
}
}