Skip to content

One file drop-in video player web app for using video files served using basic directory listing

License

Notifications You must be signed in to change notification settings

WASDHarrison/player.html

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

player.html

One file drop-in video player web app for using MP4 video files served using basic directory listing.

player.html in action player.html on all of your devices

Usage

player.html is designed to be a drop-in video player that does not require any configuration or other files.

To use it, copy the ./src/player.html file into a folder that is served over HTTP using the web server's folder listing functionality. player.html basically uses the folder listing as an API for enumerating the files and folders. It should work with almost any web server, but it has only been tested against NGINX, Apache, and IIS.

Supported features

  • Only 1 file with zero external dependencies
  • SVG images are inlined
  • May be installed as a PWA (Progressive Web App) app. Dynamically generated inline data URI manifest file.
  • Playback of MP4, M4V, MOV, MKV, WEBM, and OGG files using the browser video engine
  • Support for loading external SRT and VTT subtitle files
  • Shareable URL that will load player.html in the same folder location, and video position
  • Custom video playback controls (fullscreen, play, pause, mute, etc, volume, playback rate)
  • Progress bar with timestamp preview thumbnail on hover
  • Video thumbnail generation, with concurrency configuration (default 1)*
  • Thumbnail caching using localStorage
  • Select your own custom theme color
  • Social media metadata (og:\*, twitter:\*)
  • Video file metadata (bitrate, resolution, etc)
  • Keyboard shortcuts (press ? to see the list)
  • Paste and Play: just do CTRL+V to play the video URL that you currently have in the clipboard
  • Support for playing videos directly from onedrive OneDrive and gdrive Google Drive. You must supply the appropriate keys in the app.options.cloud AND register your app with Microsoft and/or Google. Instructions are in the code. player.html also must be served over HTTPS for the Microsoft and Google auth flows to work. Remix this Glitch to easily check it out over HTTPS with your own API keys.

* Be careful with concurrency. Increasing the setting above 1 does make it generate thumbnails much faster. But it is very easy for HTTP requests for generating thumbnails to saturate a connection enough that the main video gets starved for bandwidth. Especially if you browse into a folder with many dozens of videos in it.

Supported Browsers

The latest version of these browsers is supported:

  • Edge (Chromium)
  • Edge (Xbox EdgeHTML)†
  • Firefox
  • Safari (Mac, iPadOS, iOS)
  • Chrome

† EdgeHTML is only supported on Xbox as it has been replaced on Windows 10. It will still probably work with the Windows 10 EdgeHTML but it is untested.

Supported Web Servers

The latest version of these web servers (others may work as well):

Other

  • player.html uses `folder.api to consume HTTP directory listings like an API
  • player.html uses `video-thumbnail.js to render thumbnails from video file URLs

License

© 2021 Paul Ellis

About

One file drop-in video player web app for using video files served using basic directory listing

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 100.0%