Skip to content

Support both @src and <source> child of <audio> (embedded resources)? #114

@nigelmegitt

Description

@nigelmegitt
          While working on the specification for adding audio recordings I reminded myself of the various ways in which an audio recording can be embedded and referenced, of which there are at least 5 in total. Requirement R15 of [DAPT](https://www.w3.org/TR/dapt-reqs/#requirements) is clear that both referenced and embedded options need to be available, but should we be syntactically restricting the options for each? Will raise as separate issues.

Originally posted by @nigelmegitt in #105 (comment)

Given some embedded audio resources:

<head>
  <resources>
    <audio xml:id="audioRecording1" type="audio/wave">
      <source>
        <data>[base64 encoded audio data]</data>
      </source>
    </audio>
    <data xml:id="audioRecording2" type="audio/wave">
      [base64 encoded audio data]
    </data>
  </resources>
</head>

The following two options exist in TTML2 for referencing embedded audio resources:

  1. src attribute in <audio> element referencing embedded <audio> or <data>:
<audio src="#audioRecording1"/>
...
<audio src="#audioRecording2"/>
  1. <source> element child of <audio> element.
<audio>
    <source src="#audioRecording1"/>
</audio>

This second option has an additional possibility of specifying a format attribute in case type is inadequate. It also permits multiple <source> child elements, though it is unclear what the semantic is intended to be if multiple resources are specified - presumably, the implementation gets to choose one somehow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CR-exit-must-haveIssue that must be resolved before advancing beyond CR (to Rec)questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions