Page 1 of 1

JW Player 5.7

PostPosted: August 2nd, 2011, 1:33 pm
by drbyte
Hi Jason

Can you please confirm that JW Player 5.7 HTML5 works with protected files inside the s2m folder
Code: Select all
<script type='text/javascript' src='/jwplayer.js'></script>
<div id='mediaplayer'></div>
<script type="text/javascript">
  jwplayer('mediaplayer').setup({
    'id': 'playerID',
    'width': '480',
    'height': '270',
    'file': 'http://www.site.com/?s2member_file_download=sample.mp4&s2member_file_inline=yes&type=video',
    'modes': [
        {type: 'html5'},
        {type: 'flash', src: '/player.swf'},
        {type: 'download'}
    ]
  });
</script>


Thanks

Re: JW Player 5.7

PostPosted: August 2nd, 2011, 3:04 pm
by drbyte
I am confirming that none of the video links using ?s2member_file_download= are working. I'm using different player including html5 video tags. JW Player, Video JS, Kaltura's HTML5 Video. I think the video tags either stripping and not reading correctly the ? or & or tags?

Please confirm

Thank you

Edit: I got it to work with Kaltura (flash fallback)

Re: JW Player 5.7

PostPosted: August 3rd, 2011, 12:32 pm
by drbyte
Some updates:

FireFox + admin: player does not work error (The video could not be loaded, either because the server or network failed or because the format is not supported:). Somehow under some circumstance admin is not given full access to view an inline extension.

Google Chrome + any level: Player works and can watch the video. No errors. You don't have to use &s2member_file_inline=yes&type=video in your url

Android 2.2.1 + JW Player: error (cannot play video) Does not support mp4 format and it wont fallback to flash.

VideoJS support to HTML5 is much better than JWPlayer and it fallback to flash just fine using Flowplayer.

Network Protocols
RTSP (RTP, SDP)
HTTP progressive streaming
HTTP live streaming draft protocol (Android 3.0 and above)
Note: HTTPS is not supported at this time.

More updates: (Android 2.2.1 & Iphone 4G) The /?s2member_file_download= seems to be causing lots of issues under all levels including admin with different players. Direct url works fine (server or amazon s3)

Re: JW Player 5.7

PostPosted: August 6th, 2011, 1:12 pm
by Jason Caldwell
Taking a look now. Thanks for your work on this.

Re: JW Player 5.7

PostPosted: August 7th, 2011, 1:42 pm
by Jason Caldwell
OK. Yea, there are a couple of "gotchyas" to be aware of when you use the /jwplayer.js API.

1. Always start the location of your file with a leading slash ( "/" ).
( i.e. .../?s2member_file_download=/video.mp4 )

2. Always end your source URL with the location of the file.
( i.e. .../?s2member_file_inline=yes&s2member_file_download=/video.mp4 )

3. Always add ?type=video to the player.swf location.
( i.e. .../player.swf?type=video )

Examples here with proof that this works:
See: http://jason.websharks-inc.net/jwplayer/
Code: Select all
<script type = "text/javascript" src = "jwplayer.js"></script>
<div id = "container"></div>
<script type="text/javascript">
jwplayer('container').setup({
    'id': 'playerID',
    'file': 'http://jason.websharks-inc.net/?s2member_file_inline=yes&s2member_file_download=/video.mp4',
    'height': '270',
    'width': '480',
    'modes':[
    {type: 'html5'},
    {type: 'flash', src: 'player.swf?type=video'},
    {type: 'download'}]
});
</script>


Here is another example with a .webm file, for true HTML5 support in JWPlayer.
Code: Select all
<script type = "text/javascript" src = "jwplayer.js"></script>
<div id = "container"></div>
<script type="text/javascript">
jwplayer('container').setup({
    'id': 'playerID',
    'file': 'http://jason.websharks-inc.net/?s2member_file_inline=yes&s2member_file_download=/video.webm',
    'height': '270',
    'width': '480',
    'modes':[
    {type: 'html5'},
    {type: 'flash', src: 'player.swf?type=video'},
    {type: 'download'}]
});
</script>
* See: http://jason.websharks-inc.net/jwplayer/webm.php

Re: JW Player 5.7

PostPosted: August 7th, 2011, 11:37 pm
by drbyte
Hi Jason

Thank you for the updates

Can you please create a temp account so I can access the video page you created. I can't seem to get any of the videos to play on the Android or the iPhone using the code above.

MP4:
Player keeps looping with no playback.
Does not show on IE9 (it's JWPlayer Bug..not S2M)
Plays OK with Firefox

Webm:
OK with Firefox
No go with Andriod or iPhone. When you go to the video page, for seconds it try to open /?s2member_file_inline=yes&s2member_file_download=/video.mp4 (you can see on the address bar) and then loops back to the video page. No Playback

Thank you

Sam

Re: JW Player 5.7

PostPosted: August 8th, 2011, 9:39 pm
by Jason Caldwell
Thanks for the follow-up.

Here is a User/Pass for:
jason.websharks-inc.net

Username: temp
Password: password

I see what you're talking about. I have the same result when testing on Android in the default browser. When I tested Android running Firefox, the test succeeded. I suspect this has something to do with the chunked delivery that s2Member uses for optimization. It seems to be causing problems on smartphones. I'm investigating further now.

Re: JW Player 5.7

PostPosted: August 8th, 2011, 10:46 pm
by drbyte
Hi Jason..

thank you for the follow up. I just tested the video and it's working on Android default browser. Did you do anything or it's just the default values?

I believe you are right about the video size delivered to the default browser. I just tested s 1MB video and it's working fine. I am now testing a different sizes and will report back.

Thank you for the user setup.

Re: JW Player 5.7

PostPosted: August 8th, 2011, 10:55 pm
by Jason Caldwell
Configuring s2Member to use an Amazon S3 Bucket seems to resolve the issue for JWPlayer on Android. Not sure exactly why yet, but this is working in Android 2.3.4 for me with the default browser: http://jason.websharks-inc.net/jwplayer/

Re: JW Player 5.7

PostPosted: August 8th, 2011, 10:56 pm
by Jason Caldwell
I agree. This seems to be related to query string variables in the URL leading to the video file. Although, I've tried several variations and I've not been able to nail down the exact issue ( or a workaround I should say ). In any case, this seems to be a smartphone issue more than an s2Member issue, as any URL which contains a query string and leads to a video file may cause this problem. That being said, if we can find a workaround, I'd love to implement it.

Related articles:
http://stackoverflow.com/questions/6590 ... cloudfront
https://forums.aws.amazon.com/thread.js ... adID=71087

Re: JW Player 5.7

PostPosted: August 8th, 2011, 11:47 pm
by drbyte
Interesting!! it seems to be working OK with Amazon with max of 50mb...above that it's not :?

Thank you Jason for taking the time..I know you are a busy man...thank you so much

I will look into this again tomorrow

Sam

Re: JW Player 5.7

PostPosted: August 11th, 2011, 7:34 am
by drbyte
Hi Jason

After minor code cleaning I got the JWPlayer HTML5 and Amazon S3 to work on Android, iPhone, iPad

Thank you

Re: JW Player 5.7

PostPosted: August 18th, 2011, 11:41 pm
by poofer
Hi there, I am new to this world of video streaming and protected content, so please be kind :) I am having trouble figuring out how to stream video files with s2member's protected file system. I am using JWPlayer 5.7 and tried the code that Jason posted above, but I can't get it to work. My files are hosted on Amazon S3 and I've configured the area under Download Options > Amazon S3. Linking directly to the video file (.mp4) in my bucket works with the above code, but that of course defeats the purpose of protecting the files. I feel like there is a disconnect between s2member and Amazon S3 and I am at wits end trying to find a solution :(

Here is what I have on my page... I'm not sure if I have it set up correctly-- I basically just copied what s2member said the download link would be and what Jason said above, then dropped in the filename from my bucket.

Code: Select all
<div id='mediaspace'>Please wait while your video is loading.</div>

<script type="text/javascript">
jwplayer('mediaspace').setup({
    'id': 'playerID',
    'file': 'http://www.lydaslanguages.com/wp/?s2member_file_inline=yes&s2member_file_download=/Spanish-Lesson-03.mp4',
    'height': '270',
    'width': '480',
    'modes':[
    {type: 'html5'},
    {type: 'flash', src: '/scripts/player.swf?type=video'},
    {type: 'download'}]
});
</script>


Sorry if I am asking something really obvious, I really appreciate anyone's input! ^_^

Re: JW Player 5.7

PostPosted: August 20th, 2011, 12:15 am
by drbyte
Hi

http://www.lydaslanguages.com/wp/?s2mem ... son-03.mp4

Is the /wp/ part of your site?

you might want to use this

http://www.lydaslanguages.com/?s2member ... son-03.mp4

Download options > Inline File Extensions >Default Inline File Extensions ( comma-delimited ):> add the mp4 extension if nothing in there

Sam

Re: JW Player 5.7

PostPosted: August 20th, 2011, 12:42 am
by poofer
Thanks for responding! I have tried as you suggested with the link and adding the mp4 extension, but still get the following error message:

The video could not be loaded, either because the server or network failed or because the format is not supported: http://www.lydaslanguages.com/?s2member ... son-03.mp4

Any other suggestions?

Re: JW Player 5.7

PostPosted: August 20th, 2011, 1:00 am
by drbyte
the code above is to work with html5 smartphones and the format has to be within the specs of the device to function. iPhone, iPod, Android most will read MP4, H264, HE-AAC
iPad is something else and requires a much higher resolution to work. MP4, MPEG4 ot H264, LC-AAC, 480 or 720

JW Player:

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12538/supported-player-embed-methods

Use the default JW Player and S2M configurations and it should work

Just a note: did you give your bucket the correct permission? it should be read to Everyone. All the files inside is set to use the default (owner read only)