Community Support Forums — WordPress® ( Users Helping Users ) — 2011-11-08T12:23:59-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14780 2011-11-08T12:23:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=52552#p52552 <![CDATA[Re: Video playback/performance across multiple platforms]]>
Thank you for the code. Works as it should be.

Sorry for not being around here lately, got me couple of heavy duty projects. The custom post type updates in your latest release are awesome. Thank you

Sam

Statistics: Posted by drbyte — November 8th, 2011, 12:23 pm


]]>
2011-10-20T17:24:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=48433#p48433 <![CDATA[Re: Video playback/performance across multiple platforms]]>

PS. I know WordPress might be the wrong option for this kind of site but We started with WordPress as a simple video site and now it's all over the place.
I think you're doing just fine. Seems like a good fit for WordPress to me :)

Statistics: Posted by Jason Caldwell — October 20th, 2011, 5:24 pm


]]>
2011-10-20T17:23:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=48432#p48432 <![CDATA[Re: Video playback/performance across multiple platforms]]> Thanks for the reply Sam.

Right, so inside your PHP template file for these Custom Posts, you might have something like this:
Code:
<?php
$cfg 
= array ("file_download" => get_post_meta(get_the_ID(), "playmovie", true), "url_to_storage_source" => true, "count_against_user" => true); ?>

<?php if (($mp4 = s2member_file_download_url ($cfg, "get-streamer-array"))) { ?>

<script type="text/javascript">... and so on ...
See also: http://codex.wordpress.org/Function_Ref ... get_the_ID
and http://codex.wordpress.org/Function_Ref ... _post_meta

Recording unique downloads on a per-post basis is not something s2Member does by default. So you may need to integrate a script of your own that records this information as the video is viewed. Please note this documentation regarding "count_against_user" => true. See: viewtopic.php?f=40&t=12453#src_doc_s2member_file_download_url%28%29

Statistics: Posted by Jason Caldwell — October 20th, 2011, 5:23 pm


]]>
2011-10-17T21:40:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=48244#p48244 <![CDATA[Re: Video playback/performance across multiple platforms]]>
Thank you for the recent updates.

I looked at the plugin and it seems to work in some situations but that's not what I have in mind.

In my template, I created a custom post type by using this in my function.php

<?php
// Fire this during init
register_post_type('movies', array(
'label' => __('Movies'),
'singular_label' => __('Movies'),
'public' => true,
'show_ui' => true,
'capability_type' => 'post',
'hierarchical' => false,
'rewrite' => false,
'query_var' => false,
'supports' => array('title', 'editor', 'author', 'custom-fields')
));
?>

Then I created a custom page called single-movies.php

Now, instead of using create a new post I have this custom post type in my admin page:
001.jpg

Now in the single-movies.php I have the JW Player code provided by S2:

<?php $cfg = array ("file_download" => "video.mp4", "url_to_storage_source" => true, "count_against_user" => true); ?>

<?php if (($mp4 = s2member_file_download_url ($cfg, "get-streamer-array"))) { ?>

<script type="text/javascript">...........

So now all I have to do is add the custom filed and the video.mp4 above will be populated with the new value.

<?php echo get_post_meta($post->ID, playmovie, true); ?>

002.jpg


I need to create a new post for each video that I create, for example: The Little Princess (1939), I need to create a new custom post type that contain the video



4.jpg
6.jpg

I need to keep track of how many times the movie been watched (member only) as the original post would have incorrect hits form none members and boots

I am trying to avoid having to insert a code inside any post as I might change it. This way one custom field can support multiple codes. This is very helpful because we have over 2000 posts and will have the same number in custom post types.

Not sure if the plugin above works for that matter or you have any other ideas that might be better that what I'm doing

Thank you

Sam

PS. I know WordPress might be the wrong option for this kind of site but We started with WordPress as a simple video site and now it's all over the place.

Statistics: Posted by drbyte — October 17th, 2011, 9:40 pm


]]>
2011-10-17T16:34:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=48207#p48207 <![CDATA[Re: Video playback/performance across multiple platforms]]> http://wordpress.org/extend/plugins/shortcode-exec-php/ To get the custom field associated with your Page/Post, see: http://codex.wordpress.org/Function_Ref ... _post_meta

Statistics: Posted by Jason Caldwell — October 17th, 2011, 4:34 pm


]]>
2011-10-17T07:14:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=46947#p46947 <![CDATA[Re: Video playback/performance across multiple platforms]]>
I have a question

Is it possible to insert a custom field value into this <?php $cfg = array ("file_download" => "video.mp4", "url_to_storage_source" => true, "count_against_user" => true); ?>

The video.mp4 will be replaced to whatever the custom filed have.

The idea of this is to use a custom field to populate the movie player instead of having to hard code the whole JW Player code into each post.

For example: post 1234 have a custom filed name movie and the value is sam.mp4. When published the video.mp4 in the original code above will be replaced by sam.mp4

Thank You

Sam

Statistics: Posted by drbyte — October 17th, 2011, 7:14 am


]]>
2011-10-16T22:22:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=46940#p46940 <![CDATA[Re: Video playback/performance across multiple platforms]]> Thank you Sam. I believe we have this issue fixed in the development copy, coming in public release tomorrow. Here is an excerpt from the changelog regarding this issue.

* (s2Member/s2Member Pro) **Compatibility**. Improvements to s2Member's JW Player® integration. s2Member now prevents `unreserved chars`, i.e. `array ("-", ".", "_", "~")` from being URL-encoded in file download URLs, maximizing compatibility with many media players, including JW Player®. In previous releases, JW Player® would randomly fail on some RTMP streams with error `Stream Not Found`. Fixed in this release. For further details, see [RFC 3896](http://www.faqs.org/rfcs/rfc3986.html).

Statistics: Posted by Jason Caldwell — October 16th, 2011, 10:22 pm


]]>
2011-10-15T07:52:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=46891#p46891 <![CDATA[Re: Video playback/performance across multiple platforms]]>
There is a problem with S3&Cloud serving the same file within short periods. It player fine the first time but if the same file get requested, lets say by the iPhone, is shows an error "stream not found"

Then when I go back to the screen where it was working and refresh the page it will not play and will give you the same error above "stream not found"

I tried that so many times and getting the same results

Note: Different user logins (meaning as an admin from a PC and a paid user form an iPhone)

Can you please verify and let me know

Sam

Statistics: Posted by drbyte — October 15th, 2011, 7:52 am


]]>
2011-10-07T19:23:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=45080#p45080 <![CDATA[Re: Video playback/performance across multiple platforms]]> I'll continue to look into this. You've probably seen this, but just in case:
http://www.longtailvideo.com/support/jw ... l5-support

Statistics: Posted by Jason Caldwell — October 7th, 2011, 7:23 pm


]]>
2011-10-03T23:19:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=44772#p44772 <![CDATA[Re: Video playback/performance across multiple platforms]]>
Thank you...Yes the JW Player works fine in IE9. I was referring to the video tags. But I am suspecting that it has to do something with IE. Other than that, works fine using video tags and JWplayer in all

Thank you again..Fantastic work.

Sam

Statistics: Posted by drbyte — October 3rd, 2011, 11:19 pm


]]>
2011-10-01T15:14:44-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=42084#p42084 <![CDATA[Re: Video playback/performance across multiple platforms]]>

Well beside the missing dash in the key code, it seems that CNAMES setup using s2-file-downloads does work but something like this ford36.site.com does not.
Interesting. Hmm, I'll test that sub-domain on my end before the next update. I was not aware that CloudFront had any restrictions on numerics in a sub-domain, but I'll test again to see what might be causing a problem.

Working on iPad, iPhone, Android, Safari, Chrome, FireFox
Not working on IE9
Not tested on Windows Mobile
Will post more data when Available

Can I see the JW Player code snippet that you're using please? I got JW Player to work in IE9, but maybe there is something I'm missing.

Is there any expiration date to the policy generated by S3&Cloudfront. Not using s2member file download key
(not sure if the download key needed in this situation - no effects on the link generated by S3$Cloudfront policy unless i am missing something)
Code:
    http://s2-file-downloads.site.com/video.mp4?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDovL3MyLWZpbGUtZG93bmxvYWRzLm9ubGluZWFyYWJpY21vdmllcy5uZXQvY29kZV8zNl9tb2JpLm1wNCsfhhgjRpdGlvbiI6eyJJcEFkZHJlc3MiOnsiQVdTOlNvdXJjZUlwIjoiNzYuOTMuMTcuMjM1LzMyIn0sIkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxMzE3NDAxNjc3fX19XX0_&Signature=gS5DuWtcz0wn-T3OYyXHpHm4sGtqonx4uNf~MlhhyEp12rL85HVJIVhjyutw4DrJCCUcYQ5EkQVS4K10xKk3Wr8fCB8D4DI293aTqFw3zp0Uy9WUdJQ79lEs1Oq4oE3cVUHHuvm6LfSbiO18VxLsMCVrwbQykCS57r1SHhpcI2I_&Key-Pair-Id=APKAJMYQ54GHSTY7ESAEQ

Yes, the resulting CloudFront link expires in 24 hours. s2Member can safely allow 24 hours in CloudFront links, because the Policy also ties the link to a specific IP address; thereby preventing any possibility of link sharing.

Statistics: Posted by Jason Caldwell — October 1st, 2011, 3:14 pm


]]>
2011-09-29T12:16:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=41928#p41928 <![CDATA[Re: Video playback/performance across multiple platforms]]>
Is there any expiration date to the policy generated by S3&Cloudfront. Not using s2member file download key
(not sure if the download key needed in this situation - no effects on the link generated by S3$Cloudfront policy unless i am missing something)

example:


Code:
http://www.site.com/wp-content/plugins/s2member-files/video.mp4


generates this: (unique link)

Code:
http://s2-file-downloads.site.com/video.mp4?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDovL3MyLWZpbGUtZG93bmxvYWRzLm9ubGluZWFyYWJpY21vdmllcy5uZXQvY29kZV8zNl9tb2JpLm1wNCsfhhgjRpdGlvbiI6eyJJcEFkZHJlc3MiOnsiQVdTOlNvdXJjZUlwIjoiNzYuOTMuMTcuMjM1LzMyIn0sIkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxMzE3NDAxNjc3fX19XX0_&Signature=gS5DuWtcz0wn-T3OYyXHpHm4sGtqonx4uNf~MlhhyEp12rL85HVJIVhjyutw4DrJCCUcYQ5EkQVS4K10xKk3Wr8fCB8D4DI293aTqFw3zp0Uy9WUdJQ79lEs1Oq4oE3cVUHHuvm6LfSbiO18VxLsMCVrwbQykCS57r1SHhpcI2I_&Key-Pair-Id=APKAJMYQ54GHSTY7ESAEQ


Does the above link expires?

Updates

It Does expire :) AccessDeniedAccess denied

Awesome work Jason. The Playback is super fast and seeking is smooth like slick.

Statistics: Posted by drbyte — September 29th, 2011, 12:16 pm


]]>
2011-09-28T04:18:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=41818#p41818 <![CDATA[Re: Video playback/performance across multiple platforms]]>
It seems it's taking it now...still in progress

Finally...It's a boy :)

Well beside the missing dash in the key code, it seems that CNAMES setup using s2-file-downloads does work but something like this ford36.site.com does not.

Updates:

Working on iPad, iPhone, Android, Safari, Chrome, FireFox

Not working on IE9

Not tested on Windows Mobile

Will post more data when Available

Statistics: Posted by drbyte — September 28th, 2011, 4:18 am


]]>
2011-09-27T22:31:43-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=41759#p41759 <![CDATA[Re: Video playback/performance across multiple platforms]]>
I am trying to config both but keep getting this

Unable to auto-configure Amazon® CloudFront Distributions.
Error code: 409. Error Message: Unable to create Amazon® CloudFront Downloads Distro. Unable to create Amazon® CloudFront Downloads Distro. Conflict

Do we have to change the bucket in the S3 configuration?

I am also trying to setup CNAMES

any ideas? I deployed a new bucket and a new CNAMES but still getting the same error

Thanks


Sam

Statistics: Posted by drbyte — September 27th, 2011, 10:31 pm


]]>
2011-09-27T12:54:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=41701#p41701 <![CDATA[Re: Video playback/performance across multiple platforms]]> http://wordpress.org/extend/plugins/s2member/changelog/

Statistics: Posted by Jason Caldwell — September 27th, 2011, 12:54 pm


]]>
2011-09-21T04:03:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=38860#p38860 <![CDATA[Re: Video playback/performance across multiple platforms]]>

Statistics: Posted by drbyte — September 21st, 2011, 4:03 am


]]>
2011-09-20T19:10:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=38818#p38818 <![CDATA[Re: Video playback/performance across multiple platforms]]> Statistics: Posted by Jason Caldwell — September 20th, 2011, 7:10 pm


]]>
2011-09-17T03:57:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=37365#p37365 <![CDATA[Re: Video playback/performance across multiple platforms]]>
http://www.site.com/wp-content/plugins/ ... e/file.mp4
or
http://www.site.com/wp-content/plugins/ ... s/file.mp4

Firefox [pass] - Needs QuickTime - No full screen option
IE 8/9 [pass] - open the URL, go outside ..drink coffee, hunt some ducks, take a shower, eat, nape, and when you come back, you will see the browser still thinking. I think IE10 is going to make it possible but not IE9
Chrome [pass] - No full screen option
Safari 5.1 [pass] - full screen available
iOS [pass] - Full screen available
-----iPad2 [pass]
-----iPhone [pass]
-----iPod [pass]

Android [fail]

Windows Mobile - Data not available

Not sure why the Android is failing to load the media using the above URL.

Some updates:

Opera Mobile on Android works with the link above. I am still not sure why Android default browser wont execute the link. Interesting

Statistics: Posted by drbyte — September 17th, 2011, 3:57 am


]]>
2011-09-16T22:53:07-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=37360#p37360 <![CDATA[Re: Video playback/performance across multiple platforms]]>
Thank you for looking into this

Is that a short code you are using in your post?

wp-content/plugins/s2member-files/s2member-file-inline/s2member-file-download-key-[key]/example-file.zip

I'm going to need to insert this directly to the theme. What's the correct way of inserting the s2member-file-download-key-[key] using the example you have above or on the test page you created.

I tried different way but all failed

Thank you

some explaining:
this code works fine

Code:
<video src='http://www.site.com/wp-content/plugins/s2member-files/s2member-file-inline/s2member-file-download-key-[s2Key file_download="test.mp4" /]/test.mp4' controls autoplay height="100%" width="100%"></video>


but what i am trying to do is this and I can't figure it out...

Code:
<video src='http://www.site.com/wp-content/plugins/s2member-files/s2member-file-inline/s2member-file-download-key-<?php echo s2member_file_download_key("example-file.zip"); ?>/<?php echo get_post_meta($post->ID, 'video', true); ?>' controls autoplay height="100%" width="100%"></video>


As you see I am using custom fields to inset the movie into the video tags. this way if i need to add/edit something I just go directly to the code without the need to go over 4000 posts to adjust.

How I go by inserting this <?php echo get_post_meta($post->ID, 'video', true); ?> to replace the example-file.zip as the download key?

I think my brain is fried or I'm just becoming useless

thanks

sam

Statistics: Posted by drbyte — September 16th, 2011, 10:53 pm


]]>
2011-09-16T19:35:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=37351#p37351 <![CDATA[Re: Video playback/performance across multiple platforms]]> Thanks for reporting this important issue Sam.

I've just taken a good hard look at this problem in Safari, and it seems there is a deeper issue here. By default, WordPress sets a User's logged-in Cookie in httpOnly mode. Meaning that, the logged-in cookie is more secure ( i.e. inaccessible via JavaScript ). However, it seems that the Safari browser has a bug in it's HTML5 video tag support, preventing cookies set in httpOnly mode from being read on video source acqusition. Thus, HTML5 video tags in Safari will not work as expected on WordPress/s2Member, because the cookies are not being read by Safari whenever the video source file is accessed.

In short, we're going to take an even closer look at this problem over the next few days, but for now, here are two ways to avoid the issue in Safari.

1. Recommended.
Pass a File Download Key to s2Member, so that cookie authentication is not required.
Code:
<video controls="controls" autoplay="autoplay">
  <source src="http://jason.websharks-inc.net/wp-content/plugins/s2member-files/s2member-file-inline/s2member-file-download-key-dcf456dd5fd749475c90296cc7ed8df1/movie.mp4" type="video/mp4" />
  <source src="http://jason.websharks-inc.net/wp-content/plugins/s2member-files/s2member-file-inline/s2member-file-download-key-eddaabf7e96b7f0723a68b70b66c539f/video.webm" type="video/webm" />
</video>
* See: http://jason.websharks-inc.net/safari-test-mp4.php

