I’m having the exact same issue. Hopefully we can get this resolved soon.
The fact that I don’t see the jwplayer javascript file bugs me. So to do some trouble shooting I uploaded the s2hacks.php file to /wp-content/mu-plugins/ and ran it (http://mysite.ca/?reset_aws=yes) to wipe the AWS configuration. This wipes the s2members S3/CloudFront configuration. Now I can just focus on a local installation.
I then uploaded the video.mp4 file to /wp-content/plugins/s2member-files/ and updated the test page shortcode to use the locally hosted video file rather than AWS S3. Again no video!
JWplayer is correctly installed as I can see the javascript file at: http://mysite.ca/jwplayer/jwplayer.js
As before I do not see the jwplayer.js script file included in the browser html source. The theme is a (predominantly) css-customized version of underscores (http://underscores.me/). It has wp_head() which, I would expect, should be sufficient for the s2members plugin to register and enqueue the jwplayer javascript. Perhaps I am getting a plugin conflict. I’ll have to test the configuration tomorrow in the sandbox. Any advice would be appreciated.
Cheers,
Scott
Okay, after a decent night sleep I reconstituted the site on my localhost sandbox. I switched the theme over to twentytwelve. Still no video player showing and, like the live site, I don’t see the jwpalyer.js script in the site header even though I can access it at http://localhost:8080/mytestsite/jwplayer/jwplayer.js. I know about case sensitivities on unix systems. The jwplayer is in the right location. Nothing aberrant is in the htaccess file.
I looked at the other live site where I do have s2member installed and am running a twentytwelve child theme. I’ve using it for audio delivery via /wp-content/plugins/s2member-files/. The jwplayer works there and I do see the jwplayer.js script in the header.
Okay, so maybe it is a plugin conflict. I systematically turned off each plugin and tested for the video player. I’m now down to running only twentytwelve and s2members on WP 3.9.1 and I don’t see the player or javascript file! I downloaded a fresh copy of s2members from the WP repository just in case there was a file corruption. Still no go.
The only relevant difference between the two sites is I don’t currently have PayPal configured on the wayward site or sandbox. I would not expect that playing videos would be tied to having the PayPal configuration setup. Correct me if I am wrong.
Again any advice would be greatly appreciated.
Cheers,
Scott
Okay Cristian and jaswsinc, I see you have been actively addressing other peoples issues over the past few hours. I’d greatly appreciate a pointer in my direction. I’ve re-watched the video tutorials as well as searched the forums. Obviously I’ve got something misconfigured.
I’ve tried the video shortcode [s2Stream player=”jwplayer-v6″ player_path=”/jwplayer/jwplayer.js” file_download=”video.mp4″ rewrite=”yes” /] as well as the file download shortcode [s2File download=”large.jpg” inline=”yes” /]. The file download shortcode just gives me the URL for the file.
Cheers,
Scott
Okay so even though you are planning to only stream video and not have members download it you must fill out the Download Options > Basic Download Restrictions. I’ve set it to unlimited for all levels. This enables the jwplayer javascript in the header of your theme.
AWS S3/CloudFront integration
Once I resolved the above issue I was easily able to setup CloudFront. Here is how:
Log into AWS and create a bucket in Services > S3. Use the bucket naming convention as per s2members instructions. Add this to s2members > Amazon S3/CDN Storage Option panel.
Then create a user in AWS Services > IAM, say s2user. Make sure the “Generate an access key for each User” is selected then click Create. In the popup click Download Credentials. A file should be downloaded that has this users Access Key ID and Secret Access Key. Add these to the s2members > Amazon S3/CDN Storage Option panel.
In the AWS IAM > Users section select your new user. In the Permissions tab click Attach User Policy and scroll down to the CloudFront Full Access policy and click the Select button. I also created a Group to which I added this user and gave the group the CloudFront Full Access policy as with the user. Don’t know it this is optional.
Then select the users Security Credentials tab. Copy the Access Key to the s2members > Amazon S3/CloudFront CDN Storage Options panel. I did give the user a password but this may be optional. It didn’t hurt.
To get the Amazon CloudFront Private Key from AWS click on your login name and select the Security Credentials option from the dropdown. You will get a warning popup which you can just close. Open the CloudFront Key Pairs section and click the Create New Key Pair button then click the Download Private Key File button. Copy the Private Key to the Amazon Private Key section of the s2members > Amazon S3/CloudFront CDN Storage Options panel.
Now select the Yes, automatically configure my Amazon … checkbox and click Save All Changes at the bottom. When the page refreshes after the save you will get error messages. Don’t worry. Go to AWS Services > CloudFront and you should see two distributions (Web and RTMP) with the status labelled as “In Progress”. Wait until the status changes to Deployed. Took me about 20-25 minutes. When you see the Deployed status go back to s2members > Amazon S3/CloudFront CDN Storage Options panel and uncheck the Yes, automatically configure my Amazon … checkbox. Click the click Save All Changes button again. That should clear ay error message.
Now upload a video to your S3 bucket and embed the jwplayer in a protected page as per the instructions.
Perhaps when Jason has time the error message that appears when one saves the Yes, automatically configure my Amazon … checkbox can be finessed to something like “Check AWS CloudFront for the distribution’s status to change to Deployed”. Maybe update the video tutorial if time permits. This really is a great plugin. First time I’ve used it with AWS. Kudos to Jason and the developers.
Cheers,
Scott
I should also add that to play a streamed video, now that you have s2member setup with a AWS IAM user, you have to configure each video with the correct permissions.
To do this select the video in AWS S3 and click the properties tab (upper right side). Click Add More Permissions. Select Authenticated Users for the Grantee and make sure you check Open/Download then click Save.
Cheers,
Scott
Thanks a million for your detailed instructions scott_van