Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML5 audio not working #6

Open
georgringer opened this issue Nov 10, 2015 · 0 comments
Open

HTML5 audio not working #6

georgringer opened this issue Nov 10, 2015 · 0 comments

Comments

@georgringer
Copy link
Contributor

When I use the media content element it is actually not possible to render audio correct in HTML5. First of all you have to select video in the flexform, then check the checkbox for HTML5 and then switch type to audio. Then you can add various audio formats and the output is html5. But then the code of VideoJS will output which is wrong. So there must be a condition in class.tslib_content_flowplayer.php to make another output for audio content. I hardcoded a solution for this:

            if ($conf['type'] === 'video') {
        $GLOBALS['TSFE']->getPageRenderer()->addJsInlineCode($replaceElementIdString, $jsInlineCode);
        }
        else {
        $GLOBALS['TSFE']->getPageRenderer()->addJsFooterFile('fileadmin/player/mediaelement/mediaelement-and-player.min.js',
     $type = 'text/javascript',
     $compress = TRUE,
     $forceOnTop = FALSE,
     $allWrap = '',
     $excludeFromConcatenation = FALSE
);
        $GLOBALS['TSFE']->getPageRenderer()->addCssFile    ('fileadmin/player/mediaelement/mediaelementplayer.css',
     $rel = 'stylesheet',
     $media = 'all',
     $title = '',
     $compress = TRUE,
     $forceOnTop = FALSE,
     $allWrap = '',
     $excludeFromConcatenation = FALSE
);
    $GLOBALS['TSFE']->getPageRenderer()->addJsInlineCode("mediaelement"," 
jQuery(document).ready(function(){
$('audio').mediaelementplayer();
});
");
        }

This integrates mediaelementjs as an audio player. So the flexform should be updated so that somebody can select html5 also if he is using audio content. Second is to modify class.tslib_content_flowplayer.php so an html5 audio player will be integrated. In TYPO3 6.1 it is the same.

PS: Mediaelement.js can be used for audio and video and has a flash fallback and it always looks like the theme in HTML5 and Flash-mode, but somebody from the core team must have decided not to use Mediaelement.js and use Video-JS instead for videos in TYPO3. Video JS is also a very good player for videos, but it cannot be used for audio, just for video.

https://forge.typo3.org/issues/51040

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant