feat: export racing bar animation as video#743
feat: export racing bar animation as video#743l1tok wants to merge 5 commits intohypertrons:masterfrom
Conversation
715593f to
f66a485
Compare
tyn1998
left a comment
There was a problem hiding this comment.
Hello @lhbvvvvv, I cannot solve the canvas is not origin-clean error at the moment. It is an issue that not easy to circumvent.
However, I refactored the code in a React way, which may help you be more familiar with the React world.
This PR may linger for a while until we find a solution.
| <button | ||
| className="perceptor-button" | ||
| onClick={mediaControlersRef.current?.play} | ||
| > | ||
| {getMessageByLocale( | ||
| 'component_projectRacingBar_ReplayButton', | ||
| options.locale | ||
| )} | ||
| </button> | ||
| <button | ||
| className="perceptor-button" | ||
| onClick={mediaControlersRef.current?.startRecording} | ||
| > | ||
| Start Recording | ||
| </button> | ||
| <button | ||
| className="perceptor-button" | ||
| onClick={mediaControlersRef.current?.stopRecording} | ||
| > | ||
| Stop Recording | ||
| </button> |
There was a problem hiding this comment.
@lhbvvvvv @andyhuang18
This is a way to control the child component in its parent component. Here I use forwardRef and useImperativeHandle to let the parent component use the media player controllers provided by its child component. I think this is a great example to help you get familiar with React :)
cc @wxharry
There was a problem hiding this comment.
Thank you for your guidance~ Through this example I can better understand the control between components.
There was a problem hiding this comment.
Compared to my previous code has definitely improved. Thanks for your guidance.
Brief Information
This pull request is in the type of (more info about types):
Related issues (all available keywords):
Details
Implement the function of exporting racing bar animation as video.
Checklist
Others