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: Add playback click event handling in WebEngineView #423

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ptfpinho23
Copy link

@ptfpinho23 ptfpinho23 commented Nov 24, 2024

Summary

Addresses the issue where playback controls - play & pause - were not working in the stremio desktop apps. The problem - as stated in the issue - stems from click events on the <video> element not being propagated correctly within WebEngineView QML.

Changes made:

  • attach click event listeners onto embedded video element to control playback
  • add observer to dynamically reapply listeners, whenever DOM updates/changes
  • wrap shellEvents.emit to reapply listeners on availabilityChanged
  • Improve error handling to prevent attaching duplicate attachments

Testing Steps

  1. Open the app & load a video
  2. Click on the vidoe & verify playback toggles (pause/play)

fix - #422

- attach click event listeners onto embedded video element to control playback
- add observer to dynamically reapply listeners, whenever DOM updates/changes
- wrap `shellEvents.emit` to reapply listeners on `availabilityChanged`
- Improve error handling to prevent attaching duplicate attachments
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

Successfully merging this pull request may close these issues.

1 participant