Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Videojs player stopped working for few proxies after ipad os update from 16 to 18. #8975

Open
Ravitejvr11 opened this issue Feb 5, 2025 · 2 comments
Labels
needs: more info Please make enough detailed information is added to be actionable. needs: reduced test case A reproducible test case is needed. See https://stackoverflow.com/help/minimal-reproducible-example

Comments

@Ravitejvr11
Copy link

I am using videojs player to play my hls m3u8 proxies, and there was no issue with ipad os 16, after i upgraded it to 18, i started getting this warning -> [Warning] VIDEOJS: – "WARN:" "Problem encountered with playlist 0-https://coludfront.m3u8/. Trying again since it is the only playlist."

After this warning logs, the player just freeze's and even the source is not loaded into player. This issue doesn't exist in mac safari and iphone safari with latest os.

Copy link

welcome bot commented Feb 5, 2025

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@mister-ben mister-ben added needs: reduced test case A reproducible test case is needed. See https://stackoverflow.com/help/minimal-reproducible-example needs: more info Please make enough detailed information is added to be actionable. labels Feb 5, 2025
@Ravitejvr11
Copy link
Author

Ravitejvr11 commented Feb 6, 2025

I am using videojs version 8.17.4,

private async buildSource(): Promise<void> { this._player.src({ src: this._source.proxy, type: this._source.type ? this._source.type : 'application/dash+xml', keySystems: { 'com.widevine.alpha': { url: this._source.laUrl, audioContentType: 'audio/webm; codecs="vorbis"', videoContentType: 'video/webm; codecs="vp9"', licenseHeaders: this._source.licenseHeaders } } }); this._player.load(); }
this is how i build the source, and the affected source has 'https://coludfront-url.m3u8' and type as 'application/vnd.apple.mpegurl',

and this is how i initialise player

` private async initializePlayer(overrideNative: boolean): Promise {
const isSafariBrowser = this.browser === 'Safari';
const isIpadOrAndroid =
this.deviceDetectorService.device === 'iPad' ||
this.deviceDetectorService.device === 'Android';
const poster = this.thumbnail;
const options = {
responsive: true,
fluid: true,
bigPlayButton: true,
controls: true,
playbackRates: this.playbackRates,
controlBar: {
remainingTimeDisplay: false,
currentTimeDisplay: true,
durationDisplay: true,
progressControl: true,
children: [
'playToggle',
'playbackRateMenuButton',
'currentTimeDisplay',
'progressControl',
'durationDisplay',
'volumePanel',
'fullscreenToggle',
'subsCapsButton'
],
skipButtons: {
forward: 5,
backward: 5
}
},
poster: poster,
html5: {
vhs: {
overrideNative: isIpadOrAndroid
? isIpadOrAndroid
: overrideNative && isSafariBrowser // for safari which uses native hls calls.
}
}
};

    this._player = videojs(
        this.videoContainerElement.nativeElement,
        options
    );

    /*
        For safari eme is not required since the calls are native.
    */
    if (typeof this._player.eme === 'function' && !isSafariBrowser) {
        try {
            this._player.eme();
        } catch (error) {
            console.log(error);
        }
    }

    this._player.hotkeys({
        volumeStep: 0.1,
        seekStep: 5,
        enableModifiersForNumbers: false,
        customKeys: {
            // "J" rewindKey by 5 seconds
            rewindKey: {
                key: (event: KeyboardEvent) => {
                    if (event.key === 'j' || event.which === 74) {
                        event.preventDefault();
                        return true;
                    }
                    return false;
                },
                handler: (player: any) => {
                    player.currentTime(player.currentTime() - 5); // Rewind by 5 seconds
                }
            },
            // "K" Key: Toggle Play/Pause
            playPauseKey: {
                key: (event: KeyboardEvent) => {
                    if (event.key === 'k' || event.which === 75) {
                        event.preventDefault();
                        return true;
                    }
                    return false;
                },
                handler: (player: any) => {
                    if (player.paused()) {
                        player.play();
                    } else {
                        player.pause();
                    }
                }
            },
            // "L" Key: Fast-forward by 5 seconds
            fastForwardKey: {
                key: (event: KeyboardEvent) => {
                    if (event.key === 'l' || event.which === 76) {
                        event.preventDefault();
                        return true;
                    }
                    return false;
                },
                handler: (player: any) => {
                    player.currentTime(player.currentTime() + 5); // Fast-forward by 5 seconds
                }
            }
        }
    });
    this.initialiseSmpteController();

    // To register player events after the player is initialized.
    Object.entries(this.eventMappings).forEach(
        ([videoJsEvent, { handler }]) => {
            this._player.on(videoJsEvent, handler);
        }
    );
}`

After this warning from ipad (os 18)
"WARN:" "Problem encountered with playlist 0-https://coludfront.m3u8/. Trying again since it is the only playlist."
The player doesn't even load the source.
The exact same source plays well in iphone (os 18) and even in mac. This issue was not present when the ipad had os 16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: more info Please make enough detailed information is added to be actionable. needs: reduced test case A reproducible test case is needed. See https://stackoverflow.com/help/minimal-reproducible-example
Projects
None yet
Development

No branches or pull requests

2 participants