npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

xhtml-video

v0.0.3-dev

Published

xhtml-video intends to be an accessible, lightweight and a design-agnostic video player for xhtml. The main purpose of this project was to offer a way to use video player capabilities of modern browsers on xHtml documents

Downloads

9

Readme

xhtml-video Code Climate

A jQuery plugin to use object based video instead of html5 tags

Description

xhtml-video intends to be an accessible, lightweight and a design-agnostic video player for xhtml. The main purpose of this project was to offer a way to use video player capabilities of modern browsers on xHtml documents

It's simple, accessible and can be used with strict xHtml pages.

How to use it

In a web page, just include jquery.js then the jquery.xhtml-video.js file.

xhtml-video is intended to be applied on object tags.

Here is an example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
  <head>
    <title>video</title>

    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />

    <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="jquery.xhtml-video.js"></script>
    <script type="text/javascript">
        $(function(){
            $('object[type="video/ogg"]').xhtmlvideo();
            $('object[type="video/quicktime"]').xhtmlvideo();
        });
    </script>
  </head>
  <body>
    <div>
      <object type="video/ogg" data="/video/big_buck_bunny_480p_stereo.ogv" width="854" height="480">
        <p><a type="video/ogg" href="/video/big_buck_bunny_480p_stereo.ogv">download this video</a></p>
      </object>
      <object type="video/quicktime" data="/video/big_buck_bunny_480p_h264.mov" width="854" height="480">
        <p><a type="video/quicktime" href="/video/big_buck_bunny_480p_h264.mov">download this video</a></p>
      </object>
    </div>
  </body>
</html>

So here is the deal:

  • If the browser is able to read the file by itself, object tag is replaced by an img tag. One click on the image will play the video, an other click will pause it.
  • If the browser can't read it by itself but has a plugin to do that... it will probably launch it.
  • If the browser can't read the file, it will download it. So you can read it in your favorite media player