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

Calling player.load gives error when trying to load the same WebRTC stream again after a playback error #370

Closed
Remboooo opened this issue Aug 15, 2023 · 3 comments
Assignees

Comments

@Remboooo
Copy link

Remboooo commented Aug 15, 2023

Observed with the latest Ovenplayer, i.e. 0.10.30
The flow to produce the error is as follows:

  1. Call player.load to load a WebRTC stream (it has ABR enabled, I don't know if that matters)
  2. Stop the stream server-side, causing OvenPlayer to go into 'error' state
  3. Call player.stop()
  4. Start the stream server-side again
  5. Call player.load() with the same argument
  6. Observe the following error:
Uncaught TypeError: Cannot read properties of null (reading 'id')
    at Bn.e.setCurrentQuality (WebRTCLoader.js:957:1)
    at Tn.t.load (Api.js:354:1)

The WebRTCLoader.js line in question is:

provider.setAutoQuality = (auto) => {

        sendMessage(ws, {
            command: 'change_rendition',
>>>         id: mainPeerConnectionInfo.id,
            auto: auto
        });
        autoQuality = auto;
    };

The line in Api.js is inside load():

        return initProvider();
@SangwonOh SangwonOh self-assigned this Nov 20, 2023
@SangwonOh
Copy link
Member

I'll check it out soon

SangwonOh added a commit that referenced this issue Jan 19, 2024
@IanMitchell77
Copy link

I had this problem too and .34 fixes the issue.

@SangwonOh
Copy link
Member

Fixed at af179c6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants