Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.1.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Added `useSystemCaptionStyle` flag to `PlayerConfiguration` on Android. When set to `true`, the player will apply the caption styles as configured in the system settings.

## [11.0.0] - 26-04-16

### Added
Expand Down
5 changes: 5 additions & 0 deletions android/src/main/java/com/theoplayer/PlayerConfigAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ private const val PROP_THEOLIVE_ANALYTICS_DISABLED = "analyticsDisabled"
private const val PROP_THEOLIVE_DISCOVERY_URL = "discoveryUrl"
private const val PROP_MULTIMEDIA_TUNNELING_ENABLED = "tunnelingEnabled"
private const val PROP_DEBUG_LOGS_ENABLED = "debugLogsEnabled"
private const val PROP_SYSTEM_CAPTION_STYLE = "useSystemCaptionStyle"


class PlayerConfigAdapter(private val configProps: ReadableMap?) {

Expand Down Expand Up @@ -83,6 +85,9 @@ class PlayerConfigAdapter(private val configProps: ReadableMap?) {
if (hasKey(PROP_MULTIMEDIA_TUNNELING_ENABLED)) {
tunnelingEnabled(getBoolean(PROP_MULTIMEDIA_TUNNELING_ENABLED))
}
if (hasKey(PROP_SYSTEM_CAPTION_STYLE)) {
useSystemCaptionStyle(getBoolean(PROP_SYSTEM_CAPTION_STYLE))
}
}
}.build()
}
Expand Down
2 changes: 2 additions & 0 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ const playerConfig: PlayerConfiguration = {
ads: {
theoads: true,
},
debugLogsEnabled: false, // Android only.
useSystemCaptionStyle: false, // Android only.
};

/**
Expand Down
12 changes: 12 additions & 0 deletions src/api/config/PlayerConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,18 @@ export interface PlayerConfiguration {
* <br/> - When set to true, all debug log tags from the native Android SDK will be enabled.
*/
debugLogsEnabled?: boolean;

/**
* Sets whether captions should automatically apply a system-defined style.
*
* @defaultValue false
*
* @platform android
*
* @remarks
* <br/> - Any user-defined overrides are still respected.
*/
useSystemCaptionStyle?: boolean;
}

/**
Expand Down
Loading