Types

Link copied to clipboard
data class AudioTrackChanged(val id: String, val language: String?) : AnalyticsEvent

An audio track was selected.

Link copied to clipboard
data class BitrateChanged(val bitrate: Int, val width: Int, val height: Int, val frameRate: Float) : AnalyticsEvent

The video rendition in use changed (ABR switch or initial selection).

Link copied to clipboard
Link copied to clipboard
data class BufferStart(val reason: BufferReason) : AnalyticsEvent
Link copied to clipboard

Playback reached the end of the media.

Link copied to clipboard

DRM keys were loaded for a session (initial license or renewal).

Link copied to clipboard
data class DroppedFrames(val count: Int, val elapsedMs: Long) : AnalyticsEvent

Video frames were dropped during elapsedMs.

Link copied to clipboard
data class Error(val error: OGPlayerError) : AnalyticsEvent

A fatal playback error occurred.

Link copied to clipboard
data class FullscreenChanged(val isFullscreen: Boolean) : AnalyticsEvent

The player entered or left fullscreen (reported by the view layer; headless integrations do not emit it).

Link copied to clipboard
data class OrientationChanged(val orientation: DeviceOrientation) : AnalyticsEvent

The device rotated (reported by the view layer once on attach with the initial value, then on change). The vertical feed does not emit it — the feed is portrait by design. Distinct from FullscreenChanged: the two diverge on button-driven fullscreen and on tablets.

Link copied to clipboard
Link copied to clipboard
data class PictureInPictureChanged(val isActive: Boolean) : AnalyticsEvent

The player entered or left picture-in-picture (reported by the view layer; headless integrations do not emit it).

Link copied to clipboard
Link copied to clipboard
data class PlaybackRecovered(val reason: RecoveryReason, val positionMs: Long) : AnalyticsEvent

The SDK recovered playback silently — no Error was surfaced, but the viewer saw a short rebuffer (typically 1–4 s). Emitted so QoE pipelines can count field recoveries the app never observes.

Link copied to clipboard
data class PlaybackStarted(val startupMs: Long) : AnalyticsEvent

First video frame of a load rendered. startupMs is wall time from OGPlayer.load to that frame — time-to-first-frame, the industry's primary startup metric. Emitted once per load; audio-only streams, which never render a frame, do not emit it.

Link copied to clipboard
data class QualitySnapshot(val positionMs: Long, val bufferedMs: Long, val bandwidthEstimateBps: Long, val droppedFramesTotal: Int, val liveLatencyMs: Long? = null, val atLiveEdge: Boolean? = null) : AnalyticsEvent

Periodic playback-quality sample, emitted every 10s while playing. liveLatencyMs/atLiveEdge are populated for live streams only — the live-latency measurement rides the existing cadence.

Link copied to clipboard
data class Seek(val fromMs: Long, val toMs: Long) : AnalyticsEvent
Link copied to clipboard
data class TextTrackChanged(val id: String?, val language: String?) : AnalyticsEvent

A text track was selected (id null = subtitles off) — accessibility usage reporting.

Link copied to clipboard
data class VerticalFeedImpression(val index: Int, val url: String) : AnalyticsEvent

Vertical feed: the item at index became the visible page.

Link copied to clipboard
data class VerticalFeedItemLooped(val index: Int, val loopCount: Int) : AnalyticsEvent

Vertical feed: the active item finished a loop (loopCount so far).

Link copied to clipboard
data class VerticalFeedItemWatched(val index: Int, val url: String, val watchTimeMs: Long, val loopCount: Int) : AnalyticsEvent

Vertical feed: the item at index left the screen — the impression summary. watchTimeMs is actual watched wall-time on this item (loops included), loopCount how many times it restarted.

Link copied to clipboard
data class VolumeChanged(val volume: Float, val muted: Boolean) : AnalyticsEvent

The viewer changed volume or mute — the muted-to-sound conversion metric for autoplay/ad measurement.

Properties

Link copied to clipboard

URL of the media item this event belongs to (null before a load).

Link copied to clipboard

Playback-session id: a fresh UUID minted by every OGPlayer.load, stamped on each event of that session so consumers can key their pipelines without inventing their own ids. Null only for events emitted before the first load.