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.

@ Jason – JWplayer 5 Fallback

Home Forums Community Forum @ Jason – JWplayer 5 Fallback

This topic contains 1 reply, has 2 voices. Last updated by  Jason (Lead Developer) 3 years, 10 months ago.

Topic Author Topic
Posted: Tuesday Feb 19th, 2013 at 1:38 pm #42498
Ronnie
Username: Zeeflo

Hi Jason.

Ive experienced that using a PS3 system will not work with JW Player6. This is due to the fact that the PS3 systems does not use flash v10+

We would like to mess about with the shortcodes, to make it fall back to JW 5

So far this is what weve got:

$user_agent = $_SERVER['HTTP_USER_AGENT'];
$pos = strpos(strtolower($user_agent), 'playstation');
if ($pos === false) {
	echo 'Player-6';
} else {
	echo 'Player-5';
}

What is our best approach to incorporate this code into the JW6 shortcodes provided by S2?

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Tuesday Feb 19th, 2013 at 8:27 pm #42533
Staff Member

Thanks for your inquiry. ~ We appreciate your patience :-)

I would suggest using the filter provided by s2Member® for this Shortcode.
ws_plugin__s2member_sc_get_stream

Please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
(NOTE: these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins)
(See also: http://www.s2member.com/kb/hacking-s2member/)

http://www.s2member.com/codex/stable/source/s2member/includes/classes/sc-files-in.inc.php/#src_doc_line_97

# A quick example to get you started…
if(isset($vars[‘get’]) && !empty($vars[‘_get’]))
{
$_get = $vars[‘_get’];
$my_template = file_get_contents(‘/my-jw5-player.html’);
$my_template = preg_replace(“/%%streamer%%/”, $_get[“streamer”], $my_template);
$my_template = preg_replace(“/%%prefix%%/”, $_get[“prefix”], $my_template);
$my_template = preg_replace(“/%%file%%/”, $_get[“file”], $my_template);
$my_template = preg_replace(“/%%url%%/”, $_get[“url”], $my_template);
}
}
else return $what_s2_says;
}
[/hilite]
[info_box]
See also this class method in the s2Member® Codex: http://www.s2member.com/codex/stable/source/s2member/includes/classes/sc-files-in.inc.php/#src_doc_line_97
[/info_box]

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