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_TIMEOUT_LIMIT = 2000;
|
||||||
const PLAY_POSITION_SAVE_INTERVAL_MS = 15000;
|
const PLAY_POSITION_SAVE_INTERVAL_MS = 15000;
|
||||||
|
|
||||||
|
const USE_ORIGINAL_STREAM_FOR_OPTIMIZED_AUTO = false;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
position: number,
|
position: number,
|
||||||
changeVolume: (number) => void,
|
changeVolume: (number) => void,
|
||||||
|
@ -384,6 +386,7 @@ function VideoViewer(props: Props) {
|
||||||
player.on('loadedmetadata', () => restorePlaybackRate(player));
|
player.on('loadedmetadata', () => restorePlaybackRate(player));
|
||||||
|
|
||||||
// Override "auto" to use non-vhs url when the quality matches.
|
// Override "auto" to use non-vhs url when the quality matches.
|
||||||
|
if (USE_ORIGINAL_STREAM_FOR_OPTIMIZED_AUTO) {
|
||||||
player.on('loadedmetadata', () => {
|
player.on('loadedmetadata', () => {
|
||||||
const vhs = player.tech(true).vhs;
|
const vhs = player.tech(true).vhs;
|
||||||
if (vhs) {
|
if (vhs) {
|
||||||
|
@ -391,6 +394,7 @@ function VideoViewer(props: Props) {
|
||||||
vhs.selectPlaylist = lastBandwidthSelector;
|
vhs.selectPlaylist = lastBandwidthSelector;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// used for tracking buffering for watchman
|
// used for tracking buffering for watchman
|
||||||
player.on('tracking:buffered', doTrackingBuffered);
|
player.on('tracking:buffered', doTrackingBuffered);
|
||||||
|
|
Loading…
Reference in a new issue