Disable the audio feature on iOS devices
authorstan <stan@735d13b6-9817-0410-8766-e36946ffe9aa>
Wed, 13 Feb 2013 16:38:22 +0000 (16:38 +0000)
committerstan <stan@735d13b6-9817-0410-8766-e36946ffe9aa>
Wed, 13 Feb 2013 16:38:22 +0000 (16:38 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/sr_freecap/trunk@71176 735d13b6-9817-0410-8766-e36946ffe9aa

ChangeLog
Classes/ViewHelpers/AudioViewHelper.php
doc/manual.sxw

index 8e87ef6..47910cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2013-02-13  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Add option to configure the encryption algorithm in Extension Manager
+       * Disable the audio feature on iOS devices
 
 2013-02-12  Stanislas Rolland  <typo3@sjbr.ca>
 
index 8c737e5..3089ee3 100644 (file)
@@ -63,8 +63,10 @@ class AudioViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelpe
                // Get the translation view helper
                $translator = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('SJBR\\SrFreecap\\ViewHelpers\\TranslateViewHelper');
                $translator->injectConfigurationManager($this->configurationManager);
+               // Get browser info (as of iOS 6, audio rendering does not work)
+               $browserInfo = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_USER_AGENT'));
                // Generate the icon
-               if ($settings['accessibleOutput'] && in_array('mcrypt', get_loaded_extensions())) {
+               if ($settings['accessibleOutput'] && in_array('mcrypt', get_loaded_extensions()) && !in_array('iOS', $browserInfo['all_systems'])) {
                        $fakeId = \TYPO3\CMS\Core\Utility\GeneralUtility::shortMD5(uniqid (rand()),5);
                        $siteURL = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
                        $urlParams = array(
index 48e309a..290b795 100644 (file)
Binary files a/doc/manual.sxw and b/doc/manual.sxw differ