0.0.0 • Published 4 years ago

@afiniti/video-player-test v0.0.0

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
4 years ago

@afiniti/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 @afiniti/video-player

Features

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

Props

NameTypeDescription
dataobjectvideo sources in specified format.
posterstringgraphcms full url.
apiUrlstringgraphcms api url.
autoplayboolAutoplay slider or not. Defaults to true
playerApimethodReturns reference to player
closeCallbackmethodAction 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 '@afiniti/video-player';
import '@afiniti/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;
0.0.0

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.0

4 years ago

0.1.1

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago