comment out redirect handling for transcoded streams

This commit is contained in:
Sean Yesmunt 2021-01-06 16:22:08 -07:00
parent 09decf796a
commit d92f6d3e18

View file

@ -311,10 +311,10 @@ export default React.memo<Props>(function VideoJs(props: Props) {
// $FlowFixMe
containerRef.current.appendChild(wrapper);
fetch(source).then(response => {
if (response && response.redirected && response.url && response.url.endsWith('m3u8')) {
videoJsOptions.sources[0].type = 'application/x-mpegURL';
}
// fetch(source).then(response => {
// if (response && response.redirected && response.url && response.url.endsWith('m3u8')) {
// videoJsOptions.sources[0].type = 'application/x-mpegURL';
// }
player = videojs(el, videoJsOptions, () => {
if (player) {
@ -337,7 +337,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
player.on('fullscreenchange', () => document.activeElement && document.activeElement.blur());
window.addEventListener('keydown', handleKeyDown);
});
// });
return () => {
window.removeEventListener('keydown', handleKeyDown);