1.0.11 • Published 5 years ago

shaka-react v1.0.11

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

SHAKA-REACT

About

A React wrapper around the shaka-player. I build this library specific for a client, but you can use with fit to yours needs. The player can play HLS and DASH content.

Install

yarn add shaka-react

or

npm i shaka-react

Usage

See the demo folder for implementation.

import React from "react";
import ShakaReact from "shaka-react";
import posterImg from "./poster.jpg";


const manifestUri =
  "https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd";


const onDown = (offUri: string): any => {
  console.log("TCL: offUri", offUri);
};

const onProgress = (currenTime: number) => {
  console.log("Progress: ", currenTime);
};

const onPause = (currenTime: number) => {
  console.log("Paused: ", currenTime);
};

const App = () => (
  <ShakaReact
    manifest={manifestUri}
    poster={posterImg}
    title="start"
    onDownloadEnd={onDown}
    onProgress={onProgress}
    onPause={onPause}
  />
);

export default App;

API

nametypedesc
manifeststringurl of the video source
posterstringpath or url to a image
autoPlaybooleanin some browser will depend on user permissions
titlestringthis is only used to name the offline video
1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago