latest stable versions: v140614 (changelog)

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

jwplayer Filename bug?

Home Forums Community Forum jwplayer Filename bug?

This topic contains 5 replies, has 4 voices.
Last updated by  Jason (Lead Developer) 1 year, 5 months ago.

Topic Author Topic
Posted: Saturday Jan 26th, 2013 at 9:10 am #39683

Our streaming works perfectly, but recently we noticed that our mobile viewers were not working properly.
Our site is still under development, so I’m not certain if it was an s2Member update that caused the problem. Our older test site seems to work okay in Mobile, so I believe it must have been some sort of update.

Our RTMP files were working perfectly in our browsers (flash), but when we forced it to MP4 mode to check on why our mobile was not working we found some weirdness.

Our test file worked perfectly:

$s2_jw_config["mp4_video_file_name"] ="/demo/video_no_space.mp4";
...
 sources:
                               [
                                   {type: "mp4", file: ""}
                               ]

As soon as we introduced spaces, the streaming worked fine, but the MP4 got borked.

ie:

$s2_jw_config["mp4_video_file_name"] ="video with spaces.mp4";
...
 sources:
                               [
                                   {type: "mp4", file: ""}
                               ]

We get the dreaded “Error loading media: File could not be played”.

After a bit of digging, and our hatred of spaces in file names, I tried urlencoding it.

$s2_jw_config["mp4_video_file_name"] = urlencode("1 pushup knees on ball.mp4");
 ...
  sources:
                                [
                                    {type: "mp4", file: ""}
                                ]

BINGO! Now I’m not sure if this should be in s2Member or on the end user? Would be kinda nice to have it auto urlencode.

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Saturday Jan 26th, 2013 at 10:09 am #39691
Echomango
Username: echomango

Hi Seth – I am no expert on this area but when reading your post I wondered if you are using JWPlayer 6? If so, that player has an automatic delivery to mobile devices. JWPlayer 5 had no such capacity and from what you have written it sounds like you had some other way to translate the files to be seen via mobile. What I am wondering is if you have switched to JWPlayer 6 could it be that the player is trying to convert for mobile and your previous method is also trying to do the same thus creating a problem?

Posted: Monday Jan 28th, 2013 at 8:29 am #39764

Echomango,

We are indeed using jwPlayer6. Its just weird though the mobile doesn’t work without specifying that MP4 code for some reason. I’m not sure why it works with the streaming portion though.

Regards

Posted: Tuesday Jan 29th, 2013 at 8:45 pm #39952
Bruce
Username: Bruce
Staff Member

Thank-you for reporting this important issue.

I’m sending these details to Jason to look at.

Posted: Monday Feb 4th, 2013 at 4:44 am #40592
Staff Member

Thanks for the heads up on this thread :-)

Investigating this. Thanks for your patience.

Posted: Monday Feb 4th, 2013 at 7:55 pm #40799
Staff Member

I believe the underlying issue here is with a difference in the CloudFront API, with respect to streaming vs. download distros. The resource identifiers and endpoint URLs should be encoded differently, depending on whether we’re talking with a streaming distribution or a downloads distribution. We’ve found a way to correct this behavior and standardize things within s2Member®.

I’m attaching a PATCH file if you’d like to experiment. Please unzip and upload the attached file, allowing it to override your existing copy of /s2member/includes/classes/files-in.inc.php

Please specify the file name without encoding, like this:

$s2_jw_config["mp4_video_file_name"] ="video with spaces.mp4";

s2Member® will take care of the internal specifics for you.

PATCH: http://d1v41qemfjie0l.cloudfront.net/s2member/uploads/files-in.inc_.php_.zip

Viewing 5 replies - 1 through 5 (of 5 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 WordPress.org. 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.