<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-4832877972311685943</atom:id><lastBuildDate>Wed, 06 Dec 2023 03:39:40 +0000</lastBuildDate><title>M3U8 PLAYER</title><description></description><link>https://player-hls.blogspot.com/</link><managingEditor>noreply@blogger.com (M3U8 PLAYER)</managingEditor><generator>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4832877972311685943.post-5398270369645613965</guid><pubDate>Tue, 05 Dec 2023 16:34:00 +0000</pubDate><atom:updated>2023-12-05T08:38:21.946-08:00</atom:updated><title>M3U8 PLAYER</title><description>
&lt;meta charset=&quot;UTF-8&quot;&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
&lt;title&gt;YashRajPW&lt;/title&gt;
&lt;script disable-devtool-auto src=&#39;https://cdn.jsdelivr.net/npm/disable-devtool@latest&#39;&gt;&lt;/script&gt;
&lt;link rel=&quot;apple-touch-icon&quot; sizes=&quot;180x180&quot;
    href=&quot;https://cdn.jsdelivr.net/gh/ash314314/image-Cdn@main/apple-touch-icon.png&quot;&gt;
&lt;link rel=&quot;icon&quot; type=&quot;image/png&quot; sizes=&quot;32x32&quot;
    href=&quot;https://cdn.jsdelivr.net/gh/ash314314/image-Cdn@main/favicon-32x32.png&quot;&gt;
&lt;link rel=&quot;icon&quot; type=&quot;image/png&quot; sizes=&quot;16x16&quot;
    href=&quot;https://cdn.jsdelivr.net/gh/ash314314/image-Cdn@main/favicon-16x16.png&quot;&gt;
&lt;link rel=&quot;manifest&quot; href=&quot;https://cdn.jsdelivr.net/gh/ash314314/image-Cdn@main/site.webmanifest&quot;&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.plyr.io/3.7.8/plyr.css&quot;&gt;
&lt;script src=&quot;https://cdn.plyr.io/3.7.8/plyr.js&quot;&gt;&lt;/script&gt;
&lt;noscript&gt;
    &lt;h2&gt;JavaScript is disabled! Please enable JavaScript in your web browser.&lt;/h2&gt;
    &lt;style type=&quot;text/css&quot;&gt;
        .container {
            display: none;
        }
    &lt;/style&gt;
&lt;/noscript&gt;


&lt;script src=&quot;https://cdn.jsdelivr.net/npm/hls.js@latest&quot;&gt;&lt;/script&gt;
&lt;script disable-devtool-auto src=&#39;https://cdn.jsdelivr.net/npm/disable-devtool@latest&#39;&gt;&lt;/script&gt;

&lt;style&gt;


.container {
max-width: 800px;
padding: 20px;

border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
text-align: center;
}

.thumbnail {
max-width: 100%;
height: auto;
margin-bottom: 20px;
}

h1 {
color: #000000; /* Blue text color */
}

p {
color: #333; /* Dark gray text color */
margin-bottom: 20px;
}

select {
width: 100%;
padding: 10px;
margin-bottom: 20px;
border: 1px solid #ccc; /* Light gray border */
border-radius: 5px;
background-color: #fff; /* White background */
}
.plyr {
--plyr-color-main: #000000;
}
button {
display: block;
width: 100%;
padding: 10px;
border: none;
border-radius: 5px;
background-color: #000000; /* Blue button background */
color: #fff; /* White text color */
cursor: pointer;
margin-bottom: 10px;
}

button:hover {
background-color: #00000080; /* Darker blue on hover */
}

/* ... Your existing CSS ... */

/* Media queries for responsive design */

@media (max-width: 768px) {
/* Adjust styles for smaller screens (e.g., tablets) */
.container {
padding: 10px;
}
}

@media (max-width: 480px) {
/* Styles for smaller screens (e.g., smartphones) */
.container {
padding: 10px;
max-width: 90%; /* Reduce max width to create gaps on left and right */
margin: 0 auto; /* Center the container */
}

h1 {
font-size: 24px;
}

p {
font-size: 16px;
}

select, button {
font-size: 14px;
}
}

/* Additional mobile-specific styles */

