Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Fix audio component #8956

Merged
merged 2 commits into from
Oct 3, 2023
Merged

Fix audio component #8956

merged 2 commits into from
Oct 3, 2023

Conversation

CITIZENDOT
Copy link
Collaborator

@CITIZENDOT CITIZENDOT commented Oct 2, 2023

Summary

🤖 Generated by Copilot at f9d41d0

Improved media node editing and playback performance. Fixed a bug that caused media elements to re-render when changing tracks, and added more error handling for the media node editor component.

References

closes #insert number here

Explanation

🤖 Generated by Copilot at f9d41d0

  • Import useOptionalComponent function to access optional MediaElementComponent on media entities (link)
  • Use useOptionalComponent instead of useComponent to assign element variable and avoid errors (link)
  • Check if element is defined before calling setTime on it in reset function (link)
  • Remove media.track dependency from useEffect hook in MediaReactor function to prevent unnecessary re-rendering of media element (link)

🤖 Generated by Copilot at f9d41d0

Sing, O Muse, of the skillful coder who refined
the media reactor function, and freed it from the chain
of media.track, that swift and changing property
that caused the media element to render oft in vain.

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

Checklist

  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • ensure all checks pass
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewers

Copy link
Collaborator

@aditya-mitra aditya-mitra left a comment

Choose a reason for hiding this comment

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

If we can add some vertical margin between the pause and reset buttons, it would look nice

image

Otherwise, it looks good to me

@HexaField
Copy link
Member

If we can add some vertical margin between the pause and reset buttons, it would look nice

image

Otherwise, it looks good to me

we should also put them on the same line, they take up a lot of room

@CITIZENDOT
Copy link
Collaborator Author

image

@speigg speigg enabled auto-merge October 3, 2023 19:15
@speigg speigg added this pull request to the merge queue Oct 3, 2023
Merged via the queue into dev with commit e51f673 Oct 3, 2023
12 of 13 checks passed
@speigg speigg deleted the broken-audiocomponent branch October 3, 2023 19:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants