w3c / sync-media-pub

Repository of the Synchronized Multimedia for Publications Community Group
http://w3c.github.io/sync-media-pub
Other
16 stars 4 forks source link

is it ok to use the `meta` element for defining styling classes? #21

Closed rdeltour closed 3 years ago

rdeltour commented 4 years ago

The HTML spec says:

a new metadata name should not be created in any of the following cases:

  • (…)
  • If the name is for something expected to have processing requirements in user agents; in that case it ought to be standardized.

our use of meta clearly falls into this last case. I think standardization efforts are in the works (the :current pseudo class, see #8).

In the meantime, it might be preferable to move this out of HTML? In the sync doc itself, or possibly in a publication manifest?

dauwhe commented 4 years ago

Is this the equivalent of https://www.w3.org/publishing/epub32/epub-mediaoverlays.html#sec-playback-active-class ?

Perhaps the new CSS ::highlight work could help?

marisademeglio commented 4 years ago

@dauwhe yes it's the place where the active element playback class and the document-is-being-played class get named.

@rdeltour good catch, I propose we put it in the sync media file itself. Maybe something like

{
        "role": "body",
        "properties": {
            "sync-media-css-class-active": "-my-active-element",
            "sync-media-css-class-playing": "-my-document-playing"
          },
        "narration": [
          {
            "text": "#id1",
            "audio": "audio.mp3#t=0.0,1.2"
          },
          {
            "text": "#id2",
            "audio": "audio.mp3#t=1.2,3.4"
          },
          {
            "role": "footnote-ref",
            "text": "#id3",
            "audio": "audio.mp3#t=3.4,5.6"
          },
...
}

I bet there are some interesting things we could do with nesting here, assuming any node could have a properties property.

marisademeglio commented 4 years ago

@larscwallin you were talking about nested highlights in a comment (on some platform somewhere, sorry I can't find it now). Would you mind elaborating here? I think it's really relevant.

marisademeglio commented 3 years ago

The new draft uses generic media parameters, and so this is not an issue.