1.0.1 • Published 5 years ago

react-hooks-jwplayer v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

JW Player React Hook

This is a very simple implementation of JW Player with React hooks.

example:

import React, { useRef } from "react";
import useJWPlayer from "react-hooks-jwplayer";

function JWPlayer({ libraryId, playerId, config }) {
  const playerRef = useRef(null);

  useJWPlayer({ playerRef, libraryId, mediaId, ...config });

  return <div ref={playerRef} />;
}