Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including videojs-video-tooltip with all npm packages installed. Try it out:

var videojsVideoTooltip = require("videojs-video-tooltip")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

videojs-video-tooltip v0.1.2

video tooltip component for video.js

Video tooltip for video.js

Introduction

HTML5 video tooltip for video.js. Hovering seek bar displays looping Media Fragment.

Note: for looping functionality is required server side partial content capability in certain browsers(Chrome)

Requirements

Installation

npm install videojs-video-tooltip

Simple example

<html>
  <head>
    <!-- Load dependent stylesheets. -->
    <link href="path/to/video-js.css" rel="stylesheet">
    <link rel="stylesheet" href="path/to/videojs.video.tooltip.css" />
  </head>

  <body>
    <video id="content_video" class="video-js vjs-default-skin"
        controls preload="auto" width="YOUR_VIDEO_WIDTH" height="YOUR_VIDEO_HEIGHT">
      <source src="PATH_TO_YOUR_CONTENT_VIDEO" type="YOUR_CONTENT_VIDEO_TYPE" />
    </video>
    <script src="/path/to/video.v6.and.newer.js"></script>
    <script src="/path/to/videojs.video.tooltip.js"></script>
    <script>
      var player = videojs("content_video");
    </script>
  </body>
</html>

Settings

height (number)
height of video thumbnail element in px. Width is calculated via aspect ratio. Default: 90

duration (number)
media fragment duration in seconds. Default: 5

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free