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

Issue with Fullscreen Change Event Handling on iOS Leading to TypeError: Cannot Read Properties of Undefined #144

Open
bissaye opened this issue Jul 5, 2024 · 1 comment

Comments

@bissaye
Copy link

bissaye commented Jul 5, 2024

Description

There is an issue with the VgFullscreenApiService in the videogular-ngx-videogular-core.mjs file, specifically related to the handling of the fullscreen change event on iOS. When the polyfill for webkitendfullscreen is used, the code attempts to access this.medias.toArray()[0].elem, which can be undefined and leads to a TypeError: Cannot read properties of undefined. This issue causes the application to crash on iOS devices when attempting to enter or exit fullscreen mode.

Expected Behavior

The fullscreen change event should be handled correctly on iOS devices without causing any errors. The application should be able to enter and exit fullscreen mode smoothly.

Actual Behavior

On iOS devices, the application crashes with the error TypeError: Cannot read properties of undefined (reading 'elem') when attempting to handle the fullscreen change event.

Steps to Reproduce

  1. Set up a project with Videogular and ensure it is running on iOS (Safari or a web view).
  2. Implement a fullscreen functionality using Videogular.
  3. Attempt to enter or exit fullscreen mode on an iOS device.
  4. Observe the error in the console: TypeError: Cannot read properties of undefined (reading 'elem').
@ShivendraKadam
Copy link

Did you find any solutions about this because i am also stuck due to this issue

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

2 participants