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

rename "text" property #25

Closed marisademeglio closed 3 years ago

marisademeglio commented 4 years ago

During the recent pubwg f2f, it came up that our text property could mean any element in the HTML document, so we should rename it.

ref feels too generic element is too short-sighted regarding the selector we may use (see https://github.com/w3c/sync-media-pub/issues/11)

How about html?

E.g. instead of

{
      "text": "#id1",
      "audio": "audio.mp3#t=0.0,1.2"
 },

it could be:

{
      "html": "#id1",
      "audio": "audio.mp3#t=0.0,1.2"
 },
larscwallin commented 4 years ago

I would suggest using "target" or something similar as this could point to media types other than html, such as images, video etc. "audio" could be exchanged with "media" since it is actually the media that is synchronized with the target.

Example with implicit types

{
      "target": "#id1",
      "media": "audio.mp3#t=0.0,1.2"
 }

or "expanded"

{
      "target":  {
          "type": "CssSelector",
          "value": "#id1"
      },
      "media": {
          "source": "audio.mp3",
          "selector": {
               "type": "FragmentSelector",
                "value": "t=0.0,1.2"
        }
    }
 }
marisademeglio commented 4 years ago
  1. I have been hoping to avoid a view where one thing is the "primary" media and the other thing(s) are applied to it. So I'd like to treat html, audio, (and in the future) video as equals.

  2. What's the advantage to using a generic term like media, beyond having fewer words in the spec?

marisademeglio commented 4 years ago

I'd like to revisit this, I'm open to using target and I'm wondering if this would work for media:

media: {
   url: "audio.mp3#t23,34",
   encodingFormat: "audio/mpeg"
}

or, implicitly: media: "audio.mp3#t23,34"

My question though is that media is quite generic - could the UA differentiate audio vs video sufficiently if only given the compact syntax (without encodingFormat specified) ?

marisademeglio commented 3 years ago

In the new draft, there is still text (in the interest of SMIL element reuse) and also ref, also from SMIL, which is a generic media object "reference" element.