PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

[Solved] Place Secure Video

s2Member Plugin. A Membership plugin for WordPress®.

[Solved] Place Secure Video

Postby angelazou » January 6th, 2012, 12:18 am

Hi,

I'm using S2member to sell some online videos, and I'm using the JWPlayer approach to do it. The following is the code that I'm using in the page
Code: Select all
<div id="jw-container"></div>
<script type="text/javascript" src="/jwplayer/jwplayer.js"></script>
<script type="text/javascript">
    jwplayer("jw-container").setup({modes: /* JW Player®. */
    [
        /* First try psuedo-streaming with Flash® player. */
        {type: "flash", provider: "http", src: "/jwplayer/player.swf",
            config: {file: "/wp-content/plugins/s2member-files/Network10.mp4"}},
   
        /* Else, try an HTML5 video tag. */
        {type: "html5", provider: "video",
            config: {file: "/wp-content/plugins/s2member-files/Network10.mp4"}},
   
        /* Else, this is a safe fallback. */
        {type: "download", /* Download the file. */
            config: {file: "/wp-content/plugins/s2member-files/Network10.mp4"}}
    ],
    width: 640, height: 480
    });
</script>


You can see the page here http://traynyng.centylyn.com/free-sample-vydeo/ (just replace all the 'y' with 'i'), the player is not loading, though the HTML output seems to be correct.

Angela
Last edited by angelazou on January 15th, 2012, 10:17 am, edited 1 time in total.
User avatar
angelazou
Registered User
Registered User
 
Posts: 72
Joined: July 14, 2011

Re: Place Secure Video

Postby Bruce C » January 6th, 2012, 12:40 am

Are you just using the standard JWPlayer, or do you have the plugin? Try putting this on your website and see if it plays it better:

http://wordpress.org/extend/plugins/jw- ... wordpress/
~Bruce ( a.k.a. Ace )

If you're interested in a Professional Installation, or Custom Coding Job, you can send your request here.

Proud Supporter of:
The Zeitgeist Movement
and Occupy Everything
User avatar
Bruce C
Experienced User
Experienced User
 
Posts: 337
Joined: July 20, 2011

Re: Place Secure Video

Postby angelazou » January 6th, 2012, 1:09 am

I installed the plugin, but the player still doesn't show up. Should I use a different code instead?
User avatar
angelazou
Registered User
Registered User
 
Posts: 72
Joined: July 14, 2011

Re: Place Secure Video

Postby Bruce C » January 6th, 2012, 1:18 am

I would guess there is probably a shortcode for the plugin. Try reading through the settings. It's mostly likely a lot simpler.
~Bruce ( a.k.a. Ace )

If you're interested in a Professional Installation, or Custom Coding Job, you can send your request here.

Proud Supporter of:
The Zeitgeist Movement
and Occupy Everything
User avatar
Bruce C
Experienced User
Experienced User
 
Posts: 337
Joined: July 20, 2011

Re: Place Secure Video

Postby drbyte » January 7th, 2012, 12:53 am

Check the player URL Path, try absolute path http://site.com/jwplayer/player.swf

/jwplayer/player.swf does not exist on sub or main domain


