Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Html5 Media Player

Tech stack

  1. Vanilla JavaScript(ES6), no any other JS Library
  2. HTML5(video, progress)
  3. CSS3
  4. Fontawesome 5

Setup

git clone https://github.com/uniquejava/FSD.git
cd FSD/lab01_html5_bootstrap4
npm i -g gulp-server-livereload  # optional
livereload  # optional
Open index.html directly in Chrome browser # not recommended

Fullscreen notes

  1. requestFullControl 必须加在 video 的 parent tag 而非 video 上.
  2. exitFullscreen 是加在 document 上.
  3. 浏览器会将全屏的 element 放在 document.fullscreenElement 中,通过判断它的值来决定当前是否为全屏模式.

Credits

  1. sample videos: https://www.sample-videos.com/
  2. livereload server: https://github.com/hiddentao/gulp-server-livereload
  3. prettier

References

  1. Having custom controls still apply when go fullscreen on a HTML5 video?
  2. Html5 Full screen video
  3. How to display custom video controls even in fullscreen