@media (max-width: 320px) {
/* Further adjustments for smaller screens (e.g., small smartphones) */
h1 {
font-size: 20px;
}

p {
font-size: 14px;
}
}



.telegram-float {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 1000;
}

.telegram-icon {
width: 60px;
height: 60px;
border-radius: 50%;
background-color: #000000;
display: flex;
justify-content: center;
align-items: center;
animation-name: pulse;
animation-duration: 1.5s;
animation-timing-function: ease-out;
animation-iteration-count: infinite;
}

@keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.5);
}

80% {
box-shadow: 0 0 0 14px rgba(0, 136, 204, 0);
}
}

.telegram-icon svg {
fill: #fff;
width: 30px;
height: 30px;
}

.hide{
display: none;
}



.popup-container {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 20px;
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
z-index: 1000;
max-width: 90%;
max-height: 80vh; /* 80% of the viewport height */
width: 600px;
overflow-y: auto; /* Enable vertical scrolling */
}

.overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 900;
}

.close-btn {
position: absolute;
top: 10px;
right: 10px;
cursor: pointer;
}

.video-container {
position: relative;
overflow: hidden;
padding-bottom: 56.25%; /* 16:9 aspect ratio */
margin-bottom: 20px;
}

iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

@media (max-width: 768px) {
.popup-container {
width: 90%;
}
}
.close-btn-container {
position: absolute;
top: 10px;
right: 10px;
cursor: pointer;
z-index: 1;
}

.close-btn {
font-size: 20px;
padding: 5px 10px;
background-color: #ccc;
border-radius: 5px;
}

/* Custom CSS to hide volume control */
.plyr__controls .plyr__volume {
display: none;
}


.button {
background-color: #000000;
color: #fff;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 5px;
cursor: pointer;
border-radius: 4px;
}

.button:hover {
background-color: #00000080;
}

/* Add this CSS code to make the popup responsive */
.popup-container {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 2;
background-color: #f5f5f5;
padding: 20px;
border: 1px solid #ddd;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
max-width: 80%; /* Adjust the maximum width as needed */
width: 300px; /* Set a default width for smaller screens */
text-align: center;
}

/* Add this CSS code to make the close button responsive */
.close-btn-container {
position: absolute;
top: 10px;
right: 10px;
cursor: pointer;
}



/* Add this CSS code to make the popup responsive on smaller screens */
@media screen and (max-width: 600px) {
.popup-container {
max-width: 90%; /* Adjust the maximum width for smaller screens */
width: 80%; /* Set a default width for smaller screens */
}
}

&lt;/style&gt;


