0.2.6 • Published 3 years ago
hcode-player v0.2.6
Hcode Player with React and Material UI
Video Player Component made with React and @material-ui/core by Hcode.
Installation
npm install hcode-player
or yarn
yarn add 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
0.2.6
3 years ago
0.2.5
3 years ago
0.2.4
3 years ago
0.2.3
3 years ago
0.2.1
4 years ago
0.1.16
4 years ago
0.2.2
4 years ago
0.1.14
4 years ago
0.1.15
4 years ago
0.1.10
4 years ago
0.1.11
4 years ago
0.1.12
4 years ago
0.1.13
4 years ago
0.1.8
4 years ago
0.1.9
4 years ago
0.1.7
4 years ago
0.1.6
4 years ago
0.1.5
4 years ago
0.1.4
4 years ago
0.1.3
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.0.4
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago