Skip to content

Commit 1b55dac

Browse files
authored
Merge pull request #671 from THEOplayer/release/v10.3.0
Release/v10.3.0
2 parents ad62045 + 1bcd2d7 commit 1b55dac

14 files changed

Lines changed: 90 additions & 231 deletions

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,27 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.1.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [10.3.0] - 25-10-27
9+
10+
### Fixed
11+
12+
- Fixed an issue on web, where adbreak related AdEvents did no longer contain the adBreak info.
13+
14+
### Changed
15+
16+
- When the player's `currentTime` is set to `Infinity` on mobile platforms, the player will seek to the live edge rather than the end of the `seekable` range.
17+
- Added `useHttpEngine` to `PlayerConfiguration` to allow toggling the use of HttpEngine for network requests on Android.
18+
819
## [10.2.2] - 25-10-23
920

21+
### Fixed
22+
1023
- Fixed a build issue on iOS/tvOS due to a breaking change on the THEOplayerSDK.Ad protocol in iOS SDK 10.3.0 .
1124

1225
## [10.2.1] - 25-10-21
1326

27+
### Fixed
28+
1429
- Fixed an issue on web where the `<THEOplayerView>` would be re-rendered non-stop.
1530

1631
## [10.2.0] - 25-10-20

android/src/main/java/com/theoplayer/PlayerConfigAdapter.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ private const val PROP_RETRY_CONFIG = "retryConfiguration"
2323
private const val PROP_RETRY_MAX_RETRIES = "maxRetries"
2424
private const val PROP_RETRY_MIN_BACKOFF = "minimumBackoff"
2525
private const val PROP_RETRY_MAX_BACKOFF = "maximumBackoff"
26+
private const val PROP_USE_HTTPENGINE = "useHttpEngine"
2627
private const val PROP_CAST_CONFIGURATION = "cast"
2728
private const val PROP_ADS_CONFIGURATION = "ads"
2829
private const val PROP_IMA_CONFIGURATION = "ima"
@@ -60,7 +61,7 @@ class PlayerConfigAdapter(private val configProps: ReadableMap?) {
6061
getString(PROP_LICENSE_URL)?.let { licenseUrl ->
6162
licenseUrl(licenseUrl)
6263
}
63-
if (hasKey(PROP_RETRY_CONFIG)) {
64+
if (hasKey(PROP_RETRY_CONFIG) || hasKey(PROP_USE_HTTPENGINE)) {
6465
networkConfiguration(networkConfig())
6566
}
6667
if (hasKey(PROP_THEOLIVE_CONFIG)) {
@@ -81,6 +82,7 @@ class PlayerConfigAdapter(private val configProps: ReadableMap?) {
8182
* - maxRetries: The maximum amount of retries before the player throws a fatal error.
8283
* - minimumBackoff: The initial delay in milliseconds before a retry request occurs.
8384
* - maximumBackoff: The maximum amount of delay in milliseconds between retry requests.
85+
* - useHttpEngine: Whether the player should use android.net.http.HttpEngine or Cronet for its network stack, if available.
8486
*/
8587
private fun networkConfig(): NetworkConfiguration {
8688
return NetworkConfiguration.Builder().apply {
@@ -95,6 +97,11 @@ class PlayerConfigAdapter(private val configProps: ReadableMap?) {
9597
maximumBackOff(getDouble(PROP_RETRY_MAX_BACKOFF).toLong())
9698
}
9799
}
100+
configProps?.run {
101+
if (hasKey(PROP_USE_HTTPENGINE)) {
102+
useHttpEngine(getBoolean(PROP_USE_HTTPENGINE))
103+
}
104+
}
98105
}.build()
99106
}
100107

android/src/main/java/com/theoplayer/player/PlayerModule.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ class PlayerModule(context: ReactApplicationContext) : ReactContextBaseJavaModul
6767
}
6868
}
6969

70+
@ReactMethod
71+
fun goLive(tag: Int) {
72+
viewResolver.resolveViewByTag(tag) { view: ReactTHEOplayerView? ->
73+
view?.player?.currentTime = Double.POSITIVE_INFINITY
74+
}
75+
}
76+
7077
@ReactMethod
7178
fun setPaused(tag: Int, paused: Boolean) {
7279
viewResolver.resolveViewByTag(tag) { view: ReactTHEOplayerView? ->

example/babel.config.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
const path = require('path');
2-
const pak = require('../package.json');
3-
41
module.exports = {
52
presets: ['module:@react-native/babel-preset'],
6-
plugins: [
7-
[
8-
'module-resolver',
9-
{
10-
extensions: ['.tsx', '.ts', '.js', '.json'],
11-
alias: {
12-
[pak.name]: path.join(__dirname, '..', pak.source),
13-
},
14-
},
15-
],
16-
],
173
};

example/package-lock.json

Lines changed: 0 additions & 190 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,16 @@
3939
"@types/react": "^19.1.8",
4040
"@types/react-dom": "^19.1.6",
4141
"babel-loader": "^8.4.1",
42-
"babel-plugin-module-resolver": "^5.0.2",
4342
"babel-plugin-react-native-web": "^0.17.7",
4443
"copy-webpack-plugin": "^13.0.1",
4544
"eslint": "^8.57.1",
4645
"html-webpack-plugin": "^5.6.3",
4746
"react-native-svg-web": "^1.0.9",
47+
"theoplayer": "^10",
4848
"typescript": "5.8.3",
4949
"webpack": "^5.99.5",
5050
"webpack-cli": "^6.0.1",
51-
"webpack-dev-server": "^5.2.1",
52-
"theoplayer": "^10"
51+
"webpack-dev-server": "^5.2.1"
5352
},
5453
"overrides": {
5554
"react-native-google-cast": {

example/web/webpack.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ const path = require('path');
33
const HTMLWebpackPlugin = require('html-webpack-plugin');
44
const CopyWebpackPlugin = require('copy-webpack-plugin');
55

6+
const pkg = require('../../package.json');
67
const projectDirectory = path.resolve(__dirname, '../..');
7-
88
const appDirectory = path.resolve(__dirname, '..');
99

1010
// A folder for any stub components we need in case there is no counterpart for it on react-native-web.
@@ -95,6 +95,8 @@ module.exports = {
9595
resolve: {
9696
extensions: ['.web.js', '.web.ts', '.web.tsx', '.js', '.ts', '.tsx'],
9797
alias: {
98+
[pkg.name]: path.resolve(projectDirectory, pkg.source),
99+
98100
'react-native$': 'react-native-web',
99101
'react-native-url-polyfill': 'url-polyfill',
100102
'react-native-google-cast': path.resolve(stubDirectory, 'CastButtonStub'),

ios/THEOplayerRCTBridge.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ @interface RCT_EXTERN_REMAP_MODULE(THEORCTPlayerModule, THEOplayerRCTPlayerAPI,
7878
RCT_EXTERN_METHOD(setCurrentTime:(nonnull NSNumber *)node
7979
time:(nonnull NSNumber *)time)
8080

81+
RCT_EXTERN_METHOD(goLive:(nonnull NSNumber *)node)
82+
8183
RCT_EXTERN_METHOD(setMuted:(nonnull NSNumber *)node
8284
muted:(BOOL)muted)
8385

0 commit comments

Comments
 (0)