From the course: Building a Video Transcriber with Node.js and Google AI Speech-To-Text API
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
Adding the video upload functionality
From the course: Building a Video Transcriber with Node.js and Google AI Speech-To-Text API
Adding the video upload functionality
- [Instructor] In this video, we're going to be scripting our video selection and preview functionality. This will ensure that once the user selects a video to be transcribed, that video is loaded into the preview and can be played back. Let's begin by targeting all the elements in our page, using their IDs, and saving the undos to this element into variables. Scroll down to the custom JavaScript section and begin. We start with our upload widget by saying const video upload equals document dot get element by ID and set it to the value of the ID of our video upload widget, which is also video upload. Now let's just repeat this for our video preview transcribe button and where our transcription text is going to be displayed. With all this in place, we now have handles to all our page elements. Next, let us create another variable, and this time we'll be creating a variable that's going to hold the selected file. For now…