@byomakase/omakase-player
    Preparing search index...

    Class Ui

    Implements

    Index

    Constructors

    Properties

    defaultStyles: {
        LabelLane: ClassStyleRule<Omit<LabelLaneStyle, keyof TimelineLaneStyle>>;
        Marker: ClassStyleRule<MarkerStyle>;
        MarkerOnChroming: ClassStyleRule<
            Omit<MarkerOnChromingStyle, keyof MarkerTrackStyle>,
        >;
        MarkerOnMarkerList: ClassStyleRule<
            Omit<MarkerOnMarkerListStyle, keyof MarkerTrackStyle>,
        >;
        MarkerOnMarkerTrackLane: ClassStyleRule<
            Omit<MarkerOnMarkerTrackLaneStyle, keyof MarkerTrackStyle>,
        >;
        MarkerTrack: ClassStyleRule<Omit<MarkerTrackStyle, "markerColor">>;
        MarkerTrackLane: ClassStyleRule<
            Omit<MarkerTrackLaneStyle, keyof TimelineLaneStyle>,
        >;
        MarkerTrackOnMarkerTrackLane: ClassStyleRule<
            Omit<MarkerTrackStyle, keyof MarkerTrackStyle>,
        >;
        ObservationTrackLane: ClassStyleRule<
            Omit<ObservationTrackLaneStyle, keyof TimelineLaneStyle>,
        >;
        Scrollbar: ClassStyleRule<ScrollbarStyle>;
        ScrollbarLane: ClassStyleRule<
            Omit<ScrollbarLaneStyle, keyof TimelineLaneStyle>,
        >;
        ScrubberLane: ClassStyleRule<ScrubberLaneStyle>;
        TextTrackLane: ClassStyleRule<TextTrackLaneStyle>;
        ThumbnailTrackLane: ClassStyleRule<ThumbnailTrackLaneStyle>;
        Timeline: ClassStyleRule<TimelineStyle>;
        TimelineLane: ClassStyleRule<TimelineLaneStyle>;
    } = ...

    Accessors

    • get onEvent$(): Observable<UiEvent>

      Emits whenever a style rule or element is updated or removed.

      Delivered asynchronously via asyncScheduler — subscribers always receive events on the next tick, never synchronously. Switch on event.type to handle specific event kinds:

      • UI_STYLE_RULE_UPDATED — a style rule was added or merged
      • UI_STYLE_RULES_REMOVED — style rules were removed
      • UI_ELEMENT_UPDATED — an element's props were updated
      • UI_ELEMENTS_REMOVED — one or more elements were removed

      Returns Observable<UiEvent>

    Methods

    • Parameters

      • id: string | string[]

      Returns void

    • Removes all style rules for which predicate returns true.

      Iterates the rule registry and deletes every matching entry, then emits UI_STYLE_RULES_REMOVED. Default styles registered at construction time can also be removed this way.

      Parameters

      Returns void

      // Remove all per-instance scoped rules for a specific track
      ui.removeStyleRules((rule) => 'className' in rule && rule.className.startsWith('marker-track['));
    • Computes the merged style for an element using the following cascade priority (later steps override earlier ones):

      1. Class rules — applied in element.classes array order; later class wins
      2. Inline element.style
      3. Id rule — highest priority, overrides everything else

      Any combination of id, classes, and style on the element is accepted.

      Type Parameters

      • S

      Parameters

      Returns Partial<S>

    • Adds or updates an element's props in the registry.

      • If the element exists, props are shallow-merged. Keys explicitly set to undefined are deleted from the stored props.
      • If all props become undefined after the merge, the element is removed and UI_ELEMENTS_REMOVED is emitted instead.
      • If the element does not exist and has at least one non-undefined prop, it is created and UI_ELEMENT_UPDATED is emitted.

      Parameters

      Returns void

    • Adds or merges a style rule into the registry.

      If a rule with the same key already exists (id or className), its style is shallow-merged with the incoming rule. Otherwise the rule is appended. Emits UI_STYLE_RULE_UPDATED after the update.

      Type Parameters

      • S

      Parameters

      Returns void