- 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:
You can do this by clicking on the “Download” button on the top menu
of the Jwplayer website.
website. You can do this by going to your
Blogger dashboard and selecting “Layout” from the left-hand menu.
options.
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>
Leave a comment