Skip to content

Commit

Permalink
Merge pull request #382 from THEOplayer/release/v8.0.0
Browse files Browse the repository at this point in the history
Release/v8.0.0
  • Loading branch information
tvanlaerhoven authored Sep 11, 2024
2 parents 9e5a370 + ed5fc8a commit c8824ef
Show file tree
Hide file tree
Showing 82 changed files with 3,329 additions and 2,967 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*/lib/
*/test/
28 changes: 0 additions & 28 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,4 @@ ios/custom/Frameworks/tvos/*.xcframework
# Jekyll / GitHub Pages
_site/
Gemfile.lock
vendor
4 changes: 1 addition & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
npm run prettier
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*/lib/

# TypeDoc
api/

tsconfig.json
*.md
7 changes: 0 additions & 7 deletions .prettierrc.js

This file was deleted.

15 changes: 15 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"bracketSpacing": true,
"bracketSameLine": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 150,
"overrides": [
{
"files": ["**/*.json", "**/*.yml"],
"options": {
"tabWidth": 2
}
}
]
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ 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).

## [8.0.0] - 24-09-11

### Added

- Added support for THEOplayer 8.0.

### Changed

- Deprecated Jitpack.io in favor of the THEOplayer Maven repository on Android.

### Fixed

- Fixed an issue on iOS where the initial `duration` property of the player would be `0` instead of `NaN`.

## [7.9.0] - 24-09-06

