| 1 |
<?php |
| 2 |
// Configuration. |
| 3 |
$s2_jw_config["jwplayer"] = "/jwplayer/"; // Relative URL path to JW Player files directory. |
| 4 |
$s2_jw_config["mp4_video_file_name"] = "video.mp4"; // Name of your MP4 test file. |
| 5 |
// Don't edit anything else below unless you know what you're doing. |
| 6 |
?> |
| 7 |
|
| 8 |
<div id="jw-container">JW Player® appears here.</div> |
| 9 |
<script src="<?php echo $s2_jw_config["jwplayer"]; ?>jwplayer.js"></script> |
| 10 |
<script>jwplayer.key = 'YOUR KEY HERE';</script> |
| 11 |
|
| 12 |
<script> |
| 13 |
jwplayer('jw-container').setup({ |
| 14 |
playlist: |
| 15 |
[{ |
| 16 |
sources: // List all available sources. |
| 17 |
[ |
| 18 |
{type: 'mp4', file: '/wp-content/plugins/s2member-files/s2member-file-inline/<?php echo $s2_jw_config["mp4_video_file_name"]; ?>'} |
| 19 |
// Shortcode equivalent: [s2File rewrite="yes" inline="yes" download="<?php echo $s2_jw_config["mp4_video_file_name"]; ?>" /] |
| 20 |
] |
| 21 |
}], |
| 22 |
primary: 'flash' /* Try Flash® first, fallback on HTML5 or direct download of MP4 file. */, |
| 23 |
width: 480, height: 270 // Set video dimensions for all sources. |
| 24 |
}); |
| 25 |
</script> |
| 26 |
|