2022-04-10 21:57:04 +03:00
2022-04-10 21:57:04 +03:00
2022-04-10 21:57:04 +03:00
2022-04-10 15:53:04 +03:00
2022-04-10 14:00:52 +03:00
2022-04-10 15:21:27 +03:00
2022-04-10 15:21:27 +03:00
2022-04-10 16:26:18 +03:00
2022-04-10 15:24:44 +03:00

RTSPtoWEBPlayer

external video player for projects:

there is no GUI in this project, you can add your own GUI

demo page

Install

git clone https://github.com/vdalex25/RTSPtoWEBPlayer.git

cd RTSPtoWEBPlayer

npm install

npm run build

it's created compiled file dist/RTSPtoWEBPlayer.js

Usage

Add script to your page

<script src="dist/RTSPtoWEBPlayer.js"></script>

Create new player

const options={
    parentElement: document.getElementById('player')
};
const player=new RTSPtoWEBPlayer(options);
player.load('ws://localhost:8083/stream/517fe9dbf4b244aaa0330cf582de9932/channel/0/mse?uuid=517fe9dbf4b244aaa0330cf582de9932&channel=0');

Options

options={
        parentElement:null,
        source:null,
        controls:true,
        muted:true,
        autoplay:true,
        loop:false,
        hlsjsconfig: {

        }
    }

parentElement

default: null

HTMLElement

source

link to mediasource. requires explicit protocol http/https or ws/wss

controls

default: true

show/hide notive video control

muted

default: true

autoplay

default: true

loop

default: false

hlsjsconfig

default: empty;

full list of config you can see on API dicumentation hls.js

Methods

Description
No description provided
Readme 640 KiB
Languages
JavaScript 90.7%
HTML 8.8%
CSS 0.5%