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
5 changes: 5 additions & 0 deletions .changeset/shy-zoos-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@theoplayer/react-native-yospace': patch
---

Fixed an issue where the connector would throw an error while building on Android.
6 changes: 6 additions & 0 deletions .github/workflows/pr_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ jobs:
disable-animations: true
script: echo "Generated AVD snapshot for caching."

- name: Modify gradle.properties with repository secrets
working-directory: apps/e2e/android
run: |
echo "YOSPACE_USERNAME=${{ secrets.YOSPACE_USERNAME }}" >> ./gradle.properties
echo "YOSPACE_PASSWORD=${{ secrets.YOSPACE_PASSWORD }}" >> ./gradle.properties

- name: Modify gradle.properties for newArchEnabled
working-directory: apps/e2e/android
run: |
Expand Down
1 change: 1 addition & 0 deletions apps/e2e/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ dependencies {
implementation project(path: ':react-native-theoplayer-analytics-comscore')
implementation project(path: ':react-native-theoplayer-analytics-conviva')
implementation project(path: ':react-native-theoplayer-analytics-nielsen')
implementation project(path: ':react-native-theoplayer-yospace')

implementation "com.google.android.gms:play-services-cast-framework:${safeExtGet('castFrameworkVersion', '+')}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import com.facebook.soloader.SoLoader
import com.theoplayercomscore.ReactTHEOplayerComscorePackage
import com.theoplayerconviva.ReactTHEOplayerConvivaPackage
import com.theoplayernielsen.ReactTHEOplayerNielsenPackage
import com.theoplayeryospace.ReactTHEOplayerYospacePackage

class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost =
Expand All @@ -23,6 +24,7 @@ class MainApplication : Application(), ReactApplication {
add(ReactTHEOplayerComscorePackage())
add(ReactTHEOplayerConvivaPackage())
add(ReactTHEOplayerNielsenPackage())
add(ReactTHEOplayerYospacePackage())
}

override fun getJSMainModuleName(): String = "index"
Expand Down
2 changes: 2 additions & 0 deletions apps/e2e/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ include ':react-native-theoplayer-analytics-conviva'
project(':react-native-theoplayer-analytics-conviva').projectDir = new File(rootProject.projectDir, '../../../conviva/android')
include ':react-native-theoplayer-analytics-nielsen'
project(':react-native-theoplayer-analytics-nielsen').projectDir = new File(rootProject.projectDir, '../../../nielsen/android')
include ':react-native-theoplayer-yospace'
project(':react-native-theoplayer-yospace').projectDir = new File(rootProject.projectDir, '../../../yospace/android')
2 changes: 1 addition & 1 deletion apps/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"react-native": "npm:react-native-tvos@^0.75.4-0",
"react-native-device-info": "^10.14.0",
"react-native-status-bar-height": "^2.6.0",
"react-native-theoplayer": "^9.3.0",
"react-native-svg": "^15.8.0",
"react-native-theoplayer": "^9.3.0",
"react-native-web": "^0.19.13",
"react-native-web-image-loader": "^0.1.1"
},
Expand Down
20 changes: 20 additions & 0 deletions apps/e2e/src/tests/Yospace.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { TestScope } from 'cavy';
import { YospaceConnector } from '@theoplayer/react-native-yospace';
import { testConnector } from './ConnectorUtils';
import { THEOplayer } from 'react-native-theoplayer';

export default function (spec: TestScope) {
spec.describe(`Setup Yospace connector`, function () {
let connector: YospaceConnector;
testConnector(
spec,
(player: THEOplayer) => {
connector = new YospaceConnector(player);
},
() => {},
() => {
connector.destroy();
},
);
});
}
9 changes: 8 additions & 1 deletion apps/e2e/src/tests/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,12 @@ import Adobe from './Adobe.spec';
import Comscore from './Comscore.spec';
import Conviva from './Conviva.spec';
import Nielsen from './Nielsen.spec';
import Yospace from './Yospace.spec';
import { Platform } from 'react-native';

export default [Adobe, Comscore, Conviva, Nielsen];
const tests = [Adobe, Comscore, Conviva, Nielsen];
if (Platform.OS === 'android') {
tests.push(Yospace);
}

export default tests;
3 changes: 3 additions & 0 deletions apps/e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
],
"@theoplayer/react-native-analytics-nielsen": [
"../../nielsen/src/index"
],
"@theoplayer/react-native-yospace": [
"../../yospace/src/index"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,14 @@ private const val PROP_SSAI_INTEGRATION_YOSPACE = "yospace"
class ReactTHEOplayerYospaceModule(context: ReactApplicationContext) :
ReactContextBaseJavaModule(context) {

private val viewResolver: ViewResolver
private val viewResolver: ViewResolver = ViewResolver(context)

private var yospaceConnectors: HashMap<Int, YospaceConnector> = HashMap()

init {
viewResolver = ViewResolver(context)

// Register source builder
if (!SSAIAdapterRegistry.hasIntegration(PROP_SSAI_INTEGRATION_YOSPACE)) {
SSAIAdapterRegistry.register(PROP_SSAI_INTEGRATION_YOSPACE) { json, currentBuilder ->
yospaceBuilderFromJson(currentBuilder, json)
}
SSAIAdapterRegistry.register(PROP_SSAI_INTEGRATION_YOSPACE) { json, currentBuilder ->
yospaceBuilderFromJson(currentBuilder, json)
}
}

Expand Down
Loading