latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Why doesn't the JW Player code example work ?

Home Forums Community Forum Why doesn't the JW Player code example work ?

Tagged: 

This topic contains 3 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years ago.

Topic Author Topic
Posted: Wednesday Dec 19th, 2012 at 3:03 pm #35089
JAMES HALL
Username: jhall_3rd

I’m using the JW Player version 6 example. (btw, the long tail site says that v6 doesn’t completely work in WP….)
But it’s realy nice and you all put a great code snipped on the plugin page BUT i do not know why it won;t work for me (doh).

http://online.semantica-portuguese.com/test-s2member-jw-player

login: test/test

You’ll see that the path to the video file isn;t getting embedded — YES, i’ve installed and activated the plugin “Insert PHP”

My code:

<?php
// Configuration.
$s2_jw_config["jwplayer"] = "../jwplayer/"; // Relative URL path to JW Player files directory.
$s2_jw_config["mp4_video_file_name"] = "lesson-15-wi-fi-high.mp4"; // Name of your MP4 test file.
// Don't edit anything else below unless you know what you're doing.
?>

<div id="jw-container">JW Player® appears here.</div>
<script type="text/javascript" src="<?php echo $s2_jw_config["jwplayer"]; ?>jwplayer.js"></script>
<script type="text/javascript">
    jwplayer('jw-container').setup({
            playlist:
                [{
                    sources: /* List all available sources. */
                        [
                            {type: 'mp4', file: '/wp-content/plugins/s2member-files/s2member-file-inline/<?php echo $s2_jw_config["mp4_video_file_name"]; ?>'}
                                /* Shortcode equivalent: [s2File rewrite="yes" inline="yes" download="<?php echo $s2_jw_config["mp4_video_file_name"]; ?>" /] */
                        ]
                }],
            primary: 'flash' /* Try Flash® first, fallback on HTML5 or direct download of MP4 file. */,
            width: 480, height: 360 /* Set video dimensions for all sources. */
        });
</script>

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Thursday Dec 20th, 2012 at 8:55 am #35151

The page is protected, so I couldnt’ see it. Could you remove the restriction for that page? Thanks!

Posted: Thursday Dec 20th, 2012 at 9:26 am #35162
JAMES HALL
Username: jhall_3rd

Sorry Cris — i had removed the login — try again as test/test.

Posted: Friday Dec 21st, 2012 at 8:01 am #35234

http://online.semantica-portuguese.com/test-s2member-jw-player

Now it returns a 404. Could you create the page with the player again, please? thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.