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 #1

Updated by Bernhard Eckl over 10 years ago

I already fixed the flexform problem with the html5 checkbox (deleted the condition for the checkbox). See attachment.

Actions #2

Updated by Philipp Gampe over 10 years ago

  • Status changed from New to Needs Feedback
  • Priority changed from Should have to Could have
  • TYPO3 Version changed from 4.7 to 6.0

Can you create a new issue for the checkbox part and push the patch to gerrit? http://wiki.typo3.org/CWT

The mediaelement.js requires jQuery. This should be fine for 6.x, but we need to a way to let integrators select whether the core jQuery or there own custom version is loaded.

Actions #4

Updated by Bernhard Eckl over 10 years ago

I could create a patch file, sure, but there should be something clarified before. If I insert a video with html5 checkbox set, I get a new tab for the additional html5 sources. But if I insert an audio with html5 checkbox set, I don’t get an additional tab and the additional sources are listed in the regular audio tab. So this is inconsistent. In my opinion it should be always a new tab or never a new tab (and the additional sources directly in the audio / video tab).
I would prefer making not an extra tab for that (it is still the video), in my experience it is easier for editors when not having to many tabs. But if this is changed, the saved flexforms data in the db are different, so I wanted to discuss this for an optimum solution first.

Please also check issue http://forge.typo3.org/issues/51042. I already added the php file there, it also contains the changes for audio with mediaelement.js.

Actions #5

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to New
  • Is Regression set to No
Actions #6

Updated by Mathias Schreiber about 9 years ago

  • Target version set to 7.2 (Frontend)
Actions #7

Updated by Benni Mack almost 9 years ago

  • Target version changed from 7.2 (Frontend) to 7.4 (Backend)
Actions #8

Updated by Susanne Moog over 8 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #9

Updated by Benni Mack over 8 years ago

  • Category set to 1606
  • Target version deleted (7.5)
Actions #10

Updated by Georg Ringer over 8 years ago

  • Status changed from New to Closed

mediace has been extracted from the core and is not needed anymore using CMS7. however it can be now found at github ant the issue has been moved to https://github.com/FriendsOfTYPO3/mediace/issues/6

Actions

Also available in: Atom PDF