Link to home
Start Free TrialLog in
Avatar of Mr_Fulano
Mr_FulanoFlag for United States of America

asked on

SAMI File <SYNC Start = (number of millisecond)> Question

HI, I'm writing a SAMI (Synchronized Accessible Media Interchange) file, which is basically HTML, in order to add Closed Caption Subtitles to some training videos I'm producing. My Sister-in-Law wears two hearing-aids and she always needs Closed Caption to be able to follow along as she listens to a TV programs or to a computer video, so my goal is to make my training videos accessible to those that are hearing challenged, like my Sister-in-Law.

That said, the Windows Media Player uses a Closed Caption system called "SAMI" files, which you can read about here (https://msdn.microsoft.com/en-us/library/windows/desktop/dd562247(v=vs.85).aspx) and here (http://www.w3.org/WAI/sami.html), if you'd like.

The way SAMI files work is that the SAMI file contains a <Sync Start = (number of millisecond) > tag and once the Media Player's time counter matches that "start value", then the text associated with that particular tag is displayed to the viewer. -- Its very cool and I have that part working.

However, my problem is that if  a user clicks on the video's timeline and moves backwards or forwards a substantial amount, the display text does not update until the next <Sync Start = ms> tag is encountered.

Therefore, my questions to the HTML Experts here is whether HTML allows for some sort of "range" syntax that I could employe into the <SYNC Start = milliseconds> tag.

So, in my example below, the verbiage for the 10 second mark, (10,000 ms) is encounter and displayed. Then at the 40 second time mark the CC display changes. However, if a user click the timeline back to the 30 second mark, the displayed text does not change, because the prior tag was not encountered again. - Its somewhat of a linear path, where the display changes as you encounter <SYNC value> tags along a linear path -- and therein lies my problem. If you click on the timeline just ahead of a tag...you missed it.

What I would like to be able to do is to have a "range" syntax that says, if the video player's time counter is between values (10000 to 39999) then change back to the text that corresponds to that tag value.

Ideally it would look something like this <SYNC Start "Range" = 10000 - 39999> , but that's not available. So, is there any workaround? Another option would be to have multiple Sync Start values like this, <SYNC Start = 10000, 10500, 20000, 20500, 30000, 30500>.

<SYNC Start = 10000>
      <!-- English closed captions -->
      <P Class = ENUSCC ID = Source>Speaker:
      <P Class = ENUSCC>Verbiage for counter values (10000 to 39999)
</SYNC>

<SYNC Start = 40000>
      <!-- English closed captions -->
      <P Class = ENUSCC ID = Source>Speaker:
      <P Class = ENUSCC>Verbiage for counter values (40000 to end of video...)
<SYNC>

I believe that HTML doesn't allow for programming logic, so I know I can't write code to process a logic statement.

Any help or suggestions that you could offer would be greatly appreciated.

Best Regards,
Fulano
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mr_Fulano

ASKER

HI David, thank. I think I'll look into that!

Much appreciated.
Good solution.