THEOlivePlayer
This package contains the video player to play back THEOlive streams on your web page. It's intended for
THEOlive customers that want to host the player themselves.
Installation
Install using your favorite package manager for Node (such as npm
or yarn
):
npm install @theolive/player
Example
This example assumes you have created an account and your first channel and your channel is up and running.
This is a minimal page that creates a THEOLivePlayer
:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Example</title>
<script type="text/javascript" src="THEOLive.js"></script>
</head>
<body>
<div id="player"></div>
<script type="text/javascript">
if (THEOLive.requiresServiceWorker()) {
navigator.serviceWorker.register("THEOLive.sw.js")
}
const player = new THEOLive.Player(document.getElementById('player'));
player.loadChannel('<your-channel-id>')
</script>
</body>
</html>
Make sure to change <your-channel-id>
with your actual channel-id
.
For more information, please visit the THEOlive documentation website: https://developers.theo.live/docs