☑ 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
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.
<script
src="//jwpsrv.com/library/O4mPlqeTEeK_viIACpYGxA.js"></script>
<div id="my-video"></div>
<script>
jwplayer('my-video').setup({
file:
'https://video-previews.elements.envatousercontent.com/h264-video-previews/199b569f-8b58-4ada-93f7-a9b4491d74c3/50256090.mp4',
width: '100%',
aspectratio: '16:9', // Set the aspect ratio according to your
video
autostart: true, // Note: 'true' is a boolean value, not a
string
image: '',
primary: 'html5',
hlshtml: true, // Note: 'true' is a boolean value, not a
string
tracks: [
{
file: 'path/to/subtitle1.vtt', // Replace with
the actual path to your first subtitle file
kind: 'captions',
label: 'English',
default: true
},
{
file: 'path/to/subtitle2.vtt', // Replace with
the actual path to your second subtitle file
kind: 'captions',
label: 'Spanish'
}
]
});
</script>
0Comments