Closed Impre-visible closed 1 year ago
I tried something, but it doesn't work :
player.on("error", function() {
let nextSource = player.currentSources().src
let allSources = video.getElementsByTagName("source")
let nextSourceIndex = 0
for (let i = 0; i < allSources.length; i++) {
if (allSources[i].src == nextSource) {
nextSourceIndex = i + 1
}
}
console.log(nextSourceIndex)
if (nextSourceIndex < allSources.length) {
player.src(allSources[nextSourceIndex].src)
player.play()
}
})
@Impre-visible How is your stream packaged? If you are talking about 4k, I assume that you are using AV1 or HEVC. If so, you also have to use fragmented mp4 in order to transport the content. As you are most likely using fmp4 here, please tell me if you are pulling the segment as Independent segments/files or via byte-range requests?
Pulling independent segments as fmp4 (.m4s files) is currently faulty and streams are breaking quite often.
Have a look at this:
This actually break on every browser if you change the quality a couple of times and reload the page. No matter what codecs are in use, it will fail (using HEVC, AVC1 and AV1 here).
According to your actual question, VideoJS interprets the Playlist in first hand before playback, as far as I know. I'm pretty sure you cannot have further influence onto this. I'm saying this as I also had the Idea to change the content quality/playlist on error some time ago and was also not able to recover on playback ...
Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:
@video-archivist-bot save 4wGV6j
@Impre-visible How is your stream packaged? If you are talking about 4k, I assume that you are using AV1 or HEVC. If so, you also have to use fragmented mp4 in order to transport the content. As you are most likely using fmp4 here, please tell me if you are pulling the segment as Independent segments/files or via byte-range requests?
Pulling independent segments as fmp4 (.m4s files) is currently faulty and streams are breaking quite often.
Have a look at this:
This actually break on every browser if you change the quality a couple of times and reload the page. No matter what codecs are in use, it will fail (using HEVC, AVC1 and AV1 here).
According to your actual question, VideoJS interprets the Playlist in first hand before playback, as far as I know. I'm pretty sure you cannot have further influence onto this. I'm saying this as I also had the Idea to change the content quality/playlist on error some time ago and was also not able to recover on playback ...
Ok thanks, I fragment my video to multiple .ts files, I'm watching the whole content on te website in 6hours thanks.
Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:
@video-archivist-bot save lw8PMw
I will close that, I do a system where, if the user is on mobile, I remove the highest quality sources. It work fine
Description
Hi,I use
videojs-quality-selector
to be able to have multiple quality, but on Chromium mobile, there's so limitation, where we can play high quality footage, so I want to when there's an error, automatically switch to the next quality, so my question is, how can I detect an error on the player ?Reduced test case
No response
Steps to reproduce
Errors
No response
What version of Video.js are you using?
v7.20.2
Video.js plugins used.
No response
What browser(s) including version(s) does this occur with?
Chrome Mobile 107.0.5304.105
What OS(es) and version(s) does this occur with?
Android 11