JSPM

  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q97704F
  • License MIT

React component for parallax slider for videos and images

Package Exports

  • @afiniticom/video-player

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@afiniticom/video-player) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@afiniticom/video-player

Description

React video player module built for vimeo and graph cms bases videos.

Note

This is a work in progress, not ready for production yet. Your feedback would be appreciated, custom features can also be requested. Only meant for within organization private usage.

Installation

npm i @afiniticom/video-player

Features

  • Chapters
  • Bookmarks
  • Play/pause/mute full control over the player

Props

Name Type Description
data object video sources in specified format.
poster string graphcms full url.
apiUrl string graphcms api url.
autoplay bool Autoplay slider or not. Defaults to true
playerApi method Returns reference to player
closeCallback method Action to perform on video close button

Example Usage

The package can be integrated inside a react component as follows:

import React from 'react';
import VideoPlayer from '@afiniticom/video-player';
import '@afiniticom/video-player/main.css';

const myVideoPlayer = ({ autoplay }) => {
  return (
    <VideoPlayer
      apiUrl="https://api-euwest.graphcms.com/v1/sdkasndkasndknas/master"
      slug="welcome-home"
      closeCallback={() => {
        setShowVideo(false);
      }}
      autoplay={autoplay}
    />
  );
};

export default myVideoPlayer;