Update Player.html
Browse files1 unmodified line2345567789102 unmodified lines131415161716171819202122232021222324252627282930303132332 unmodified lines363738394041394041424344454647484948495051525350515253545556575859565758596061606162636465666768697063717273741 unmodified line<html lang="en"><head> <meta charset="UTF-8" /> <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> <meta name="referrer" content="no-referrer"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <title>S4ITMM Player</title> <title>S4ITMM - Stable Player</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" /> <script src="https://msportmm.vercel.app/myjs/player.js" type="text/javascript"></script> 2 unmodified lines body { background-color: var(--bg-dark); color: #ffffff; font-family: sans-serif; margin: 0; padding: 0; } .header { padding: 15px 20px; display: flex; align-items: center; } .back-btn { background: rgba(255,255,255,0.1); border: none; color: var(--primary-yellow); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; } .header h1 { margin-left: 15px; font-size: 18px; color: var(--primary-yellow); margin: 0; } .player-outer { width: 95%; max-width: 500px; margin: 10px auto; border-radius: 15px; overflow: hidden; background: #000; box-shadow: 0 10px 30px rgba(0,0,0,0.5); } .header h1 { margin-left: 15px; font-size: 18px; color: var(--primary-yellow); margin: 0; font-weight: 800; } .player-outer { width: 95%; max-width: 500px; margin: 10px auto; border-radius: 20px; overflow: hidden; background: #000; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 30px rgba(0,0,0,0.5); } #player { width: 100%; aspect-ratio: 16/9; } .card-section { padding: 20px; } .info-card { background: var(--card-bg); border-radius: 25px; padding: 30px 20px; text-align: center; max-width: 400px; margin: 0 auto; } .title { font-size: 20px; font-weight: bold; margin-bottom: 20px; } .btn-more { background: var(--primary-yellow); color: #000; border: none; width: 100%; padding: 15px; border-radius: 12px; font-weight: bold; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 10px; } .btn-more:active { transform: scale(0.95); } .info-card { background: var(--card-bg); border-radius: 30px; padding: 35px 20px; text-align: center; max-width: 400px; margin: 0 auto; box-shadow: inset 0 1px 1px rgba(255,255,255,0.1); } .title { font-size: 22px; font-weight: bold; margin-bottom: 25px; } .btn-more { background: linear-gradient(90deg, #ffcc00, #facc15); color: #000; border: none; width: 100%; padding: 16px; border-radius: 15px; font-weight: 900; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3); } .btn-more:active { transform: scale(0.96); } </style></head><body>
<header class="header"> <button class="back-btn" onclick="history.back()"><i class="fas fa-chevron-left"></i></button> <h1>S4ITMM <span>PLAYER</span></h1> <h1>S4ITMM <span style="color:white; font-weight:400; font-size:12px;">PLAYER</span></h1> </header>
<div class="player-outer">2 unmodified lines
<main class="card-section"> <div class="info-card"> <h2 class="title" id="chan-title">S4ITMM Live</h2> <a href="https://msportmm.vercel.app" class="btn-more" id="redirect-link"> <i class="fas fa-list"></i> FOR MORE EPISODES <h2 class="title" id="chan-title">S4ITMM Live Stream</h2> <a href="https://msportmm.vercel.app" class="btn-more" id="redirect-btn"> <i class="fas fa-play-circle"></i> FOR MORE EPISODES </a> </div> </main>
<script type="text/JavaScript"> // URL ကနေ Parameter ဖတ်ခြင်း const urlParams = new URLSearchParams(window.location.search); let videoUrl = urlParams.get('url') || urlParams.get('videoUrl'); // HTTP ကို HTTPS သို့ အတင်းပြောင်းလဲရန် ကြိုးစားခြင်း if (videoUrl && videoUrl.startsWith('http://')) { videoUrl = videoUrl.replace('http://', 'https://'); } const videoUrl = urlParams.get('url') || urlParams.get('videoUrl'); const titleText = urlParams.get('title') || 'Now Playing'; const redirectUrl = urlParams.get('redirect');
document.getElementById('chan-title').textContent = titleText; if(redirectUrl) { document.getElementById('redirect-btn').href = redirectUrl; }
if (videoUrl) { // PlayerJS function ကို အမှန်ကန်ဆုံး format နဲ့ ခေါ်တာပါ try { var player = new Playerjs({ id: "player", file: videoUrl, poster: "https://i.imgur.com/T4i6UFD.jpg", autoplay: 1 }); window.player = new Playerjs({ id: "player", file: videoUrl, poster: "https://i.imgur.com/T4i6UFD.jpg", autoplay: 1 }); } catch (e) { console.error("PlayerJS Error:", e); document.getElementById('player').innerHTML = "<div style='color:white; padding:20px;'>Player Loading Error!</div>"; } } else { document.getElementById('player').innerHTML = "<div style='color:white;text-align:center;padding:50px;'>Video Link Not Found</div>"; document.getElementById('player').innerHTML = "<div style='color:white; padding:20px;'>No Video URL provided.</div>"; } </script></body>Player.html+33-25