Update Player.html
Browse files2 unmodified lines34567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283842 unmodified lines<head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /><title>S4ITMM Player - Stable</title><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" /><script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script><style>:root { --primary-yellow: #ffcc00; --bg-dark: #0f172a; --card-bg: #1e293b; }body { background-color: var(--bg-dark); color: #ffffff; font-family: sans-serif; margin: 0; padding: 0; overflow-x: hidden; }.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%; display: flex; align-items: center; justify-content: center; cursor: pointer; }.header h1 { margin-left: 15px; font-size: 18px; color: var(--primary-yellow); font-weight: 800; margin: 0; }.player-outer { width: 95%; max-width: 500px; margin: 10px auto; border-radius: 15px; overflow: hidden; background: #000; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 30px rgba(0,0,0,0.5); position: relative; aspect-ratio: 16/9; }video { width: 100%; height: 100%; object-fit: contain; }.info-card { background: var(--card-bg); margin: 20px; padding: 30px 20px; border-radius: 25px; text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.3); }.title { font-size: 1.2rem; font-weight: bold; margin-bottom: 20px; color: #fff; }.btn-more { background: linear-gradient(90deg, #ffcc00, #facc15); color: #000; padding: 15px; border-radius: 12px; 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.95); }</style></head><body><header class="header"><button class="back-btn" onclick="history.back()"><i class="fas fa-chevron-left"></i></button><h1>S4ITMM <span style="color:white; font-weight:lighter; font-size:12px;">PLAYER</span></h1></header><div class="player-outer"><video id="video" controls autoplay playsinline poster="https://i.imgur.com/T4i6UFD.jpg"></video></div><div class="info-card"><h2 id="v-title" class="title">S4ITMM Live</h2><a href="https://msportmm.vercel.app" class="btn-more" id="more-btn"><i class="fas fa-layer-group"></i> FOR MORE EPISODES</a></div><script>document.addEventListener('DOMContentLoaded', () => {const video = document.getElementById('video');const urlParams = new URLSearchParams(window.location.search);// url= သို့မဟုတ် videoUrl= နှစ်မျိုးလုံးကို လက်ခံမယ်const streamUrl = urlParams.get('url') || urlParams.get('videoUrl');const titleText = urlParams.get('title') || 'Now Playing';const redirect = urlParams.get('redirect');document.getElementById('v-title').innerText = titleText;if (redirect) document.getElementById('more-btn').href = redirect;if (streamUrl) {// HLS.js ကို သုံးပြီး .m3u8 ကို play မယ်if (Hls.isSupported()) {const hls = new Hls({// http လင့်တွေအတွက် security error လျော့နည်းအောင် configuration ထည့်ထားတယ်xhrSetup: function(xhr, url) { xhr.withCredentials = false; }});hls.loadSource(streamUrl);hls.attachMedia(video);hls.on(Hls.Events.MANIFEST_PARSED, () => {video.play().catch(e => console.log("Auto-play blocked"));});}// Safari သို့မဟုတ် Android Native Player အတွက်else if (video.canPlayType('application/vnd.apple.mpegurl')) {video.src = streamUrl;video.addEventListener('loadedmetadata', () => {video.play();});}} else {document.getElementById('v-title').innerText = "ဗီဒီယိုလင့် မတွေ့ပါ။";}});</script></body></html>2 unmodified lines34567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071082 unmodified lines<head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /><title>S4ITMM Player</title><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" /><style>:root { --primary-yellow: #ffcc00; --bg-dark: #0f172a; --card-bg: #1e293b; }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; display: flex; align-items: center; justify-content: center; }.header h1 { margin-left: 15px; font-size: 18px; color: var(--primary-yellow); font-weight: 800; margin: 0; }/* Player Area */.player-container {width: 100%;max-width: 500px;margin: 10px auto;aspect-ratio: 16/9;background: #000;position: relative;overflow: hidden;border-radius: 15px;border: 1px solid rgba(255,255,255,0.1);}/* PlayerJS အတွက် */#player { width: 100%; height: 100%; }.info-card {background: var(--card-bg);margin: 20px;padding: 30px 20px;border-radius: 25px;text-align: center;box-shadow: 0 10px 25px rgba(0,0,0,0.3);}.btn-more {background: var(--primary-yellow);color: #000;padding: 15px;border-radius: 12px;font-weight: bold;text-decoration: none;display: flex;align-items: center;justify-content: center;gap: 10px;margin-top: 20px;}</style></head><body><header class="header"><button class="back-btn" onclick="history.back()"><i class="fas fa-chevron-left"></i></button><h1>S4ITMM <span style="color:white; font-weight:lighter; font-size:12px;">STABLE PLAYER</span></h1></header><div class="player-container"><div id="player"></div></div><div class="info-card"><h2 id="v-title" style="margin:0; font-size:1.2rem;">Loading Title...</h2><a href="https://msportmm.vercel.app" class="btn-more" id="more-btn"><i class="fas fa-layer-group"></i> FOR MORE EPISODES</a></div><script src="https://msportmm.vercel.app/myjs/player.js" type="text/javascript"></script><script type="text/JavaScript">window.onload = function() {const urlParams = new URLSearchParams(window.location.search);// Parameter အကုန်စစ်မယ်let videoUrl = urlParams.get('url') || urlParams.get('videoUrl');const titleText = urlParams.get('title') || 'Now Playing';const moreLink = urlParams.get('redirect');document.getElementById('v-title').innerText = titleText;if(moreLink) document.getElementById('more-btn').href = moreLink;if (videoUrl) {// PlayerJS Initialize လုပ်တဲ့အခါ Error မတက်အောင် try catch သုံးမယ်try {var player = new Playerjs({id: "player",file: videoUrl,poster: "https://i.imgur.com/T4i6UFD.jpg",autoplay: 1});} catch (err) {console.error("Player Error:", err);// အကယ်၍ PlayerJS နဲ့ မရရင် Native Video Tag နဲ့ အစားထိုးမယ်document.getElementById('player').innerHTML = `<video src="${videoUrl}" controls autoplay style="width:100%;height:100%;"></video>`;}} else {document.getElementById('player').innerHTML = "<p style='color:white;text-align:center;padding-top:20%;'>ဗီဒီယိုလင့် မတွေ့ပါ။</p>";}};</script></body></html>
Player.html+74-50