0.2.6 • Published 2 years ago

hcode-player v0.2.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Hcode Player with React and Material UI

GitHub license npm version

Video Player Component made with React and @material-ui/core by Hcode.

Installation

npm install hcode-player

or yarn

yarn add hcode-player

Demo

Player Screenshot

Edit hcode-player demo

Usage

Basic use:

import React from 'react';
import { HPlayer } from 'hcode-player';

const App = () => {
  return (
    <HPlayer url="https://d2z8nku95gg9lc.cloudfront.net/IN04_CS_Cores_720.mp4">
  );
};

export default App;

Player with multiple video resolutions:

import React, { useState } from "react";
import { HPlayer } from 'hcode-player';

const App = () => {

  const [sources, setSources] = useState([
    {
      url: 'https://d2z8nku95gg9lc.cloudfront.net/IN04_CS_Cores_1080.mp4',
      resolution: '1080p',
    },{
      url: 'https://d2z8nku95gg9lc.cloudfront.net/IN04_CS_Cores_720.mp4',
      resolution: '720p',
    },{
      url: 'https://d2z8nku95gg9lc.cloudfront.net/IN04_CS_Cores_360.mp4',
      resolution: '360p',
    }
  ]);

  return (
    <HPlayer url={sources}>
  );
};

export default App;

With autoplay:

import React from 'react';
import { HPlayer } from 'hcode-player';

const App = () => {
  return (
    <HPlayer autoPlay={true} url="https://d2z8nku95gg9lc.cloudfront.net/IN04_CS_Cores_720.mp4">
  );
};

export default App;

Locale:

import React from 'react';
import { HPlayer, HPlayerLocale } from 'hcode-player';

const locale: HPlayerLocale = {
  quality: 'Qualidade';
  playbackSpeed: 'Reprodução';
}

const App = () => {
  return (
    <HPlayer autoPlay={true} url="https://d2z8nku95gg9lc.cloudfront.net/IN04_CS_Cores_720.mp4" locale={locale}>
  );
};

export default App;

License

This project is licensed under the terms of the MIT license.

Sponsoring

Hcode Treinamentos hcode.com.br

0.2.6

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.1

3 years ago

0.1.16

3 years ago

0.2.2

3 years ago

0.1.14

3 years ago

0.1.15

3 years ago

0.1.10

3 years ago

0.1.11

3 years ago

0.1.12

3 years ago

0.1.13

3 years ago

0.1.8

3 years ago

0.1.9

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago