I have embedded a windows media player control onto a VBA userform as an active X control. I can control the video (start, stop, pause etc.) but am unable to display closed captions / subtitles.
It looks like I have to use smi / sami files, however I am unable to get that working... MS documentation seems lacking, more focused on webpages :-(
The following are the 4 (required?) elements for provided by intellisense, all are strings:
me.WindowsMediaPlayer1.closedCaption.captioningId
me.WindowsMediaPlayer1.closedCaption.SAMIFileName = path & "cut.smi" ' Got this one
me.WindowsMediaPlayer1.closedCaption.SAMILang
me.WindowsMediaPlayer1.closedCaption.SAMIStyle
So given the following SAMI file, how should I configure WMP so closed captions will display?
<SAMI>
<HEAD>
<TITLE>SAMI Example</TITLE>
<SAMIParam>
Media {cut.mp4}
Metrics {time:ms;}
Spec {MSFT:1.0;}
</SAMIParam>
<STYLE TYPE="text/css">
<!--
P { font-family: Arial; font-weight: normal; color: white; background-color: black; text-align: center; }
#Source {color: red; background-color: blue; font-family: Courier; font-size: 12pt; font-weight: normal; text-align: left; }
.ENUSCC { name: English; lang: en-US ; SAMIType: CC ; }
.FRFRCC { name: French; lang: fr-FR ; SAMIType: CC ; }
-->
</STYLE>
</HEAD>
<BODY>
<!-- Open play menu, choose Captions and Subtiles, On if available -->
<!-- Open tools menu, Security, Show local captions when present -->
<SYNC Start=0>
<P Class=ENUSCC ID=Source>The Speaker</P>
<P Class=ENUSCC>SAMI 0000 text</P>
<P Class=FRFRCC ID=Source>French The Speaker</P>
<P Class=FRFRCC>French SAMI 0000 text</P>
</SYNC>
<SYNC Start=1000>
<P Class=ENUSCC>SAMI 1000 text</P>
<P Class=FRFRCC>French SAMI 1000 text</P>
</SYNC>
<SYNC Start=2000>
<P Class=ENUSCC>SAMI 2000 text</P>
<P Class=FRFRCC>French SAMI 2000 text</P>
</SYNC>
<SYNC Start=3000>
<P Class=ENUSCC>SAMI 3000 text</P>
<P Class=FRFRCC>French SAMI 3000 text</P>
</SYNC>
</BODY>
</SAMI>
Help much appreciated, thanks.