 |
รบกวนพี่ๆ แนะนำตัวเล่น Video ในเว็บ Jwplayer รุ่น 7 ขึ้นไปหน่อยครับ |
|
 |
|
|
 |
 |
|
Code
<script src='https://jwpsrv.com/library/iUJA3jnmEeSLyCIACtqXBA.js'/>
</script>
<style type="text/css">
html, body {
height: 100%;
width: 100%;
padding: 0;
margin: 0;
}
#player {
height: 100%;
width: 100%;
padding: 0;
}
</style>
<div id="player">
</div>
<script type="text/javascript">
jwplayer("player").setup({
file: "video.mp4",
image: "https://hlcasinothai.com/images/providers.png",
height: "100%",
width: "100%",
stretching: "exactfit",
flashplayer:"//cdn.jsdelivr.net/jwplayer/5.10/player.swf"
});
</script>
|
 |
 |
 |
 |
Date :
2018-10-31 13:12:55 |
By :
lchampl123 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เพิ่มเติมครับ กรณีดึง video จาก youtube มา เล่นใน jwplayer
Code
<script src="jwplayer.js" ></script>
<script src='https://jwpsrv.com/library/iUJA3jnmEeSLyCIACtqXBA.js'/>
</script>
<style type="text/css">
html, body {
height: 100%;
width: 100%;
padding: 0;
margin: 0;
}
#player {
width: 50%;
padding: 0;
}
</style>
<div id="player">
</div>
<script type="text/javascript">
jwplayer("player").setup({
file: "//www.youtube.com/watch?v=VZvzvLiGUtw",
image: "https://hlcasinothai.com/images/providers.png",
height: "80%",
width: "50%",
stretching: "exactfit",
flashplayer:"//cdn.jsdelivr.net/jwplayer/5.10/player.swf"
});
</script>
|
 |
 |
 |
 |
Date :
2018-10-31 13:19:48 |
By :
lchampl123 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อัพเดตอันใหม่ครับ
Code
<script src='https://content.jwplatform.com/libraries/i511f6Xb.js'></script>
<script>jwplayer.key='YOUR_KEY';</script>
<div id="player">Loading the player...</div>
<script>
// Setup the player
const player = jwplayer('player').setup({
file: 'http://content.jwplatform.com/videos/SJnBN5W3-mjpS2Ylx.mp4',
volume: 10
});
// Listen to an event
player.on('pause', (event) => {
alert('Why did my user pause their video instead of watching it?');
});
// Call the API
const bumpIt = () => {
const vol = player.getVolume();
player.setVolume(vol + 10);
}
document.querySelector('#bumpit').onclick = () => { bumpIt(); }
</script>
|
 |
 |
 |
 |
Date :
2018-10-31 13:40:32 |
By :
lchampl123 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|