PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
function html5_video($atts, $content = null) {
extract(shortcode_atts(array(
"src" => '',
"width" => '',
"height" => ''
), $atts));
return '<video src="'.$src.'" width="'.$width.'" height="'.$height.'" controls autobuffer>';
}
add_shortcode('video5', 'html5_video');
<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>
<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>
<?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));
}
?>
<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>
<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>
http://www.site.com/wp-content/plugins/s2member-files/video.mp4
http://s2-file-downloads.site.com/video.mp4?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDovL3MyLWZpbGUtZG93bmxvYWRzLm9ubGluZWFyYWJpY21vdmllcy5uZXQvY29kZV8zNl9tb2JpLm1wNCsfhhgjRpdGlvbiI6eyJJcEFkZHJlc3MiOnsiQVdTOlNvdXJjZUlwIjoiNzYuOTMuMTcuMjM1LzMyIn0sIkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxMzE3NDAxNjc3fX19XX0_&Signature=gS5DuWtcz0wn-T3OYyXHpHm4sGtqonx4uNf~MlhhyEp12rL85HVJIVhjyutw4DrJCCUcYQ5EkQVS4K10xKk3Wr8fCB8D4DI293aTqFw3zp0Uy9WUdJQ79lEs1Oq4oE3cVUHHuvm6LfSbiO18VxLsMCVrwbQykCS57r1SHhpcI2I_&Key-Pair-Id=APKAJMYQ54GHSTY7ESAEQ
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.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.
Working on iPad, iPhone, Android, Safari, Chrome, FireFox
Not working on IE9
Not tested on Windows Mobile
Will post more data when Available
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.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: Select all
http://s2-file-downloads.site.com/video.mp4?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDovL3MyLWZpbGUtZG93bmxvYWRzLm9ubGluZWFyYWJpY21vdmllcy5uZXQvY29kZV8zNl9tb2JpLm1wNCsfhhgjRpdGlvbiI6eyJJcEFkZHJlc3MiOnsiQVdTOlNvdXJjZUlwIjoiNzYuOTMuMTcuMjM1LzMyIn0sIkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxMzE3NDAxNjc3fX19XX0_&Signature=gS5DuWtcz0wn-T3OYyXHpHm4sGtqonx4uNf~MlhhyEp12rL85HVJIVhjyutw4DrJCCUcYQ5EkQVS4K10xKk3Wr8fCB8D4DI293aTqFw3zp0Uy9WUdJQ79lEs1Oq4oE3cVUHHuvm6LfSbiO18VxLsMCVrwbQykCS57r1SHhpcI2I_&Key-Pair-Id=APKAJMYQ54GHSTY7ESAEQ
* (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).
Users browsing this forum: Google [Bot] and 0 guests