&lt;div class=&quot;container&quot;&gt;
        &lt;div class=&quot;content&quot;&gt;
            &lt;input type=&quot;text&quot; id=&quot;manualM3u8Input&quot; placeholder=&quot;Enter M3U8 Link&quot; style=&quot;width: auto;&quot;&gt;
            &lt;br&gt;
            &lt;br&gt;
            &lt;button id=&quot;manualM3u8Button&quot;&gt;Load Video&lt;/button&gt;

            &lt;video id=&quot;player&quot; controls&gt;
                &lt;!-- Video source will be added dynamically using Plyr --&gt;
            &lt;/video&gt;

            &lt;h2&gt;Play Download Video🚀&lt;/h2&gt;
            &lt;select id=&quot;playHLSQualitySelector&quot;&gt;

            &lt;/select&gt;
            &lt;button id=&quot;playHLSButton&quot;&gt;Play Here&lt;/button&gt;

            &lt;div&gt;
                &lt;button id=&quot;copyButton&quot;&gt;Copy Link&lt;/button&gt;
                &lt;button id=&quot;openVLC&quot;&gt;Open with VLC&lt;/button&gt;
                &lt;button id=&quot;openMXPlayerFree&quot;&gt;Open with MX Player&lt;/button&gt;
                &lt;button id=&quot;openMXPlayerPro&quot;&gt;Open with MX Player Pro&lt;/button&gt;
                &lt;button id=&quot;open1DM&quot;&gt;Open with 1DM&lt;/button&gt;
               
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;



   &lt;script&gt;
        document.addEventListener(&quot;DOMContentLoaded&quot;, function () {
            const video = document.getElementById(&#39;player&#39;);
            const qualitySelector = document.getElementById(&#39;playHLSQualitySelector&#39;);
            const playButton = document.getElementById(&#39;playHLSButton&#39;);
            const copyButton = document.getElementById(&#39;copyButton&#39;);
            const openVLCButton = document.getElementById(&#39;openVLC&#39;);
            const openMXPlayerFreeButton = document.getElementById(&#39;openMXPlayerFree&#39;);
            const openMXPlayerProButton = document.getElementById(&#39;openMXPlayerPro&#39;);
            const open1DMButton = document.getElementById(&#39;open1DM&#39;);
            const manualM3u8Input = document.getElementById(&#39;manualM3u8Input&#39;);
            const manualM3u8Button = document.getElementById(&#39;manualM3u8Button&#39;);

            let hls;
            let player;
        
            function initializePlyr() {
                player = new Plyr(&#39;#player&#39;, {
                    captions: { active: true, update: true, language: &#39;auto&#39; },
                    controls: [&#39;play-large&#39;, &#39;play&#39;, &#39;progress&#39;, &#39;current-time&#39;, &#39;mute&#39;, &#39;volume&#39;, &#39;captions&#39;, &#39;settings&#39;, &#39;fullscreen&#39;],
                });
            }
        
    
            function playVideo(url) {
                if (Hls.isSupported()) {
                    if (hls) {
                        hls.destroy();
                    }
                    hls = new Hls();
                    hls.loadSource(url);
                    hls.attachMedia(video);
                    video.play();
                } else if (video.canPlayType(&#39;application/vnd.apple.mpegurl&#39;)) {
                    video.src = url;
                    video.addEventListener(&#39;loadedmetadata&#39;, function () {
                        video.play();
                    });
                }
            }

            function updateQualityDropdowns(m3u8Link) {
                // Clear existing options
                qualitySelector.innerHTML = &#39;&#39;;
            
                // Extract the filename from the m3u8 link
                const filename = m3u8Link.substring(m3u8Link.lastIndexOf(&quot;/&quot;) + 1);
            
                // Extract the name before the underscore
                const nameBeforeUnderscore = filename.substring(0, filename.lastIndexOf(&quot;_&quot;));
            
                // Construct the base URL
                const baseURL = &quot;https://lec.pages.dev/&quot;;
            
                // Add quality options to the selection dropdown
                const qualityOptions = [&quot;Auto&quot;, &quot;240&quot;, &quot;360&quot;, &quot;480&quot;, &quot;720&quot;];
                qualityOptions.forEach(option =&gt; {
                    // Display &quot;Auto&quot; in the dropdown, but use &quot;_master&quot; in the link
                    const resolution = option === &quot;Auto&quot; ? &quot;master&quot; : option;
            
                    // Add the quality option to the HLS selector
                    const hlsOption = document.createElement(&#39;option&#39;);
                    hlsOption.value = resolution === &quot;master&quot; ? &quot;Auto&quot; : resolution + &quot;p&quot;;
                    hlsOption.dataset.videoUrl = resolution === &quot;master&quot; ? `${baseURL}${nameBeforeUnderscore}_master.m3u8` : `${baseURL}${nameBeforeUnderscore}_${resolution}.m3u8`;
                    hlsOption.textContent = resolution === &quot;master&quot; ? &quot;Auto&quot; : resolution + &quot;p&quot;; // Display resolution with &quot;p&quot; suffix
                    qualitySelector.appendChild(hlsOption);
            
                    // Automatically play the video if &quot;Auto&quot; is selected
                    if (option === &quot;Auto&quot;) {
                        playVideo(hlsOption.dataset.videoUrl);
                    }
                });
            }
            
    
             // Event listener for the &quot;Play M3U8 Video with HLS.js&quot; button
        playButton.addEventListener(&#39;click&#39;, function () {
            const selectedQualityOption = qualitySelector.options[qualitySelector.selectedIndex];
            const m3u8Url = selectedQualityOption.getAttribute(&#39;data-video-url&#39;);
            playVideo(m3u8Url);
        });

            
              // Event listener for the &quot;Copy Link&quot; button
        copyButton.addEventListener(&#39;click&#39;, function () {
            const selectedQualityOption = qualitySelector.options[qualitySelector.selectedIndex];
            const videoUrl = selectedQualityOption.getAttribute(&#39;data-video-url&#39;);
    
            // Create a temporary input element to copy the text to clipboard
            const tempInput = document.createElement(&#39;input&#39;);
            tempInput.value = videoUrl;
            document.body.appendChild(tempInput);
            tempInput.select();
            document.execCommand(&#39;copy&#39;);
            document.body.removeChild(tempInput);
    
            // Provide user feedback (you can customize this part)
            alert(&#39;Link copied to clipboard!&#39;);
        });
    
            // Event listener for the &quot;Open with VLC&quot; button
        openVLCButton.addEventListener(&#39;click&#39;, function () {
            const selectedQualityOption = qualitySelector.options[qualitySelector.selectedIndex];
            const videoUrl = selectedQualityOption.getAttribute(&#39;data-video-url&#39;);
            window.open(&#39;vlc://&#39; + videoUrl);
        });
    
        // Event listener for the &quot;Open with MX Player Free&quot; button
        openMXPlayerFreeButton.addEventListener(&#39;click&#39;, function () {
            openInMXPlayer(&#39;com.mxtech.videoplayer.ad&#39;);
        });
    
        // Event listener for the &quot;Open with MX Player Pro&quot; button
        openMXPlayerProButton.addEventListener(&#39;click&#39;, function () {
            openInMXPlayer(&#39;com.mxtech.videoplayer.pro&#39;);
        });
    
        // Event listener for the &quot;Open with 1DM&quot; button
        open1DMButton.addEventListener(&#39;click&#39;, function () {
            const selectedQualityOption = qualitySelector.options[qualitySelector.selectedIndex];
            const videoUrl = selectedQualityOption.getAttribute(&#39;data-video-url&#39;);
            const intentUrl = &#39;intent:&#39; + videoUrl + &#39;#Intent;package=idm.internet.download.manager;end&#39;;
            window.open(intentUrl);
        });
    
        // General function to open MX Player with a specific package name
        function openInMXPlayer(packageName) {
            const selectedQualityOption = qualitySelector.options[qualitySelector.selectedIndex];
            const videoUrl = selectedQualityOption.getAttribute(&#39;data-video-url&#39;);
    
            // Create an intent URL for MX Player
            const intentUrl = `intent:${videoUrl}#Intent;package=${packageName};end`;
    
            // Open the intent URL
            window.open(intentUrl, &#39;_blank&#39;);
        }

            // Event listener for the &quot;Load Video&quot; button to manually input M3U8 link
            manualM3u8Button.addEventListener(&#39;click&#39;, function () {
                const manualM3u8Link = manualM3u8Input.value.trim();
                if (manualM3u8Link) {
                    updateQualityDropdowns(manualM3u8Link);
                } else {
                    alert(&#39;Please enter a valid M3U8 link.&#39;);
                }
            });

           // Initialize Plyr.io
           initializePlyr();
    
           // Extract the m3u8 link from the URL
           const urlParams = new URLSearchParams(window.location.search);
           const m3u8Link = urlParams.get(&quot;m&quot;);
   
           if (m3u8Link) {
               updateQualityDropdowns(m3u8Link);
           } else {
               // Invalid URL
               alert(&#39;Invalid URL format. Please make sure the URL contains the &quot;m&quot; query parameter with a valid m3u8 link.&#39;);
           }
       });
       document.addEventListener(&quot;DOMContentLoaded&quot;, function () {
        // ... (your existing JavaScript code)
    
        // Toggle navigation menu on button click
        document.getElementById(&#39;toggleButton&#39;).addEventListener(&#39;click&#39;, function () {
            const navbar = document.querySelector(&#39;.navbar&#39;);
            navbar.classList.toggle(&#39;show&#39;);
        });
    });
    
    &lt;/script&gt;


</description><link>https://player-hls.blogspot.com/2023/12/m3u8-player.html</link><author>noreply@blogger.com (M3U8 PLAYER)</author><thr:total>0</thr:total></item></channel></rss>