ogplayer_flutter library
OGPlayer for Flutter — the OGPlayer video SDK (the same published Android and iOS engines native apps use).
Classes
- AdsConfig
- AudioTrack
- AudioTrackChangedEvent
- BitrateChangedEvent
- BufferEndEvent
- BufferStartEvent
- CompleteEvent
- ContentRating
- CustomActionConfig
-
A host icon button in the player's top-end control row (icon-only, max 8).
iconName is a native drawable/asset name in the APP (e.g. a file in
android/app/src/main/res/drawable/). Taps arrive via
onCustomAction. - DrmConfig
- DrmKeysLoadedEvent
- DrmTokenRequest
- DroppedFramesEvent
- ErrorEvent
- FairPlayConfig
- FeedRailAction
-
One host action on the feed's right rail (max 6). iconName is a native
drawable/asset name in the APP (e.g. a file in
android/app/src/main/res/drawable/; on Android prefix it with
og_so the plugin's bundled shrinker rule keeps it in release builds). Taps arrive viaonRailAction. - FullscreenChangedEvent
- LiveInfo
- Runtime facts about the current live stream, read with OGPlayerViewController.getLiveInfo. Null for VOD or when nothing is loaded.
- OfflineLicenseInfo
- Persistent-license metadata for a downloaded DRM item.
- OGAdEvent
- OGAnalyticsEvent
- Playback quality and lifecycle events — the same discriminated union the native SDKs emit, mirrored member for member. Every event carries the per-load session stamp (sessionId, a fresh UUID per load) and the item URL, so analytics pipelines can key events without inventing their own ids.
- OGControlColors
-
Colour tokens of the built-in controls, named as in the native players'
OGControlColors. Set any subset on OGUIConfig.colors; an unset token keeps the SDK default named in its doc. - OGControlDimens
-
Dimension tokens of the built-in controls, named as in the native
players'
OGControlDimens, in dp on Android and pt on iOS. Set any subset on OGUIConfig.dimens; an unset token keeps the SDK default named in its doc. - OGDownload
-
Immutable snapshot of one offline download, keyed by its media URL — the
same URL the player uses for transparent offline pickup: loading an
OGMediaItem whose
urlhas a COMPLETED download plays from local storage automatically, no code change. - OGDownloadConfig
-
Per-download options for
OGDownloads.add. - OGDownloadEvent
-
One downloads event delivered on
OGDownloads.events: OGDownloadStateChanged on any state transition, OGDownloadProgress (throttled) while downloading, OGDownloadFailed with the mirrored OGPlayerError (codes 7100 DOWNLOAD_FAILED, 7101 DOWNLOAD_STORAGE_FULL, 7102 DOWNLOAD_LICENSE_FETCH_FAILED; 4006 DRM_OFFLINE_LICENSE_EXPIRED at playback time). - OGDownloadFailed
- OGDownloadProgress
- OGDownloads
-
Offline downloads — the imperative module mirroring
OGDownloads/OGDownloadManageron the native SDKs. Downloads are keyed by media URL; playing a downloaded URL through OGPlayerView picks up the local copy automatically (clear content AND DRM content with its stored persistent license) — no player-side code change. VOD only: add of a live item is rejected natively. - OGDownloadStateChanged
- OGMediaItem
- OGPlayerError
- OGPlayerView
-
OGPlayerView— the OGPlayer chrome and engine as a Flutter widget. Rendering and playback are 100% native (the same published Android/iOS SDKs used by native apps); this widget is a thin, typed bridge. One mirrored API of the native OGPlayer SDKs. - OGPlayerViewController
-
The imperative handle to a mounted OGPlayerView, delivered through
onViewCreated. Mirrors the ref surface of the other OGPlayer SDKs. - OGProgress
- OGStrings
-
Every word the built-in chrome shows or speaks to the screen reader —
control labels, menu rows, the LIVE chip, ad chrome, the error overlay,
the up-next card, the vertical feed's chips — in your language. Set it on
OGUIConfig.strings (and
OGVerticalFeedConfig.stringsfor the feed): - OGTracks
- The three track lists, delivered together on every change.
- OGUIConfig
- OGVerticalFeedConfig
- Feed-level appearance and behaviour. Every field falls back to the SDK default when null.
- OGVerticalFeedItem
- One page of the vertical feed.
- OGVerticalFeedView
-
OGVerticalFeedView— the SDK's swipeable portrait video feed as a Flutter widget: pooled preloaded neighbours, tap-to-pause, split layouts, sponsored items. Rendering and playback are 100% native; this widget is a thin, typed bridge mirroring the React Native wrapper member for member. - OrientationChangedEvent
- OverlayConfig
-
A host overlay (watermark/logo) in one of the player's nine anchored
slots. The SDK keeps overlays clear of the controls (top slots drop below
the top bar, bottom slots lift above it) and hides them during ad breaks.
Give it text (rendered on a dark scrim) or imageName (a native
drawable/asset in the APP; on Android prefix it with
og_so the plugin's bundled shrinker rule keeps it in release builds). - PauseEvent
- PictureInPictureChangedEvent
- PlaybackRecoveredEvent
- A recovery the player performed on its own; playback continues at positionMs. Count these in analytics — they are not errors.
- PlaybackStartedEvent
- First video frame of a load rendered; startupMs is wall time from load to that frame (time-to-first-frame). Once per load.
- PlayEvent
- PlayReadyConfig
- QualitySnapshotEvent
- SeekEvent
- SubtitleSource
- SubtitleStyle
- TextTrack
- TextTrackChangedEvent
- VerticalFeedImpressionEvent
- A vertical-feed page became the active one. Feed events are deliberately unstamped (OGAnalyticsEvent.sessionId/OGAnalyticsEvent.assetUrl are absent) — the feed pools engines across pages.
- VerticalFeedItemLoopedEvent
- The active feed page restarted from the top (loopCount completed loops).
- VerticalFeedItemWatchedEvent
- A feed page stopped being the active one; watchTimeMs is the total time it actually played while active.
- VideoQuality
- VolumeChangedEvent
- WidevineConfig
Enums
- BufferReason
- Why a BufferStart happened — rebuffer-ratio contracts need initial and seek buffering excluded, so the reason is explicit.
- ContentRatingAge
- OGDeviceOrientation
- Physical device orientation, reported by the view layer.
- OGDownloadState
-
Lifecycle state of an offline download (mirrors
OGDownloadStateon the native SDKs). - OGFeedContentFit
- FILL crops the video to cover the page (default); FIT letterboxes it.
- OGFeedSplitAudioSource
- Which split-video half is audible (default PRIMARY).
- OGFeedTextPlacement
- Split screen text + video: where a page's text band sits. OVERLAY (the default when unset) draws title/subtitle over the video instead.
- OGPlaybackState
- OGStreamType
- OGVolumeControlMode
- See OGPlayerView.volumeControlMode.
- OverlaySlot
- RecoveryReason
- Why a PlaybackRecovered happened — a recovery the player performed on its own; playback continues at the reported position. Android only: iOS reports these as a BufferStart/BufferEnd pair.
- SubtitleEdgeType
Typedefs
-
OGDrmTokenProvider
= Future<
Map< Function(DrmTokenRequest request)String, String> > - Called on every license request (renewals included) — return headers to merge into the request. The PPV / entitlement hook.