Skip to content

m3u8: Finish TODOs in writeDateRange() #19

@ollytom

Description

@ollytom

Fields of DateRange that we're not writing out as text include:

  • Duration, Planned
  • Custom attributes
  • CueCommand

CueCommand

Need to work out under which conditions to write it out. If CuiIn or CueOut are set, we cannot write out CueCommand as that's invalid.

Another bit of error handling might be to check that CueCommand and/or CueIn/Out have a valid value set in the Splice.Type.

Custom

We'll need a type switch on the value, and error out if we get anything we can't reliably turn into text.
I don't think we'll be able quoted versus unquoted strings. Quick sketch:

switch v.(type) {
case float32:
	return fmt.Sprintf("%03f"...
case string:
	return fmt.Sprintf("%q" ...)
case int:
	return fmt.Sprintf("%d", ...
default:
	return fmt.Errorf("attribute %s: cannot marshal %T to text", v)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions