Script html untuk live streaming di web: Difference between revisions
From OnnoCenterWiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 7: | Line 7: | ||
<body> | <body> | ||
<center> | <center> | ||
<h3>BELAJAR LIVE STREAMING</h3> | <h3>BELAJAR LIVE STREAMING</h3> | ||
<script src=”jwplayer.js" type="text/javascript"></script> | <script src=”jwplayer.js" type="text/javascript"></script> | ||
<div id="nginx"> | <div id="nginx"> | ||
</div> | </div> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
jwplayer('seosmk').setup({ | jwplayer('seosmk').setup({ | ||
'flashplayer': player.swf', | 'flashplayer': player.swf', | ||
'file': 'belajar', | 'file': 'belajar', | ||
'streamer': 'rtmp://Ip-address/hls/', | 'streamer': 'rtmp://Ip-address/hls/', | ||
'autostart': 'true', | 'autostart': 'true', | ||
'stretching': 'exactfit', | 'stretching': 'exactfit', | ||
'controlbar': 'over', | 'controlbar': 'over', | ||
'width': '754', | 'width': '754', | ||
'height': '380' | 'height': '380' | ||
}); | }); | ||
</script><br/> | </script><br/> | ||
<h3><a href="http://ip-addres:8080/hls/nama">Klik Disini Nonton Di Android/BB</a> | <a | <h3><a href="http://ip-addres:8080/hls/nama">Klik Disini Nonton Di Android/BB</a> | | ||
href="http://ip-address:8080/hls/nama">Klik Disini Nonton di i-Phone</a> | <a href="http://ip-address:8080/hls/nama">Klik Disini Nonton di i-Phone</a> | ||
</h3> | </h3> | ||
</center> | </center> | ||
</body> | </body> | ||
</html> | </html> | ||
Revision as of 11:06, 4 January 2015
Membuat web sederhana dengan html untuk memutar streaming dari hp
- Anda juga bisa memutar live streaming anda langsung melalui web, saya telah menyiapkan script yang dibuat dengan html . Ada 2 file yang dipanggil nantinya yaitu jwplayer.js dan player.swf , ini merupakan embedding flash player yang digunakan untuk memutar video hasil live streaming nanti.
Scriptnya sangat sederhana yaitu :
<html>
<body>
BELAJAR LIVE STREAMING
<script src=”jwplayer.js" type="text/javascript"></script>
<script type="text/javascript">
jwplayer('seosmk').setup({
'flashplayer': player.swf',
'file': 'belajar',
'streamer': 'rtmp://Ip-address/hls/',
'autostart': 'true',
'stretching': 'exactfit',
'controlbar': 'over',
'width': '754',
'height': '380'
});
</script>
<a href="http://ip-addres:8080/hls/nama">Klik Disini Nonton Di Android/BB</a> | <a href="http://ip-address:8080/hls/nama">Klik Disini Nonton di i-Phone</a>
</body> </html>
- Untuk mendapatkan file jwplayer.js dan player.swf anda perlu mendownload terlebih dahulu, di google sudah banyak yang mengupload file tersebut, anda tinggal mencarinya dengan kata kunci tersebut.
- Terlihat Ip-address , kita sesuaikan dengan ip address kita . Misalnya ip address kita adalah 192.168.1.107 , ganti saja Ip-address dengan 192.168.1.107.