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

fix(FEC-14289): Player v7 | Player doesn't recover well after network disconnection #914

Closed

Conversation

roeedean
Copy link
Contributor

@roeedean roeedean commented Feb 1, 2025

Description of the Changes

After player had network disconnection error and user clicked on 'Try Again', player should be destroyed and we should setup a new player before using loadMedia.

Related PR: kaltura/playkit-js-ui#978

Resolves FEC-14289

@roeedean roeedean changed the title FEC-14289-player-should-recover-after-disconnection-bug fix(FEC-14289): Player v7 | Player doesn't recover well after network disconnection Feb 1, 2025
*/
function createKalturaPlayerContainer(targetId: string): string {
function createKalturaPlayerContainer(options: PartialKPOptionsObject): string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain why this was needed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before destroying the old player we save his config.
when we are doing player.setup again after destroying the old player, we need access to the "options.ui.targetId" from the config.
we are creating a new player with the same config as the old one, so we need is element id to be the same.
if we won't use the old element id "options.ui.targetId", it will create the new player with unmatched element id which will cause errors later in the process of the player.setup.

@roeedean roeedean closed this Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants