Begin playback automatically once media is ready.
The initial playback rate.
The initial volume (0..1).
The playback rates offered in the rate menu.
OptionalprimaryThe primary media element (the single audio/video, or the first video in a grid).
Whether the fullscreen button is shown for video.
Whether the ±skip buttons are shown.
Whether the playback-rate menu is shown.
Whether the transcript panel is shown (when a transcript is provided).
Whether the transcript show/hide toggle button renders in the transport bar.
Whether the volume slider + mute are shown.
Whether the real audio waveform (which doubles as the scrubber) is shown for audio-only tracks. On by default. When a track supplies MediaTrack.Peaks those are rendered directly; otherwise the player decodes the track URL client-side to extract real peaks, falling back to a plain progress bar if decoding fails.
Number of seconds the skip buttons jump.
Start playback at this position (ms) once metadata loads.
Emits whenever the primary element's MediaPlaybackState transitions.
Where the transcript panel sits relative to the media. Defaults to 'bottom'
(full width below the player, filling remaining height) which reads better than
the narrower side layout; consumers can opt into 'side'.
Emits the new visibility (true = shown) whenever the transcript is toggled.
Number of bars the waveform renders / downsamples to.
The single audio track when this is an audio-only player (drives waveform).
The label shown alongside the busy spinner.
Whether a transcript (one or more cues) is available, regardless of visibility.
True when the layout is a single audio track with no video.
True while buffering — but reflects the debounced visible flag, so an instant seek that resolves within BUFFERING_INDICATOR_DELAY_MS never shows the spinner.
True during the initial source load (shows the "Loading…" stage indicator).
The current high-level playback lifecycle state of the primary element.
Whether the stage should show ANY busy indicator (loading or visible buffering).
Whether the transcript panel should render right now — requires a transcript,
the ShowTranscript master switch, AND the runtime toggle to be visible.
Whether the transcript show/hide toggle button should render in the transport.
True when the waveform should render as bars — i.e. it's enabled, the active track is audio, and we have peaks (supplied or successfully decoded) for it. When false (decode pending/failed, no track), the template shows a plain progress bar instead.
A short, screen-reader-friendly status phrase reflecting the current state.
The track(s) to play. One audio track → transport bar; many videos → grid.
Optional transcript cues. When set (and ShowTranscript), a transcript panel renders.
The current runtime visibility of the transcript (toggle-driven).
The normalized 0..1 peaks for the active audio track, or null when none are
available yet (still decoding) or decoding failed. Reading this lazily kicks off
client-side extraction when needed — re-renders/seeks never re-decode (cached by Id).
The played/unplayed split point for the waveform, as a 0..1 fraction.
Request fullscreen for the player surface (video).
Exit fullscreen.
Formats a millisecond value as mm:ss (or h:mm:ss for long media).
A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
Enough data buffered to begin playback — clears loading/buffering.
Track switch / source cleared — resets the lifecycle.
Optionalel: HTMLMediaElementWire-up when a media element fires its first event — caches the primary element & applies initial state.
Initial source fetch began — drives the "Loading…" indicator.
Element is actively playing — clears loading + buffering.
Seek completed — clears buffering once the element has playable data.
Seek began (skip / scrub into un-buffered territory) — show buffering during the seek.
Conservative buffering signals — only buffer when actively trying to play.
Ran out of buffered data mid-playback — enters buffering.
Keyboard support for the scrubber (role="slider").
Pause playback. Honors BeforePause.
Begin playback. Honors BeforePlay.
Seek to the cue at index. If currently playing, playback continues from the
cue's start; if paused, the timeline is repositioned without starting playback.
Set the volume (0..1). Unmutes if volume > 0.
Skip backward by SkipSeconds.
Skip forward by SkipSeconds.
Stable color for a speaker label (deterministic hue from the label string).
Toggle fullscreen.
Toggle mute.
Toggle play/pause.
Show/hide the transcript panel (pure component state — nothing is persisted). Emits TranscriptVisibilityChanged with the new visibility.
mj-media-player— a generic, framework-agnostic media player.Renders one or many audio/video tracks with a custom transport bar (play/pause, click-and-drag scrubber, skip ±N, playback-rate menu, volume + mute, fullscreen), a real audio waveform (decoded client-side, or supplied precomputed via
MediaTrack.Peaks) that doubles as the scrubber, and an optional time-synced transcript panel whose cues are clickable and auto-highlight as playback advances.This component has ZERO MemberJunction-core dependencies — it is pure Angular and is safe to reuse in any application. The MJStorage binding lives in the separate
mj-storage-media-playerwrapper.