aws-samples / aws-samples/amazon-ivs-player-web-sample

"Method called on deleted player instance" warning when using IVSQualityPlugin

Open
#9 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
90
Forks
38
PR merge metrics
No merged PRs in 30d

Description

### [Minimal Reproduction](https://codesandbox.io/s/adoring-dawn-edecv)

-----

### Description

When using the IVSQualityPlugin, any attempt to `.dispose()` of the videojs instance (for example, in the cleanup function of a React component) will trigger a console warning "Method called on deleted player instance". This is because the IVS Quality Plugin is attempting to unregister its event handlers after the IVS `core` is already disposed:

image

image

This is confusing for implementors, because they may think mistakenly that they've made an implementation error and somehow kept around an old instance of the player, which might lead to a memory leak. In fact, there is no error and the disposal completed successfully.

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox minimal reproduction and the React cleanup function that calls videojs.dispose(); trace the IVSQualityPlugin teardown relative to disposal of the IVS core. Done means player cleanup completes without the “Method called on deleted player instance” warning. The payload names no repository file or test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.