Handle unsupported video codec (e.g. H.265)

This commit is contained in:
Mathias Rasmussen
2016-05-22 23:23:45 +02:00
parent f7b46336fd
commit 56d802f741

View File

@@ -129,6 +129,9 @@ function renderMedia (state) {
if (video.webkitVideoDecodedByteCount > 0 &&
video.webkitAudioDecodedByteCount === 0) {
dispatch('mediaError', 'Audio codec unsupported')
} else if (state.playing.type === 'video' &&
video.webkitVideoDecodedByteCount === 0) {
dispatch('mediaError', 'Video codec unsupported')
} else {
video.play()
}