[go: up one dir, main page]

0% found this document useful (0 votes)
136 views2 pages

Footfy Live Streaming Setup

The document is an HTML template for a web application called 'Footfy Live' that utilizes Shaka Player for video streaming. It includes configurations for DRM, autoplay settings, and a user interface with various controls for playback. The script initializes the video player and handles errors, while also setting up a dynamic logo feature.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views2 pages

Footfy Live Streaming Setup

The document is an HTML template for a web application called 'Footfy Live' that utilizes Shaka Player for video streaming. It includes configurations for DRM, autoplay settings, and a user interface with various controls for playback. The script initializes the video player and handles errors, while also setting up a dynamic logo feature.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

<!

DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer">
<title>Footfy Live</title>
<script src="[Link]
[Link]"></script>
<link rel="stylesheet" href="[Link]
player/4.7.12/[Link]" crossorigin="anonymous" />
<script src="[Link]
[Link]" crossorigin="anonymous"></script>
<link rel="stylesheet" href="[Link]
</head>
<body>
<div data-shaka-player-container style="position: absolute; top: 0; left: 0;
width: 100%; height: 100%; object-fit: cover;">
<video autoplay muted playsinline data-shaka-player id="video"
poster="[Link]
style="width: 100%; height: 100%;"></video>
</div>

<script>
const mpdUrl =
'[Link]
b7xrkj5ilm/out/v1/66f8ab50318f4604a86b3e961780c9b4/[Link]';
const kid = 'b26351569dc348390e00342a025d631f';
const key = '39d4e4047811cc1196d757ff084c28f2';

let player;

function initApp() {
[Link]();

[Link]().then(function() {
const video = [Link]('video');
player = new [Link](video);

[Link] = player;

const drmConfig = {
drm: {
clearKeys: {
[kid]: key
}
}
};
[Link](drmConfig);

[Link](mpdUrl).then(function() {
[Link]('[Link]
[Link]().catch(error => [Link]('Autoplay failed:',
error));
}).catch(onPlayerError);

initializeUI(video);
}).catch(onPlayerError);
}

function initializeUI(video) {
const container = [Link]('[data-shaka-player-
container]');
const ui = new [Link](player, container, video);

const uiConfig = {
controlPanelElements: [
'play_pause',
'mute',
'quality',
'fullscreen',
'overflow_menu',
'picture_in_picture'

],
overflowMenuButtons: [
'captions',
'playback_rate'
],
seekBarColors: {
base: 'rgba(255, 255, 255, 0.3)',
buffered: 'rgba(255, 255, 255, 0.5)',
played: 'rgba(255, 0, 0, 0.8)'
}
};
[Link](uiConfig);

// Auto-select highest quality


[Link]('trackschanged', () => {
const tracks = [Link]();
if ([Link] > 0) {
[Link](tracks[[Link] - 1], true);
}
});

[Link]().setEnabled(true);
}

function onPlayerError(event) {
[Link]('Player error', event);
}

[Link]('DOMContentLoaded', function () {
initApp();
addDynamicLogo();
});
</script>
</body>
</html>

You might also like