Markers - microsoft/TVHelpers GitHub Wiki
One of the elements of the MediaPlayer class is the timeline element. It indicates the length of the media and the current location of the player. Like most of the CSS elements, it can be hidden or displayed depending on your preference. For more information about CSS elements, see Providing a New CSS.
Markers are elements that can be placed on your timeline. They are specific points in the timeline where the app generates the markerreached event. In addition to generating an event, chapter markers also automatically support the chapterSkipBack and chapterSkipForward methods. These methods are not connected to any button controls by default, but the methods will automatically jump to the previous or next chapter marker. You can use this functionality to divide your media into discrete sections.
When you add a marker, you have the option to make it visible to the users. You can also create a custom marker if you want a marker to have a different appearance than the default. For an example of how to customize the appearance of a marker, see the MediaPlayer.addMarker method.
Types of markers
When you add a marker, you indicate the type of marker that you would like to add. There are three different types of markers that you can add:
- advertisement marker
- chapter marker
- custom marker
The three different markers all generate the same event when they are reached. You can use the different types to make your app respond differently based on the type of marker that is reached. In addition, only chapter markers are connected to the chapterSkipBack and chapterSkipForward methods.