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.

Can't pseudostream MP4 with JWPlayer

Home Forums Community Forum Can't pseudostream MP4 with JWPlayer

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

Topic Author Topic
Posted: Sunday Oct 21st, 2012 at 9:23 pm #29227
Some Dude
Username: amilgrom

I’m working on a page template that uses the JW Player to play a video for a member if they’re logged in, but I can’t seem to get it to work properly when the file is in the /s2member-files directory.

I’m trying to get the video player to play an MP4 file only and then use the HD plugin to allow the user to switch to an HD MP4 file.

The regular MP4 plays but doesn’t pseudostream so for a 20 minute video you’d have to wait until it’s downloaded the part you want to watch before you can skip to it.

When I click the HD button to view the HD file it says that it just can’t find the file.

If I move the video files to another directory or delete .htaccess file from the /s2member-files directory everything works perfectly… except then my files aren’t protected.

Below is the code that I’m currently using in my page template:

jwplayer_tag_callback(‘[jwplayer config=”640×360″ file=”” hd.file=”” image=”” plugins=”hd”]’)

Please note that /home is after because my WordPress site is installed in that directory.

Please help!

  • This topic was modified 4 years, 2 months ago by  Some Dude.

List Of Topic Replies

Viewing 6 replies - 1 through 6 (of 6 total)
Author Replies
Author Replies
Posted: Monday Oct 22nd, 2012 at 1:46 pm #29291
Raam Dev
Username: Raam
Staff Member

The first thing I recommend testing is that those URLs to the video work outside the plugin, i.e., you can visit them with your browser and they properly load the videos. If they do load the videos, then I would check to make sure the URLs are being parsed properly in the plugin, i.e. do “view source” on the page that should show the videos and confirm that the URLs parsed match those you’re expecting (and that you can visit them directly with your browser).

You might also want to try using a download key in your file URLs (see Dashboard -› s2Member® -› Download Options -› Advanced Download Restrictions) to see if that fixes the problem with JWPlayer.

Posted: Monday Oct 22nd, 2012 at 10:50 pm #29355

I have no experience with switching to HD in the player and s2Member’s protection, but I wanted to link to a couple of things that may be useful:

Knowledge Base » JW Player sample code not working

I hope that helps. :)

Posted: Thursday Oct 25th, 2012 at 2:42 pm #29682
Some Dude
Username: amilgrom

I tried typing the link to the video file directly into my browser and SD video plays, but doesn’t pseudostream, the HD file didn’t play at all… but as soon as I deleted the .htaccess file and refreshed those links, both files played and pseudostreamed perfectly.

I suspect that there may be some rewrite rules getting in the way. Is there a way I can delete part of the htaccess file so that it only protects the content from unauthenticated users and doesn’t provide any of it’s other features.

Posted: Friday Oct 26th, 2012 at 8:12 am #29753

If you remove the .htaccess file from the s2member-files folder, then they won’t be protected. Instead, did you try using a download key as Raam suggested?

If you want to stream, it’s best to use the Amazon integration, though. Have you tried it? Video » s2Member® File Downloads (Amazon S3/CloudFront/JW Player)

Posted: Wednesday Oct 31st, 2012 at 9:56 pm #30294
Some Dude
Username: amilgrom

I took your advice and setup an account with Amazon and reconfigured my template to use the RTMP stream and it works great! My only issue it that I would like to be able to serve both SD and HD versions of my video. I know that JW player supports bitrate switching when using RTMP, but I don’t know how to setup that up to work with the code provided.

I read some info at the JW website here. Can you please let me know if or how this will work with the S2member provided code?

Posted: Friday Nov 2nd, 2012 at 3:40 am #30396

I haven’t tried it myself. The code example in s2Member may not include bitrate switching.

The example you linked to in JW’s site, shows one adds the URL for each file, so I don’t see why it’d be a problem if you have those files in the protected Amazon bucket and you link to them properly (follow the JW examples in s2Member for this).

Let me know how it goes. :)

Viewing 6 replies - 1 through 6 (of 6 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.