Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

2017.05.

23 CDNet Tech Support

Quick Guide: JWPlayer + NGINX


Prerequisites

Detail
• Install Webserver Nginx
• Video file to test.

• Note : Add HTTP / HTTPS service to Firewall.


• firewall-cmd --zone=public --permanent --add-service=http
• firewall-cmd --zone=public --permanent --add-service=https
• firewall-cmd --reload

Copyright © PT. IONCYBILL. All rights reserved. 2


JWPlayer

Detail
1. Create Account on jwplayer.com
2. Sign In and go to download section

Copyright © PT. IONCYBILL. All rights reserved. 3


JWPlayer

Detail
3. Download JW Player Self-Hosted and
copy License Key.

Copyright © PT. IONCYBILL. All rights reserved. 4


JWPlayer

Detail
4. Upload jwplayerXX.zip and video file to
your webserver root folder (ex. nginx)
5. Example : winscp (SFTP)

Copyright © PT. IONCYBILL. All rights reserved. 5


JWPlayer

[root@localhost ~]# vi /usr/share/nginx/html/index.html Detail


<html> 6. Make a backup for index.html
<head>
7. Edit and save index.html
<script type="text/javascript" src="jwplayer-7.11.2/jwplayer.js"></script>
<script type="text/javascript">jwplayer.key="xxxxxxx-xxxxxxx-xxxxxxx-xxxxxxx";</script> 8. Copy License Key to jwplayer.key
</head> 9. Restart Nginx service
<body>
<div id="video">Loading the player...</div>
<script type="text/javascript">
var playerInstance = jwplayer("video");
playerInstance.setup({
file: "video.flv", #video file
title: "video"
});
</script>
</body>
</html>

Copyright © PT. IONCYBILL. All rights reserved. 6


JWPlayer

Detail
10. Open browser and check the result.

Copyright © PT. IONCYBILL. All rights reserved. 7


End of Document

Copyright © PT. IONCYBILL. All rights reserved.

You might also like