{type: "flash", provider: "http", src: "/jwplayer/player.swf",

That goes too for /jwplayer/jwplayer.js

Sam
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: Place Secure Video

Postby angelazou » January 7th, 2012, 1:31 am

This is the shortcode I'm currently using:

Code: Select all
English Lesson
[jwplayer config=” Training” file=”http://www.centilin.com/wp-content/plugins/s2member-files/Network10.mp4”]

中文课程
[jwplayer config=” Training” file=”http://www.centilin.com/wp-content/plugins/s2member-files/Network10.mp4”]


And the question I have is how does the plugin secures the video from not exposing its address (and therefore preventing user from just typing in the address and not buying the membership)?

Angela
User avatar
angelazou
Registered User
Registered User
 
Posts: 72
Joined: July 14, 2011

Re: Place Secure Video

Postby Bruce C » January 7th, 2012, 1:38 am

s2Member blocks access tot he s2member-files folder directly, so it's not possible for a user to do that.
~Bruce ( a.k.a. Ace )

If you're interested in a Professional Installation, or Custom Coding Job, you can send your request here.

Proud Supporter of:
The Zeitgeist Movement
and Occupy Everything
User avatar
Bruce C
Experienced User
Experienced User
 
Posts: 337
Joined: July 20, 2011

Re: Place Secure Video

Postby drbyte » January 7th, 2012, 1:42 am

As long you are using S2member restriction and downloading options, your files will be protected.

The code seems to be OK, you need to look into the JW player plugin and make sure all of the settings are correct.

Most likely because you are using a sub domain, there might be a misconfiguration.

Sam
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: Place Secure Video

Postby angelazou » January 7th, 2012, 2:24 am

The plugin settings remain the default, I haven't touched that (you can see from the screenshot below). But as you can see from my shortcode, I'm using a custom player configuration called Training. The settings that I have modified (from the default are in the basic settings page).
Picture 1.png

Picture 2.png


Edit: could it be a license problem? I'm using the free version now.
User avatar
angelazou
Registered User
Registered User
 
Posts: 72
Joined: July 14, 2011

Re: Place Secure Video

Postby xigaogen » January 7th, 2012, 4:51 am

If you're running s2Member with mod_deflate for Apache (common on many hosts), you'll want to add this section to the top of your WordPress .htaccess file, so that your installation of Apache will know when it should NOT use GZIP compression.



<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{THE_REQUEST} (?:(?:^|\?|&)s2member_file_download\=.+|(?:^|/)s2member-files/.+)
RewriteRule ^(.*)$ - [E=no-gzip]
</IfModule>
User avatar
xigaogen
Registered User
Registered User
 
Posts: 20
Joined: October 27, 2010

Re: Place Secure Video

Postby angelazou » January 7th, 2012, 5:00 am

But how does that relates to the issue I have right now?

Edit: the HTACCESS rules caused my site to go down.
User avatar
angelazou
Registered User
Registered User
 
Posts: 72
Joined: July 14, 2011

Re: Place Secure Video

Postby angelazou » January 7th, 2012, 7:48 am

I wonder if this is really about JWplayer. I mean if it doesn't work out in the end, would S2member be fine if I switched to another video plugin?

Angela
User avatar
angelazou
Registered User
Registered User
 
Posts: 72
Joined: July 14, 2011

Re: Place Secure Video

Postby xigaogen » January 9th, 2012, 2:38 am

Could you try accessing the URL to the video directly (while you're logged in) to see if it loads? If it doesn't load, then it's not a problem with the player but rather with the s2Member download restrictions. You can also just directly download a txt file instead a video to test it.

If the video loads fine when you access the URL directly in your browser, please try disabling your plugins one-by-one to see if any of those cause the problem to go away (it could be an update to another plugin that started the problem).
User avatar
xigaogen
Registered User
Registered User
 
Posts: 20
Joined: October 27, 2010

Re: Place Secure Video

Postby angelazou » January 9th, 2012, 3:33 am

Well, interestingly enough. The page returned an error message (even with me logged into both sites). The thing is, I'm doing a WPMU set up and this is a subdomain training.centilin.com, whereas the files are located in the path of the main domain www.centilin.com (so the file would be located in www.centilin.com/wp-content/plugins/s2m ... xample.mp4). But I was unable to locate that file due to the error message.
Nevertheless, if you visit the page where this occurred (in my first post), the player still doesn't load.

Angela
User avatar
angelazou
Registered User
Registered User
 
Posts: 72
Joined: July 14, 2011

Re: Place Secure Video

Postby xigaogen » January 9th, 2012, 7:25 am

请用中文说说您遇到的问题。我也遇到放在s2member-files目录下的视频无法播放的问题,但是已经被jason解决了。请参考:http://www.primothemes.com/forums/viewtopic.php?f=4&t=16510&p=59989#p59989
User avatar
xigaogen
Registered User
Registered User
 
Posts: 20
Joined: October 27, 2010

Re: Place Secure Video

Postby angelazou » January 9th, 2012, 9:19 am

Honestly, I mentioned that I had problem directly accessing the file using the absolute path (domain.com/wp-content/plugins/s2member-files/example.mp4), but I later tried with the method mentioned in the configuration page (domain.com/?s2member_file_download=example.mp4), and I can access it without any issues. I think the problem is with the video plugin. I will see what JWPlayer people have to say. Thanks for all the inputs.

Angela
User avatar
angelazou
Registered User
Registered User
 
Posts: 72
Joined: July 14, 2011

Re: Place Secure Video

Postby angelazou » January 9th, 2012, 11:38 pm

I did some more testing and finally got the video plugin up and running. But here is another problem, the player is having difficulty locating the video file.

Okay, so the absolute path to the video file is http://www.domain.com/wp-content/plugin ... work10.mp4, but since I'm using a WPMU installation for a subdomain training.domain.com, the path to access it should be training.domain.com/?s2member_file_download=Network10.mp4.

Here are the combinations that I have tried, but failed to get any of them working (and I'm logged in as the admin all the time).
[jwplayer config="Training" file="http://www.centilin.com/wp-content/plugins/s2member-files/Network10.mp4"]

[jwplayer config="Training" file="http://training.centilin.com/?s2member_file_download=Network10.mp4"]

[jwplayer config="Training" file="[s2File rewrite="yes" file="Network10.mp4" /]"]

I did get the videos show up, if they are outside that folder. So, what's the issue here?

Angela
User avatar
angelazou
Registered User
Registered User
 
Posts: 72
Joined: July 14, 2011

Re: Place Secure Video

Postby Raam Dev » January 11th, 2012, 1:19 pm

Hi Angela,

Please see if this thread helps: viewtopic.php?f=4&t=16510#p59497
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Place Secure Video

Postby angelazou » January 11th, 2012, 11:03 pm

Yes, I tried the HTACCESS rules, but they caused my entire site to go down (and starting to show general errors). I still can access the videos if I use the URLs directly, even with the rewrite URL like 'http://training.centilin.com/?s2member_file_download=Network10.mp4', but once it's in the shortcode, it doesn't work.

Angela
User avatar
angelazou
Registered User
Registered User
 
Posts: 72
Joined: July 14, 2011

Re: Place Secure Video

Postby Raam Dev » January 12th, 2012, 5:29 pm

Have you tried disabling all your plugins (except s2Member) to see if that fixes the shortcode issue? That sounds like it could be a plugin conflict. You can use Plugin Organizer to disable all plugins on just one post/page if disabling them site-wide isn't possible.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Place Secure Video

Postby angelazou » January 12th, 2012, 10:17 pm

I did deactivated the other plugins, but it didn't make any difference.
User avatar
angelazou
Registered User
Registered User
 
Posts: 72
Joined: July 14, 2011

Re: Place Secure Video

Postby Raam Dev » January 13th, 2012, 4:35 pm

Do you have more than one copy of WordPress/s2Member running? In other words, is WordPress/s2Member running on training.domain.com AND domain.com?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Place Secure Video

Postby angelazou » January 13th, 2012, 10:41 pm

Well, I'm using a wordpress multisite installation, but I do not have S2member running on domain.com, only on training.domain.com. But the file system doesn't have an additional folder to hold files for training.domain.com, they are all located in domain.com folder. Hence, the absolute path to the file would be http://www.domain.com/wp-content/plugin ... s/filename.
I purchased the single site license, but that should gave me the ability to run S2member on all of my subdomains, no?

Angela

PS: or was it the multisite config that I missed? I went back to the main site and enabled S2member (although I'm not selling anything there, and have enabled the patches). However, the videos still didn't show up, just a black box.
I've added a sample testing video in the page that I have mentioned in my previous posts (under secure videos). The first two are using the absolute path, whereas the testing video is using the training.domain.com/?s2member_file_download=filename path.
User avatar
angelazou
Registered User
Registered User
 
Posts: 72
Joined: July 14, 2011

Re: Place Secure Video

Postby angelazou » January 15th, 2012, 10:17 am

I got it, it was the missing flashvars parameter I'm missing. Can I suggest to update the instructions on the downloads page for the JW Player WP plugin so more people can benefit from it.
User avatar
angelazou
Registered User
Registered User
 
Posts: 72
Joined: July 14, 2011

Re: Place Secure Video

Postby Raam Dev » January 16th, 2012, 9:49 pm

angelazou wrote:I got it, it was the missing flashvars parameter I'm missing. Can I suggest to update the instructions on the downloads page for the JW Player WP plugin so more people can benefit from it.


Glad to hear you figured it out! Could you explain what you did? Also, which instructions are you referring to?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Next

Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 2 guests

cron