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

Improve resize listener with the loadedmetadata event in DailyVideo #11

Closed
wants to merge 2 commits into from

Commits on Jan 10, 2023

  1. Improve resize listener with the loadedmetadata event in DailyVideo

    The current `onResize` callback may not fire on initial load. Since it
    relies on React’s render timing (using a combination of `useEffect` and
    `requestAnimationFrame`) instead of events on the video, the video
    stream may not be loaded in time for the initial `handleResize()` call.
    
    React has built-in support for `onResize` and `onLoadedMetadata` on
    `video` elements. This commit ditches the custom resize listener defined
    in `useEffect` in favor of these supported properties.
    rileyjshaw committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    a975c6a View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2023

  1. Use custom event handlers rather than React synthetic events

    This preserves support for React versions below v18.
    rileyjshaw committed Jan 11, 2023
    Configuration menu
    Copy the full SHA
    12177ca View commit details
    Browse the repository at this point in the history