Update Player.html
Browse files11 unmodified lines12131415161718192021222324252627282930313233343536373839404142434445464748495051525320 unmodified lines74757677787980812 unmodified lines84858687888990911 unmodified line9394959697989910011 unmodified lines.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>20 unmodified lines<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');2 unmodified linesif(moreLink) document.getElementById('more-btn').href = moreLink;if (videoUrl) {// PlayerJS Initialize လုပ်တဲ့အခါ Error မတက်အောင် try catch သုံးမယ်try {var player = new Playerjs({id: "player",file: videoUrl,1 unmodified lineautoplay: 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>`;11 unmodified lines1213141516171819202122232425262728293031323320 unmodified lines5455565758592 unmodified lines62636465666768691 unmodified line7172737475767711 unmodified lines.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-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);}#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>20 unmodified lines<script type="text/JavaScript">window.onload = function() {const urlParams = new URLSearchParams(window.location.search);let videoUrl = urlParams.get('url') || urlParams.get('videoUrl');const titleText = urlParams.get('title') || 'Now Playing';const moreLink = urlParams.get('redirect');2 unmodified linesif(moreLink) document.getElementById('more-btn').href = moreLink;if (videoUrl) {try {// Playerjs က videoUrl ကို play ဖို့ကြိုးစားမယ်var player = new Playerjs({id: "player",file: videoUrl,1 unmodified lineautoplay: 1});} catch (err) {// အကယ်၍ Error တက်ရင် (ဥပမာ http ကြောင့်ဖြစ်ဖြစ်) Native Player နဲ့ အတင်းဖွင့်မယ်document.getElementById('player').innerHTML = `<video src="${videoUrl}" controls autoplay style="width:100%;height:100%;"></video>`;
Player.html+10-33