### Added
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ This projects falls under the license as defined in https://github.com/THEOplaye
3. [How to use these guides](#how-to-use-these-guides)
4. [Features](#features)
5. [Available connectors](#available-connectors)
6. [Getting Started](#getting-started)
6. [Creating your first app](#creating-your-first-app)
7. [Knowledge Base](#knowledge-base)
8. [API Reference](#api-reference)

## Overview

Expand Down Expand Up @@ -89,6 +91,11 @@ please reach out to us for support.
<td colspan="3">Adobe, Agama, Comscore, Conviva, Mux, Nielsen, Youbora</td>
</tr>
<tr>
<td><strong>Other Connectors</strong></td>
<td colspan="1">Yospace SSAI</td>
<td colspan="2"></td>
</tr>
<tr>
<td><strong>Subtitles &amp; Closed Captions</strong></td>
<td colspan="3">CEA-608/708, SRT, TTML, WebVTT</td>
</tr>
Expand Down Expand Up @@ -141,6 +148,7 @@ functionality. Currently, the following connectors are available:
| Mux analytics | [![%40theoplayer/react-native-analytics-mux](https://img.shields.io/npm/v/%40theoplayer%2Freact-native-analytics-mux?label=%40theoplayer/react-native-analytics-mux)](https://www.npmjs.com/package/%40theoplayer%2Freact-native-analytics-mux) | [`Mux`](https://github.com/THEOplayer/react-native-connectors/tree/main/mux) |
| Nielsen analytics | [![%40theoplayer/react-native-analytics-nielsen](https://img.shields.io/npm/v/%40theoplayer%2Freact-native-analytics-nielsen?label=%40theoplayer/react-native-analytics-nielsen)](https://www.npmjs.com/package/%40theoplayer%2Freact-native-analytics-nielsen) | [`Nielsen`](https://github.com/THEOplayer/react-native-connectors/tree/main/nielsen) |
| Youbora analytics | [![%40theoplayer/react-native-analytics-youbora](https://img.shields.io/npm/v/%40theoplayer%2Freact-native-analytics-youbora?label=%40theoplayer/react-native-analytics-youbora)](https://www.npmjs.com/package/%40theoplayer%2Freact-native-analytics-youbora) | [`Youbora`](https://github.com/THEOplayer/react-native-connectors/tree/main/youbora) |
| Yospace SSAI | [![%40theoplayer/react-native-yospace](https://img.shields.io/npm/v/%40theoplayer%2Freact-native-yospace?label=%40theoplayer/react-native-yospace)](https://www.npmjs.com/package/%40theoplayer%2Freact-native-yospace) | [`Yospace`](https://github.com/THEOplayer/react-native-connectors/tree/main/yospace) |
| Content protection (DRM) | [![%40theoplayer/react-native-drm](https://img.shields.io/npm/v/%40theoplayer%2Freact-native-drm?label=%40theoplayer/react-native-drm)](https://www.npmjs.com/package/%40theoplayer%2Freact-native-drm) | [`DRM`](https://github.com/THEOplayer/react-native-theoplayer-drm) |
| React Native Open UI | [![%40theoplayer/react-native-ui](https://img.shields.io/npm/v/%40theoplayer%2Freact-native-ui?label=%40theoplayer/react-native-ui)](https://www.npmjs.com/package/%40theoplayer%2Freact-native-ui) | [`Open UI`](https://github.com/THEOplayer/react-native-theoplayer-ui) |
| A template for<br/>`react-native-theoplayer` connectors. | [![%40theoplayer/react-native-connector-template](https://img.shields.io/npm/v/%40theoplayer%2Freact-native-connector-template?label=%40theoplayer/react-native-connector-template)](https://www.npmjs.com/package/%40theoplayer%2Freact-native-connector-template) | [`Connector template`](https://github.com/THEOplayer/react-native-theoplayer-connector-template) |
Expand Down
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ plugins:
- jekyll-remote-theme
github:
source:
branch: "develop"
path: "/"
branch: 'develop'
path: '/'
include:
- api/
exclude:
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ repositories {
google()
mavenCentral()
maven { url("local") }
maven { url 'https://jitpack.io' }
maven { url "https://maven.theoplayer.com/releases" }
}

dependencies {
Expand All @@ -118,7 +118,7 @@ dependencies {

println("Using THEOplayer (${versionString(theoplayer_sdk_version)})")
implementation "com.theoplayer.theoplayer-sdk-android:core:${theoplayer_sdk_version}"
implementation "com.theoplayer.theoplayer-sdk-android:ads-wrapper:7.6.1"
implementation "com.theoplayer.theoplayer-sdk-android:ads-wrapper:8.0.0"
implementation "com.theoplayer.android-connector:mediasession:${theoplayer_mediasession_version}"

if (enabledGoogleIMA) {
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>7.6.1</modelVersion>
<modelVersion>8.0.0</modelVersion>
<groupId>com.theoplayer.theoplayer-sdk-android</groupId>
<artifactId>ads-wrapper</artifactId>
<version>7.6.1</version>
<version>8.0.0</version>
<packaging>aar</packaging>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<groupId>com.theoplayer.theoplayer-sdk-android</groupId>
<artifactId>ads-wrapper</artifactId>
<versioning>
<latest>7.6.1</latest>
<release>7.6.1</release>
<latest>8.0.0</latest>
<release>8.0.0</release>
<versions>
<version>7.6.1</version>
<version>8.0.0</version>
</versions>
<lastUpdated>20240620111503</lastUpdated>
<lastUpdated>20240909163212</lastUpdated>
</versioning>
</metadata>
26 changes: 0 additions & 26 deletions android/src/main/java/com/theoplayer/PlayerConfigAdapter.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.theoplayer

import android.text.TextUtils
import com.facebook.react.bridge.ReadableMap
import com.google.ads.interactivemedia.v3.api.AdsRenderingSettings
import com.google.ads.interactivemedia.v3.api.ImaSdkFactory
Expand All @@ -11,14 +10,12 @@ import com.theoplayer.android.api.cast.CastStrategy
import com.theoplayer.android.api.cast.CastConfiguration
import com.theoplayer.android.api.pip.PipConfiguration
import com.theoplayer.android.api.player.NetworkConfiguration
import com.theoplayer.android.api.ui.UIConfiguration
import com.theoplayer.media.MediaSessionConfig
import com.theoplayer.media.MediaSessionConfigAdapter

private const val PROP_LICENSE = "license"
private const val PROP_LICENSE_URL = "licenseUrl"
private const val PROP_PRELOAD = "preload"
private const val PROP_LANGUAGE = "language"
private const val PROP_LIVE_OFFSET = "liveOffset"
private const val PROP_UI_ENABLED = "uiEnabled"
private const val PROP_CAST_STRATEGY = "strategy"
Expand All @@ -30,7 +27,6 @@ private const val PROP_RETRY_MAX_BACKOFF = "maximumBackoff"
private const val PROP_CAST_CONFIGURATION = "cast"
private const val PROP_ADS_CONFIGURATION = "ads"
private const val PROP_IMA_CONFIGURATION = "ima"
private const val PROP_UI_CONFIGURATION = "ui"
private const val PROP_MEDIA_CONTROL = "mediaControl"
private const val PROP_PPID = "ppid"
private const val PROP_MAX_REDIRECTS = "maxRedirects"
Expand Down Expand Up @@ -62,9 +58,6 @@ class PlayerConfigAdapter(private val configProps: ReadableMap?) {
if (hasKey(PROP_LIVE_OFFSET)) {
liveOffset(getDouble(PROP_LIVE_OFFSET))
}
if (hasKey(PROP_UI_CONFIGURATION)) {
ui(uiConfig())
}
if (hasKey(PROP_HLS_DATE_RANGE)) {
hlsDateRange(getBoolean(PROP_HLS_DATE_RANGE))
}
Expand Down Expand Up @@ -115,10 +108,6 @@ class PlayerConfigAdapter(private val configProps: ReadableMap?) {
}
featureFlags = convertedMap
}
// The current ISO 639-1 language code, get it from the UI config.
uiConfig().language?.let {
language = it
}
// The maximum number of VAST redirects.
if (hasKey(PROP_MAX_REDIRECTS)) {
maxRedirects = getInt(PROP_MAX_REDIRECTS)
Expand Down Expand Up @@ -164,21 +153,6 @@ class PlayerConfigAdapter(private val configProps: ReadableMap?) {
}
}

/**
* Get UIConfiguration object; these properties apply:
* - language: The language used to localize the ui elements.
*/
private fun uiConfig(): UIConfiguration {
return UIConfiguration.Builder().apply {
configProps?.getMap(PROP_UI_CONFIGURATION)?.run {
val languageString = getString(PROP_LANGUAGE)
if (languageString != null && !TextUtils.isEmpty(languageString)) {
language(languageString)
}
}
}.build()
}

/**
* Get CastConfiguration object; these properties apply:
* - strategy: The join strategy of the player.
Expand Down
4 changes: 1 addition & 3 deletions android/src/main/java/com/theoplayer/PlayerEventEmitter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private const val EVENT_PROP_SUITE_VERSION = "playerSuiteVersion"
@Suppress("UNCHECKED_CAST")
class PlayerEventEmitter internal constructor(
private val reactContext: ReactApplicationContext,
playerView: ReactTHEOplayerView
private val playerView: ReactTHEOplayerView
) {
@Retention(AnnotationRetention.SOURCE)
@StringDef(
Expand Down Expand Up @@ -163,7 +163,6 @@ class PlayerEventEmitter internal constructor(
private val textTrackListeners = HashMap<EventType<*>, EventListener<*>>()
private val audioTrackListeners = HashMap<EventType<*>, EventListener<*>>()
private val videoTrackListeners = HashMap<EventType<*>, EventListener<*>>()
private val playerView: ReactTHEOplayerView
private var adEventAdapter: AdEventAdapter? = null
private var castEventAdapter: CastEventAdapter? = null
private var lastTimeUpdate: Long = 0
Expand All @@ -175,7 +174,6 @@ class PlayerEventEmitter internal constructor(
}

init {
this.playerView = playerView

// Create listeners
playerListeners[PlayerEventTypes.SOURCECHANGE] = EventListener<PlayerEvent<*>> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.theoplayer

import android.annotation.SuppressLint
import android.content.*
import android.util.Log
import android.view.ViewGroup
import android.widget.FrameLayout
Expand Down
19 changes: 13 additions & 6 deletions android/src/main/java/com/theoplayer/ads/AdAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@ object AdAdapter {
*/
private fun fromAd(ad: Ad, includeAdBreak: Boolean): WritableMap {
val adPayload = Arguments.createMap()
adPayload.putString(
PROP_AD_INTEGRATION, if (ad.integration != null) ad.integration!!
.type else ""
)
adPayload.putString(PROP_AD_INTEGRATION, ad.integration.type)
adPayload.putString(PROP_AD_TYPE, ad.type)
adPayload.putString(PROP_AD_ID, ad.id)
val adBreak = ad.adBreak
Expand Down Expand Up @@ -206,13 +203,18 @@ object AdAdapter {
}

override fun getIntegration(): AdIntegrationKind {
return AdIntegrationKind.from(ad.getString(PROP_AD_INTEGRATION))
return AdIntegrationKind.from(ad.getString(PROP_AD_INTEGRATION)) ?: AdIntegrationKind.CUSTOM
}

override fun getCustomIntegration(): String? {
return ad.getString(PROP_AD_CUSTOM_INTEGRATION)
}

override fun getCustomData(): Any? {
// Not supported yet
return null
}

override fun getImaAd(): com.google.ads.interactivemedia.v3.api.Ad {
return parseImaAd(ad)
}
Expand Down Expand Up @@ -282,12 +284,17 @@ object AdAdapter {
}

override fun getIntegration(): AdIntegrationKind {
return AdIntegrationKind.from(adBreak.getString(PROP_ADBREAK_INTEGRATION))
return AdIntegrationKind.from(adBreak.getString(PROP_ADBREAK_INTEGRATION)) ?: AdIntegrationKind.CUSTOM
}

override fun getCustomIntegration(): String? {
return adBreak.getString(PROP_AD_CUSTOM_INTEGRATION)
}

override fun getCustomData(): Any? {
// Not supported yet
return null
}
}
}

Expand Down
Loading

0 comments on commit c8824ef

Please sign in to comment.