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

Stop video playback on close #6661 #6678

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

Conversation

Ross-Sherlock
Copy link

First time contributor checklist:

Contributor checklist:

  • My contribution is not related to translations.
  • My commits are in nice logical chunks with good commit messages
  • My changes are rebased on the latest main branch
  • A yarn ready run passes successfully (more about tests here)
  • [] My changes are ready to be shipped to users

Description

Fixes #6661 but the timeout for IPC could be subject to change which is why I am reluctant to say my changes are ready to be shipped to users. I tried to strike a balance between responsiveness in the case that no video renderer is present and providing enough time for a response from the renderer. This timeout will likely have to be reviewed.

I manually tested my changes on Windows 11.

@ayumi-signal ayumi-signal self-assigned this Nov 20, 2023
Copy link
Contributor

@ayumi-signal ayumi-signal left a comment

Choose a reason for hiding this comment

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

@Ross-Sherlock Thank you for submitting a PR to this project. We appreciate your interest in contributing to the project. I did an initial review, and it will be difficult to merge this PR as is.

  1. The overall logic and state management has some issues. This PR has added an IPC handler directly into the component, whereas IPC handlers should dispatch to update Redux state, and then state should flow back into the component. In this case the existing playback behavior is isolated to the Lightbox component. To fix this original issue we may need to add to the redux store the Lightbox media playback state and have the Lightbox component observe that state then change its playback based on that. Then we can update the redux store via IPC handler to get the desired functionality. The IPC handler should not live in the component. (For an example check the IPC event 'stop-screen-share').

  2. The code added runs on every window close including full app shutdown, but this issue is isolated to pressing X which minimizes the app. The issue does not exist when fully shutting down the app, so we do not need to run unnecessary logic in that case.

  3. The code has typos and also removes helpful comments which exist. Furthermore there's "todo" decisions like the timeout, these do not belong in the code comments but instead in this PR description. Please take care.

In general, to expedite PR review it is helpful first to formulate the plan before doing any coding, then go to the original issue and ask us to confirm the plan. This is important for issues which involve state.

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.

Video playback does not stop when SIgnal window is closed
2 participants