CIS465 Lab Assignment 1 Creating a Customized Video Playback
Total Page:16
File Type:pdf, Size:1020Kb
CIS465 Lab Assignment 1 SS Chung Creating a Customized Video Playback Controller in HTML5/XHTML The HTML5/XHTML video element (as defined in Document Object Model (DOM)) provides methods, properties, and events that you can use to control playback video files with JavaScript in your presentation on your webpage. In the Lab1, you are creating your own video playback controller in html with java script on a webpage using video element in Html5/Xhtml. The HTML5 video element gets you started using video elements on your webpages. With the addition of JavaScript, you can programmatically create custom playback controls, get and set the current playing position, and change the current video by using some of the basic methods and properties that you can use to control your video object. The HTML5 video element has its own built-in controls to play, pause, and seek the video playback. You can create your own customized controller by using the play and pause methods to start and stop the video, the currentTime property to seek within the video, and the paused property to get the current playing state of the video player. Useful Resource Site for more on video element. Video Element Object Implement your own Video Playback Controller on a Webpage using <video> element and java script with the Following Controlling Buttons: 1. Play (>) 2. Pause (|| ) : 3. Restart (|>) 4. Forward with interval value 10 (>>) 5. Rewind with interval value -10 (<<) Extra Points: Make Button 1 as follow: 1. Play (>) with toggled Pause (||) : If currently playing, show “Pause” Else, show “Play” Notes: 1. For this lab, you need a web browser with XHTML and HTML5 (IE9 or higher, Chrome, Firefox) 2. You are not supposed to use element <embed> with controller attribute for this lab1. 3. You can use your own video file in mp4. If you don’t have mp4 file, download a sample mp4 file on the class webpage. 4. Submit the followings: DO NOT SUBMIT your Video File on Blackboard ! 1) Your HTML source code in doc file and your executable html file 2) Lab 1 Output in doc file showing all the screen captures of each button execution of your video. (See the Lab1 example output on the class webpage) Sample Customized Video Player .