1

I am currently working on an Universal Windows Platform(UWP) Video Player by using MediaElement Class.

What I want to do is setting the time offset of the closed caption.

In other words, a user can control when the timed text will appear relative to its original start time. For example, if a user sets the offset to +5 seconds, the caption whose start time is 00:10 will appear at 00:15. Similiarly, if the offset is -5 seconds, the caption will appear 5 seconds earlier than initial start time.

What I have tried

  1. I changed the value of StartTime property of TimedTextCue objects in events such as TimedTextSource.Resolved or TimedMetadataTrack.CueEntered. The property values were exactly changed, but the time they appeared did not change. (I wish to know why changing StartTime of a cue has no effect.)

  2. I found the IMFTimedText::SetCueTimeOffset() method in Media Foundation. I expected that something similar to this method exists in TimedMetadataTrack class (because I am using MediaElement, not Media Foundation), but I couldn't find any.

Please help. Thanks in advance :)

  • For a closed caption of a media, It has two ways to add to media. One is inhabit the media, this caption when to appear is depended on the media.So this way the caption cannot be changed. Another is with a caption file, the caption when to appear is depended on the caption file,You can code to update the caption file, not try to set it directly by MediaElment class. – Sunteen Wu Mar 24 '16 at 08:17

0 Answers0