From 52c9b69b8e174a1430aeb524b6cc74bdd355440e Mon Sep 17 00:00:00 2001
From: PR Chapagain <153065896+prchapagain@users.noreply.github.com>
Date: Wed, 26 Jun 2024 17:13:44 +0545
Subject: [PATCH] index.html
---
index.html | 79 +++++++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 69 insertions(+), 10 deletions(-)
diff --git a/index.html b/index.html
index 61ab05e..0544f50 100644
--- a/index.html
+++ b/index.html
@@ -1,13 +1,42 @@
-
+
@@ -59,8 +114,8 @@
});
document.getElementById('channel-list').addEventListener('click', function(event) {
- var target = event.target;
- if (target.tagName.toLowerCase() === 'li') {
+ var target = event.target.closest('li');
+ if (target) {
var src = target.getAttribute('data-src');
player.src({ src: src, type: 'application/x-mpegURL' });
player.play();
@@ -70,6 +125,10 @@
target.classList.add('selected-channel');
}
});
+
+ window.onload = function() {
+ player.play();
+ };