Skip to content

A react component that creates a trackable video embed

Notifications You must be signed in to change notification settings

chronick/trackable-video

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trackable Video

This is a react component that creates an embedded iframe video, and provides callbacks for various events in the video lifecycle. This is useful if you want to hook in custom analytics, for example. https://www.npmjs.com/package/trackable-video

Currently only works for Vimeo embeds.

Usage

  <TrackableVideo
    src="https://player.vimeo.com/video/196683500"
    onReady={() => console.log('vimeo:ready')}
    onStart={() => console.log('vimeo:started')}
    onPause={() => console.log('vimeo:paused')}
    onProgress={(progress) => console.log('vimeo:progress', progress)}
    onFinish={() => console.log('vimeo:finished!')}
  />

Installation

npm install trackable-video

or

yarn add trackable-video

About

A react component that creates a trackable video embed

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published