Giter VIP home page Giter VIP logo

playr's Introduction

Playr: yet another HTML5 <video> player

License

GNU GPL

Compatibility

All major browsers.

Features

  • Easy integration
  • Multiple SubRip / WebVTT tracks support
  • Keyboard accessible
  • True fullscreen

Notes on local testing

Some browsers disable XMLHttpRequest on local files by default.

  • Opera: enable opera:config#UserPrefs|AllowFileXMLHttpRequest
  • Chrome: launch it with --allow-file-access-from-files

Usage

Just add the class name "playr_video" to your video tag:

<video src="myVideo.ext" class="playr_video">
	<track kind="subtitles" label="English Subtitles" srclang="en" src="mySubs.srt" /> // optional
</video>

WebVTT implementation

Working features:

  • Track kinds:
    • subtitles
    • captions
    • descriptions
    • chapters
  • Text position
  • Text alignment
  • Text size
  • Vertical text (incompatible with other cue settings)
  • Line position
  • Class tags
  • Cue timestamps tags

Note on cue timestamps:

00:00:17,556 --> 00:00:20,631
Can you hear it?
<00:00:18,556>The noise, <00:00:19,600>the drumbeat?

::cue:past & ::cue:future are remplaced with the CSS classes playr_cue_past & playr_cue_future. They're not defined by default. Customize them as you wish.

Keyboard

  • Tab : switch between controls
  • ↑ : volume up
  • ↓ : volume down
  • ← : rewind
  • → : forward
  • f : toggle fullscreen
  • x : delay subtitles (-500 ms)
  • c : delay subtitles (+500 ms)
  • d : default subtitles sync

Demos

See demos on the project page.

playr's People

Contributors

delphiki avatar

Stargazers

Boye avatar

Watchers

James Cloos avatar Boye avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.