Apply review changes

This commit is contained in:
hicom150
2019-10-07 17:54:36 +02:00
parent 3d85803df9
commit f5e186dc67

View File

@@ -54,14 +54,13 @@ function renderMedia (state) {
mediaElement.pause() mediaElement.pause()
} else if (!state.playing.isPaused && mediaElement.paused) { } else if (!state.playing.isPaused && mediaElement.paused) {
mediaElement.play() mediaElement.play()
.then(() => { .then(
dispatch('mediaSuccess') () => dispatch('mediaSuccess'),
}) (err) => {
.catch((err) => { console.error(`Error playing mediaElement: ${err.name}`)
if (err.name === 'NotSupportedError') {
dispatch('mediaError', 'Codec unsupported') dispatch('mediaError', 'Codec unsupported')
} }
}) )
} }
// When the user clicks or drags on the progress bar, jump to that position // When the user clicks or drags on the progress bar, jump to that position
if (state.playing.jumpToTime != null) { if (state.playing.jumpToTime != null) {