UploadButton API problem

I tried to use uploadButton API to upload a video and play this video. but it is not successful. If this code is used to upload images with an image element, there is no problem. But it won’t work if you switch to uploading a video with a videoPlayer element. I use a videoplayer, a text, a uploadButton, a button to achieve the function.
The code is below. Hope to get help. Thank you.