Home Adobe Pr Jwplayer on blogger File [.m3u8]
Adobe PrShort TipWordPress

Jwplayer on blogger File [.m3u8]

Share
Share
  • file: you should paste your own m3u8 link on it
  • autostart: change it to true if you want the live stream to play
    automatically
  •  image: put a direct image link here, this will work as your live
    stream preview
  •  height: change this to modify height of your JWPlayer

// Initialize JWPlayer
jwplayer(‘my-video’).setup({
// Video file URL
file: ‘https://video-previews.elements.envatousercontent.com/h264-video-previews/199b569f-8b58-4ada-93f7-a9b4491d74c3/50256090.mp4’,

// Set video player width (100% for responsive design)
width: ‘100%’,

// Aspect ratio for the video
aspectratio: ’16:9′,

// Auto start the video
autostart: true,

// Thumbnail image for the video (leave empty if not needed)
image: ”,

// Use HTML5 video player as primary
primary: ‘html5’,

// Enable HLS streaming support
hlshtml: true,

// Subtitle tracks (optional)
tracks: [
{
file: ‘path/to/subtitle1.vtt’, // Path to the first subtitle file
kind: ‘captions’,
label: ‘English’,
default: true // Set this subtitle as default
},
{
file: ‘path/to/subtitle2.vtt’, // Path to the second subtitle file
kind: ‘captions’,
label: ‘Spanish’
}
]
});

To use Jwplayer on blogger, you need to
follow these steps:

1. Go to the Jwplayer website and create a free account.
2. Once you have created your account, you will need to download the player.
You can do this by                clicking on the “Download” button on the top menu
of the Jwplayer website.
3. After downloading the player, you will need to upload it to your Blogger
website. You can do this by     going to your
Blogger dashboard and selecting “Layout” from the left-hand menu.
4. Next, click on “Add a Gadget” and select “HTML/JavaScript” from the
options.
5. Paste the code for your Jwplayer player into the HTML/JavaScript box.
6. Finally, click on “Save” to add the player to your blog.
    That’s it! You should now be able to use
Jwplayer on your Blogger website.

<!-- JWPlayer Script -->
<script src="//jwpsrv.com/library/O4mPlqeTEeK_viIACpYGxA.js"></script>

<!-- Video Container -->
<div id="my-video"></div>

<script>
  // Initialize JWPlayer
  jwplayer('my-video').setup({
    // Video file URL
    file: 'https://video-previews.elements.envatousercontent.com/h264-video-previews/199b569f-8b58-4ada-93f7-a9b4491d74c3/50256090.mp4',

    // Set video player width (100% for responsive design)
    width: '100%',

    // Aspect ratio for the video
    aspectratio: '16:9',

    // Auto start the video
    autostart: true,

    // Thumbnail image for the video (leave empty if not needed)
    image: '',

    // Use HTML5 video player as primary
    primary: 'html5',

    // Enable HLS streaming support
    hlshtml: true,

    // Subtitle tracks (optional)
    tracks: [
      {
        file: 'path/to/subtitle1.vtt', // Path to the first subtitle file
        kind: 'captions',
        label: 'English',
        default: true // Set this subtitle as default
      },
      {
        file: 'path/to/subtitle2.vtt', // Path to the second subtitle file
        kind: 'captions',
        label: 'Spanish'
      }
    ]
  });
</script>

 
Share

Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *