Creates a new JW Player on your web page.
When a player is set up, it must have a target <div>
element to replace. In the following example, a <div>
element named myElement
has been created. The player will replace the <div>
element when it appears on the page.
<div id="myElement">This text will be replaced with a player.</div>
<script>
jwplayer("myElement").setup({
"playlist": "https://cdn.jwplayer.com/v2/media/hWF9vG66"
});
</script>
<div id="myElement">This text will be replaced with a player.</div>
<script>
jwplayer("myElement").setup({
"playlist": [{
"file": "http://example.com/myVideo.mp4",
"image": "http://example.com/myImage.png",
}],
"height": 360,
"width": 640
})
</script>
Attribute | Description | |
---|---|---|
div* string | Target named div element that the web player replaces when it loads
| |
options* JSON | Configuration settings that control the appearance, behavior, rendinging, and loading of the player
|