Project

General

Profile

Actions

Bug #51040

closed

HTML5 audio not working

Added by Bernhard Eckl over 10 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2013-08-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

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.


Files

flexform_media.xml (15 KB) flexform_media.xml Bernhard Eckl, 2013-08-12 18:59

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #49546: Video player: additional attribute for qualityClosed2013-07-01

Actions
Related to TYPO3 Core - Bug #51042: Update Video JS to use it in current browsersClosed2013-08-12

Actions
Actions

Also available in: Atom PDF