2. Or, create this directory and file to override WordPress defaults.
( use at your own RISK though, it's a trade-off between security and usability in this case )
/wp-content/mu-plugins/wp-set-auth-cookie.php
Code:
<?php
function wp_set_auth_cookie
($user_id, $remember = false, $secure = '') {
    if ( $remember ) {
        $expiration = $expire = time() + apply_filters('auth_cookie_expiration', 1209600, $user_id, $remember);
    } else {
        $expiration = time() + apply_filters('auth_cookie_expiration', 172800, $user_id, $remember);
        $expire = 0;
    }

    if ( '' === $secure )
        $secure = is_ssl();

    $secure = apply_filters('secure_auth_cookie', $secure, $user_id);
    $secure_logged_in_cookie = apply_filters('secure_logged_in_cookie', false, $user_id, $secure);

    if ( $secure ) {
        $auth_cookie_name = SECURE_AUTH_COOKIE;
        $scheme = 'secure_auth';
    } else {
        $auth_cookie_name = AUTH_COOKIE;
        $scheme = 'auth';
    }

    $auth_cookie = wp_generate_auth_cookie($user_id, $expiration, $scheme);
    $logged_in_cookie = wp_generate_auth_cookie($user_id, $expiration, 'logged_in');

    do_action('set_auth_cookie', $auth_cookie, $expire, $expiration, $user_id, $scheme);
    do_action('set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in');

    setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure, true);
    setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true);
    setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, ((stripos($_SERVER["HTTP_USER_AGENT"], "safari") === false) ? true : false));
    if ( COOKIEPATH != SITECOOKIEPATH )
        setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, ((stripos($_SERVER["HTTP_USER_AGENT"], "safari") === false) ? true : false));
}
?>


Also, watch out for the poster="" attribute on iOS, I think that was buggy in older versions. See: http://diveintohtml5.org/video.html#ios

Statistics: Posted by Jason Caldwell — September 16th, 2011, 7:35 pm


]]>
2011-09-16T01:31:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=37288#p37288 <![CDATA[Re: Video playback/performance across multiple platforms]]>
I am using this /wp-content/plugins/s2member-files/s2member-file-inline/example-file.zip with the video tags

Code:
<video src='http://www.site.com/wp-content/plugins/s2member-files/s2member-file-inline/<?php echo get_post_meta($post->ID, 'video', true); ?>' controls autoplay poster='http://site.com/poster.jpg' height="100%" width="100%"></video>


Thank you

Sam

Statistics: Posted by drbyte — September 16th, 2011, 1:31 am


]]>
2011-09-08T01:51:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=34268#p34268 <![CDATA[Re: Video playback/performance across multiple platforms]]> viewtopic.php?f=4&t=14643&p=32894#p32894

Statistics: Posted by Cristián Lávaque — September 8th, 2011, 1:51 am


]]>
2011-09-07T12:59:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=34236#p34236 <![CDATA[Re: Video playback/performance across multiple platforms]]>
Thank you for looking into this

I'm still using Amazon S3/CloudFront and CNAME & Video tags. It's working across most of the gadgets I tried (iPhone, iPad, iPod, Android) Samsung Galaxy Tab, Motorola Tabs, and to my surprise Blackberry Tabs.

The only one that would not play/Yet is Windows mobile OS. Unless you have an app that can play mp4/h264 media.

Just an Update:

This URL format http://www.site.com/?s2member_file_inline=yes&s2member_file_download=/file.mp4 is not compatible with Apple iOS/Safari

Is there any possibilities that S2M can protect URL using CNAME/S3/Subdomain?


Sam

Statistics: Posted by drbyte — September 7th, 2011, 12:59 pm


]]>
2011-09-06T13:00:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=34101#p34101 <![CDATA[Re: Video playback/performance across multiple platforms]]> Still looking into a solution for this Sam.

Yea, I suspect the issues that you're having with "seeking" are caused by the fact that s2Member does not support "streaming" media in the truest sense of the word yet. We're going to take a look at integrating s2Member with a CDN that does, and we'll try to integrate s2Member's protection routines with one or more of them, so that site owners will have a broader selection of companies to use.

I'm going to reference this thread here as well, for the benefit of other readers:
viewtopic.php?f=4&t=14668&p=33656#p33396

Statistics: Posted by Jason Caldwell — September 6th, 2011, 1:00 pm


]]>
2011-09-02T19:37:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14780&p=33800#p33800 <![CDATA[Re: Video playback/performance across multiple platforms]]>

Statistics: Posted by Cristián Lávaque — September 2nd, 2011, 7:37 pm


]]>