Logo of SermonSpeaker Extension Claim

Login Form

Replace download button with link to popup audio player

More
9 months 1 week ago #6958 by Joe
Here's the PHP of the popup.php file being linked to with the edits you suggested:
<?php
/**
 * @package     SermonSpeaker
 * @subpackage  Component.Site
 * @author      Thomas Hunziker <admin@sermonspeaker.net>
 * @copyright   © 2016 - Thomas Hunziker
 * @license     http://www.gnu.org/licenses/gpl.html
 **/
 
defined('_JEXEC') or die();
 
JHtml::_('stylesheet', 'com_sermonspeaker/sermonspeaker.css', array('relative' => true));
$config = array('type' => JFactory::getApplication()->input->get('type', 'audio'));
$player = SermonspeakerHelperSermonspeaker::getPlayer($this->item, $config);
?>
<script type="text/javascript">
	window.onload = applyChanges();
	function applyChanges(){
		window.resizeTo(<?php echo $player->popup['width'] . ', ' . $player->popup['height']; ?>);
		document.body.style.backgroundColor='<?php echo $this->params->get('popup_color', '#fff'); ?>';
	}
</script>
<style>
iframe#mediaspace1 {
	border: 0px !important;
}
</style>
<div class="ss-sermon-container<?php echo $this->pageclass_sfx; ?>">
	<div class="popup">
		<h2><?php echo $this->item->title; ?></h2>
		<?php
		echo $player->mspace;
		echo $player->script;
 
		if ($player->toggle) : ?>
			<div class="ss-sermon-switch">
				<img class="pointer" src="media/com_sermonspeaker/images/Video.png" onclick="Video()" alt="Video" title="<?php echo JText::_('COM_SERMONSPEAKER_SWITCH_VIDEO'); ?>" />
				<img class="pointer" src="media/com_sermonspeaker/images/Sound.png" onclick="Audio()" alt="Audio" title="<?php echo JText::_('COM_SERMONSPEAKER_SWITCH_AUDIO'); ?>" />
			</div>
		<?php endif; ?>
	</div>
</div>

Please Log in or Create an account to join the conversation.

More
9 months 1 week ago #6959 by Thomas Hunziker
SermonSpeaker supports having multiple player plugins. The first plugin that is capable of playing the file will do the job.
The "type" parameter specifies if it has to look for the audio or the video part.
There may of course be a bug in that detection.

Another thing you could try is if you specify a specific player in the $config. Like
$config = array('type' => JFactory::getApplication()->input->get('type', 'audio'), 'alt_player' => 'jwplayer7');

Feel free to rate SermonSpeaker on JED .
Useful documentation for beginners: First Steps & FAQ
How to say "Thank You!": Contribute or support using the Donate button at the bottom of each page.

Please Log in or Create an account to join the conversation.

More
9 months 1 week ago #6960 by Joe
Yes!!! That works! Thank you very much!!!

Please Log in or Create an account to join the conversation.

Time to create page: 0.120 seconds
Powered by Kunena Forum