Disable "switch optimized-auto to original" for now.
It might be a user option in the future.
This commit is contained in:
parent
257011b62d
commit
dca6c2ebf8
1 changed files with 11 additions and 7 deletions
|
@ -33,6 +33,8 @@ import { lastBandwidthSelector } from './internal/plugins/videojs-http-streaming
|
|||
// const PLAY_TIMEOUT_LIMIT = 2000;
|
||||
const PLAY_POSITION_SAVE_INTERVAL_MS = 15000;
|
||||
|
||||
const USE_ORIGINAL_STREAM_FOR_OPTIMIZED_AUTO = false;
|
||||
|
||||
type Props = {
|
||||
position: number,
|
||||
changeVolume: (number) => void,
|
||||
|
@ -384,13 +386,15 @@ function VideoViewer(props: Props) {
|
|||
player.on('loadedmetadata', () => restorePlaybackRate(player));
|
||||
|
||||
// Override "auto" to use non-vhs url when the quality matches.
|
||||
player.on('loadedmetadata', () => {
|
||||
const vhs = player.tech(true).vhs;
|
||||
if (vhs) {
|
||||
// https://github.com/videojs/http-streaming/issues/749#issuecomment-606972884
|
||||
vhs.selectPlaylist = lastBandwidthSelector;
|
||||
}
|
||||
});
|
||||
if (USE_ORIGINAL_STREAM_FOR_OPTIMIZED_AUTO) {
|
||||
player.on('loadedmetadata', () => {
|
||||
const vhs = player.tech(true).vhs;
|
||||
if (vhs) {
|
||||
// https://github.com/videojs/http-streaming/issues/749#issuecomment-606972884
|
||||
vhs.selectPlaylist = lastBandwidthSelector;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// used for tracking buffering for watchman
|
||||
player.on('tracking:buffered', doTrackingBuffered);
|
||||
|
|
Loading…
Reference in a new issue