Apply review changes
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user