Project

General

Profile

Actions

Bug #77602

closed

HTML5 audio in CType Media kind of broken

Added by Clemens Riccabona about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Won't have this time
Assignee:
-
Category:
Content Rendering
Target version:
Start date:
2016-08-23
Due date:
% Done:

0%

Estimated time:
0.10 h
TYPO3 Version:
6.2
PHP Version:
5.6
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

Description

At least in version 6.2.26, html5-audio is kind of broken.
The problem is simple: switching to audio hides the html5-option. Therefore you MUST select html5 (mmUseHTML5) BEFORE you switch to Type Audio.
Then the value mmUseHTML5=1 remains in flexform, although the checkbox isn't displayed anymore in backend.
In both cases, you could add HTML5-Audio files to the CE. ... although, if you did not select the option before, html5-audio won't get rendered ....
This is painful to explain to editors ...

Additionally I suggest to select 'HTML5' by default.
I failed to set it via PageTSconfig within 10 minutes, maybe I'm wrong, but it seems that this (setting flexform default values) cannot be done via the PageTSconfig TCAdefaults array.
This is what I tried successless:

TCAdefaults.tt_content {
  pi_flexform {
    media {
      sGeneral {
        mmUseHTML5 = 1
      }
    }
  }
}

The solution is rather simple.
Change this:

<mmUseHTML5>
  <TCEforms>
    <label>LLL:EXT:cms/locallang_ttc.xml:media.useHTML5</label>
        <displayCond>FIELD:mmType:!=:audio</displayCond>
        <onChange>reload</onChange>
        <config>
            <type>check</type>
            <default>0</default>
        </config>
    </TCEforms>
</mmUseHTML5>

to that:

<mmUseHTML5>
  <TCEforms>
    <label>LLL:EXT:cms/locallang_ttc.xml:media.useHTML5</label>
        <onChange>reload</onChange>
        <config>
            <type>check</type>
            <default>1</default>
        </config>
    </TCEforms>
</mmUseHTML5>
Actions #1

Updated by Clemens Riccabona about 8 years ago

Ok, sry, after submitting I tried a different way to set the default value, and it works.

But this does not change the basic mistake of disabling the 'mmUseHTML5' checkbox if media-type audio gets selected!

Working defaults via PageTSconfig:

TCEFORM.tt_content {
  pi_flexform {
    media {
      sGeneral {
        mmUseHTML5 {
          config {
              default = 1
          }
        }
      }
    }
  }
}
Actions #2

Updated by Georg Ringer about 8 years ago

  • Status changed from New to Closed
  • Priority changed from Must have to Won't have this time

Even though this issue is valid, there won't be happen anything anymore to this completely wrong plugin! 6.2 does only get critical patches anymore.

Feel free to patch the extension yourself to your needs, e.g. removing the non html5 configuration if you don't need it.
With 7.6, the extension has been removed from the core and can be found at https://github.com/FriendsOfTYPO3/mediace

Actions #3

Updated by Clemens Riccabona about 8 years ago

Ok, I accept this. But it is a pitty.

I struggled a little bit with the settings now, and I found a workaround to get it working, which has no drawbacks.
Setting the default value to 1 has the drawback, that due to displayCond of the html5-video sheet (sAccessibleVideo) the html5-video gets broken.
and removing the displayCond of sheets seems not to be supported by pageTSconfig.

Solution: just remove displayCond of mmUseHTML5:

TCEFORM.tt_content {
  pi_flexform {
    media {
      sGeneral {
        mmUseHTML5 {
          displayCond =
        }
      }
    }
  }
}

So the html5-option stays also for audio elements.

Actions #4

Updated by Clemens Riccabona about 8 years ago

BTW, this has todo with #39416 IMHO

Actions

Also available in: Atom PDF