Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nigelmegitt opened this issue Mar 15, 2023 · 2 comments
Open
Labels
PR-must-have Issue that must be resolved before going to Proposed Recommendation (PR) question Further information is requested

Comments

@nigelmegitt
Copy link
Contributor

nigelmegitt commented Mar 15, 2023

          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)

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

  1. src attribute in <audio> element.
<audio src="https://example.com/audio_recording.wav" type="audio/wave"/>
  1. <source> element child of <audio> element.
<audio>
    <source src="https://example.com/audio_recording.wav" type="audio/wave"/>
</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, and we specify that in this case the implementation must choose no more than one.

[Edited 2023-03-29 to account for the "play no more than one" constraint added after the issue was opened]

@nigelmegitt nigelmegitt added the question Further information is requested label Mar 15, 2023
@nigelmegitt nigelmegitt changed the title Support both @src and <source> child of <audio>? Support both @src and <source> child of <audio> (external resources)? Mar 15, 2023
@cconcolato
Copy link
Contributor

Thinking of use cases for specifying multiple sources that differ by their MIME types:

  1. Either you're editing and WAV (or alike uncompressed) is probably the format you'll use (to have sample accuracy). So one source is needed;
  2. Or you're sending the script for playback in a player and there you may want multiple formats as multiple players support different formats (or you'll send Text-to-speech instructions)

@nigelmegitt
Copy link
Contributor Author

I remembered we already have the constraint:

When a list of Sources is provided, a presentation processor MUST play no more than one of the Sources for each Audio Recording.

I will edit the issue text to take this into account.

There's another use case:

  • for types like WAV where there is no registered MIME type at IANA and different practices in use - see MDN on this - it may be useful to specify multiple source elements that differ only by their type attribute so that implementations that recognise different values of type for the same audio file format can find one that satisfies them.

@nigelmegitt nigelmegitt added the CR must-have Must be resolved before going to CR label May 18, 2023
@nigelmegitt nigelmegitt added PR-must-have Issue that must be resolved before going to Proposed Recommendation (PR) and removed CR must-have Must be resolved before going to CR labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-must-have Issue that must be resolved before going to Proposed Recommendation (PR) question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants