Skip to content

Instantly share code, notes, and snippets.

View vazbloke's full-sized avatar

Aditya Manoharan vazbloke

View GitHub Profile
@vazbloke
vazbloke / VideoPlayer.tsx
Created June 16, 2020 14:10
A Video JS component in React, using hooks
import * as React from 'react';
import { useState, useEffect, useRef } from 'react';
import videojs from 'video.js';
import 'video.js/dist/video-js.min.css';
interface PlayerProps {
src: string;
type: string;
}