diff --git a/android/src/main/java/com/brentvatne/common/api/Source.kt b/android/src/main/java/com/brentvatne/common/api/Source.kt index 75a8b85f..b19fa8d9 100644 --- a/android/src/main/java/com/brentvatne/common/api/Source.kt +++ b/android/src/main/java/com/brentvatne/common/api/Source.kt @@ -46,10 +46,10 @@ class Source { /** http header list */ val headers: MutableMap = HashMap() - /** enable chunckless preparation for HLS + /** enable chunkless preparation for HLS * see: */ - var textTracksAllowChuncklessPreparation: Boolean = false + var textTracksAllowChunklessPreparation: Boolean = false override fun hashCode(): Int = Objects.hash(uriString, uri, startPositionMs, cropStartMs, cropEndMs, extension, metadata, headers) @@ -123,7 +123,7 @@ class Source { private const val PROP_SRC_TYPE = "type" private const val PROP_SRC_METADATA = "metadata" private const val PROP_SRC_HEADERS = "requestHeaders" - private const val PROP_SRC_TEXT_TRACKS_ALLOW_CHUNCKLESS_PREPARATION = "textTracksAllowChunklessPreparation" + private const val PROP_SRC_TEXT_TRACKS_ALLOW_CHUNKLESS_PREPARATION = "textTracksAllowChunklessPreparation" @SuppressLint("DiscouragedApi") private fun getUriFromAssetId(context: Context, uriString: String): Uri? { @@ -180,7 +180,7 @@ class Source { source.cropStartMs = safeGetInt(src, PROP_SRC_CROP_START, -1) source.cropEndMs = safeGetInt(src, PROP_SRC_CROP_END, -1) source.extension = safeGetString(src, PROP_SRC_TYPE, null) - source.textTracksAllowChuncklessPreparation = safeGetBool(src, PROP_SRC_TEXT_TRACKS_ALLOW_CHUNCKLESS_PREPARATION, true) + source.textTracksAllowChunklessPreparation = safeGetBool(src, PROP_SRC_TEXT_TRACKS_ALLOW_CHUNKLESS_PREPARATION, true) val propSrcHeadersArray = safeGetArray(src, PROP_SRC_HEADERS) if (propSrcHeadersArray != null) { diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index b306dcf3..0d6934f1 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -1046,7 +1046,7 @@ public class ReactExoplayerView extends FrameLayout implements mediaSourceFactory = new HlsMediaSource.Factory( mediaDataSourceFactory - ).setAllowChunklessPreparation(source.getTextTracksAllowChuncklessPreparation()); + ).setAllowChunklessPreparation(source.getTextTracksAllowChunklessPreparation()); break; case CONTENT_TYPE_OTHER: if ("asset".equals(uri.getScheme())) { diff --git a/examples/basic/src/VideoPlayer.tsx b/examples/basic/src/VideoPlayer.tsx index 3b4b9a00..ba12f403 100644 --- a/examples/basic/src/VideoPlayer.tsx +++ b/examples/basic/src/VideoPlayer.tsx @@ -150,6 +150,7 @@ class VideoPlayer extends Component { }, { description: '(hls|live) red bull tv', + textTracksAllowChunklessPreparation: false, uri: 'https://rbmn-live.akamaized.net/hls/live/590964/BoRB-AT/master_928.m3u8', metadata: { title: 'Custom Title', diff --git a/src/Video.tsx b/src/Video.tsx index a7bcfc19..627c9930 100644 --- a/src/Video.tsx +++ b/src/Video.tsx @@ -170,6 +170,8 @@ const Video = forwardRef( cropStart: resolvedSource.cropStart || 0, cropEnd: resolvedSource.cropEnd, metadata: resolvedSource.metadata, + textTracksAllowChunklessPreparation: + resolvedSource.textTracksAllowChunklessPreparation, }; }, [source]);