This week I completed development of the video streaming server using Node.js and express. The video server sends 1MB chunks of the video to the front end through the response object. The browser then renders this chunk of video and displays it in an HTML video element.
The server also allows for users to scrub through the video and only sends the required chunk of video that needs to be streamed. This range that the user requests is in the request header sent from the browser and is read in the backend to determine what number of bytes need to be sent back to the browser. The next steps will be to integrate MongoDB so that the web server can act as a database server which holds multiple video files. Through my research I found out that MongoDB stores “pages” of data and thus video files would need to be broken down into several chunks of these pages.