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.

Cloudfront and JW Player

Home Forums Community Forum Cloudfront and JW Player

This topic contains 3 replies, has 3 voices. Last updated by  Jason (Lead Developer) 4 years, 10 months ago.

Topic Author Topic
Posted: Thursday Feb 9th, 2012 at 10:06 pm #4713

I know your new rules say that you don’t provide support for other plugins, but since your documentation specifically includes sample code for integrating JW Player, I assume you can respond to this question.

Using WordPress 3.3.1
S2 Member Pro v111220
JW Player 1.5.5

I’m using CloudFront, and my settings states: “Your Amazon® CloudFront Distributions are: ( ALREADY configured! )”, so I assume it’s working properly.

JW Player files “player.swf” and “jwplayer.js” are in a folder named “jwplayer” on the root level of my site.

The video I want to stream is named “video.mp4”, and it’s in my Cloudfront bucket. The page on which I’m trying to embed it has no member-level or page-level restrictions on it.

I copied the following code from your Download Options: JW Player & RTMP Protocol Examples. I entered the filepath to my video file, using Advance Mod-Rewrite, but I can’t get the video player to appear on the page.

Here’s the url for the page:

http://rockitscience.com/wordpress/test-19/

Since the video file is in the protected bucket, you won’t be able to test it yourself unless you register. If you’re willing to do that, I can email you a username and password.

Thanks in advance for your help. Here’s the code:
/*

JW Player® appears here.




    
        jwplayer("jw-container").setup({modes: /* JW Player®. */
        [
            /* First try real-time streaming with Flash® player. */
            {type: "flash", provider: "rtmp", src: "/jwplayer/player.swf",
                config: {streamer: "", file: ""}},
        
            /* Else, try an HTML5 video tag with the `mp4` file. */
            {type: "html5", provider: "video",
                config: {file: ""}},
    
            /* Else, try an HTML5 video tag with a `webm` file. */
            {type: "html5", provider: "video",
            config: {file: ""}},
        
            /* Else, this is a safe fallback. */
            {type: "download", /* Download the file. */
                config: {file: ""}}
        ],
        /* Set video dimensions. */ width: 480, height: 270
        });
    


    Sorry, you do NOT have access to this file.

*/

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Thursday Feb 9th, 2012 at 10:21 pm #4715

Sorry, the raw code shows up in the preview, but the first half of it disappears when it’s published. Here’s the part of the code where I inserted my filepath:

/*

if (($mp4 = http://rockitscience.com/wordpress/wp-content/plugins/s2member-files/video.mp4 ($mp4_cfg, "get-streamer-array")) 
                        && ($webm["url"] = http://rockitscience.com/wordpress/wp-content/plugins/s2member-files/video.mp4 ($webm_cfg))) { ?>
                        

*/

Posted: Tuesday Feb 14th, 2012 at 7:02 pm #5098
Raam Dev
Username: Raam
Staff Member

Hi John,

Two things:

1) In your second post, you have a code example that is incorrect. It looks like you saw this code:

$mp4 = s2member_file_download_url ($cfg, "get-streamer-array")

and replaced s2member_file_download_url with the actual URL to the video. That is incorrect. s2member_file_download_url is a function:

s2member_file_download_url($mp4_cfg, "get-streamer-array")

So, the correct code should be:

$mp4 = s2member_file_download_url ($mp4_cfg, "get-streamer-array")

2) Regarding the rest of your question, please see these two threads from the old forum. They may have relevant information:

http://www.primothemes.com/forums/viewtopic.php?t=15512&p=46812
https://www.primothemes.com/forums/viewtopic.php?t=16272&p=56620

Posted: Thursday Feb 23rd, 2012 at 1:20 am #6055
Staff Member

There is also a new video tutorial that might assist.
Video » s2Member® File Downloads (Amazon S3/CloudFront/JW Player)

<Embed Playlist>
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.