项目作者: VictorFranco

项目描述 :
A custom video player using vanilla JS
高级语言: JavaScript
项目地址: git://github.com/VictorFranco/Custom-video-player.git
创建时间: 2020-08-11T15:36:27Z
项目社区:https://github.com/VictorFranco/Custom-video-player

开源协议:

下载


Custom-video-player

Javascript

HTML video tag has default controls that we can’t change, fortunately the tag can be modified with javascript and we can add controls with html as well as use css styles.

This program was designed to manage multiple videos and it only needs the structure html to work. In addition, the user can control the video using the keyboard.

Screenshots

The video player has basic controls with some style

It also has a current time indicator and a tooltip

The volume control looks like this

When the width is lower than 400px looks like this

HTML Structure

  1. <div class="video">
  2. <video src=""></video>
  3. <div class="controls">
  4. <div class="play_pause" tabindex="0"></div>
  5. <div class="line" tabindex="0">
  6. <div class="circle"></div>
  7. <div class="counter">00:00</div>
  8. </div>
  9. <div class="time"><span class="current_time">00:00</span> / <span class="duration"></span></div>
  10. <div class="vol">
  11. <div class="btn_volume" tabindex="0">🔊</div>
  12. <div class="content_volume">
  13. <div class="volume line" tabindex="0">
  14. <div class="circle"></div>
  15. <div class="counter counter_s"></div>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="full_screen" tabindex="0"></div>
  20. </div>
  21. </div>

LICENSE

GPLv3.0