Live TV Code File by BSM
Live TV Code File by BSM
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Live TV Stream</title>
<meta name="description" content="FREE LIVE TV">
<meta name="keywords" content="Watch live sports streaming online, including
football, basketball, baseball, hockey, and more. Stream your favorite sports teams
and events in HD, with no cable subscription required.">
<meta name="author" content="Live TV Stream">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="shortcut icon" type="image/x-icon"
href="https://i.postimg.cc/66FbnPJF/20241012-185622.png">
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/plyr.css" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/plyr.min.js"></
script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/hls.min.js"></
script>
<meta name='google-adsense-platform-domain' content='blogspot.com' />
</head>
<body>
<script>
const video = document.getElementById('videoPlayer');
const videoLoading = document.getElementById('videoLoading');
const channelLoading = document.getElementById('channelLoading');
const channelList = document.getElementById('channelList');
video.addEventListener('playing', function () {
videoLoading.style.display = 'none';
});
function loadVideo(sourceUrl) {
if (Hls.isSupported()) {
if (window.hls) {
window.hls.destroy();
}
var hls = new Hls();
hls.loadSource(sourceUrl);
hls.attachMedia(video);
window.hls = hls;
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = sourceUrl;
}
video.play();
}
function loadChannels() {
// Simulate delay for loading channels
setTimeout(() => {
fetch('https://raw.githubusercontent.com/blackshadow9933/JSZ/refs/
heads/main/blackshadow.m3u')
.then(response => response.text())
.then(data => {
const lines = data.split('\n');
let channels = [];
let currentChannel = {};
lines.forEach(line => {
if (line.startsWith('#EXTINF')) {
const logoMatch = line.match(/tvg-logo="(.*?)"/);
const nameMatch = line.match(/,(.*)/);
if (logoMatch && nameMatch) {
currentChannel.logo = logoMatch[1];
currentChannel.name = nameMatch[1];
}
} else if (line.startsWith('http')) {
currentChannel.url = line.trim();
channels.push(currentChannel);
currentChannel = {};
}
});
channels.forEach(channel => {
const channelButton = document.createElement('a');
channelButton.href = "#";
channelButton.classList.add('channel-link');
channelButton.setAttribute('data-link', channel.url);
channelButton.appendChild(logoImg);
channelList.appendChild(channelButton);
});
<style>
body {
font-family: 'Poppins', sans-serif;
background-color: #181818;
color: #fff;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.custom-text h1 {
font-size: 2rem;
color: #4CAF50;
background-color: #222;
padding: 10px;
border-radius: 10px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}
.video-player {
padding: 20px;
border-radius: 15px;
margin: 20px 0;
background-color: #1a1a1a;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
width: 100%;
max-width: 900px;
text-align: center;
position: sticky;
top: 0;
z-index: 1000;
}
.video-player h2 {
background-color: #4CAF50;
color: white;
padding: 10px;
border-radius: 5px;
margin-bottom: 20px;
}
.video-player video {
width: 100%;
height: auto;
border-radius: 10px;
border: 2px solid #4CAF50;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
}
.loading {
font-size: 18px;
color: white;
background-color: rgba(0, 0, 0, 0.8);
padding: 10px;
border-radius: 10px;
display: block;
text-align: center;
}
.channel-list {
background-color: #2b2b2b;
padding: 20px;
border-radius: 10px;
width: 100%;
max-width: 900px;
text-align: center;
}
.channel-list h2 {
background-color: #4CAF50;
color: white;
padding: 10px;
border-radius: 5px;
margin-bottom: 20px;
}
.channel-buttons {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
margin-top: 20px;
}
.channel-buttons a {
background-color: #333;
width: 100px;
height: 100px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 10px;
margin: 10px;
transition: background-color 0.3s ease;
text-decoration: none;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}
.channel-buttons a img {
width: 80px;
height: 80px;
border-radius: 50%;
}
.channel-buttons a:hover {
background-color: #4CAF50;
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.4);
}
.channel-buttons a {
width: 80px;
height: 80px;
}
.channel-buttons a img {
width: 60px;
height: 60px;
}
}
</style>
<footer>