Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.15.0 #363

Merged
merged 187 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
373b236
refactor: improve null safety
krocard Nov 8, 2023
a2e29de
refactor: report errors instead of ignoring invalid states
krocard Nov 9, 2023
e0f0244
refactor: move helpers in base module
krocard Nov 10, 2023
5fc530a
refactor: reformat
krocard Nov 10, 2023
09db8f3
fixup! method not called toJson
krocard Nov 10, 2023
2cb51f8
refactor: use getPlayer instead of direct map access
krocard Nov 10, 2023
46a7535
refactor: introduce module accessors
krocard Nov 13, 2023
bfc3b8d
chore: update yarn versions
zigavehovec Nov 13, 2023
14fc208
refactor: rename addUIBlock
krocard Nov 13, 2023
ce94e2f
chore: fix js build?
zigavehovec Nov 13, 2023
b39491e
refactor: introduce throw safe block
krocard Nov 13, 2023
f2ff634
fix: remove extra promise.resolve
krocard Nov 13, 2023
f8e3611
refactor: compile time safe getPlayer
krocard Nov 13, 2023
899d4f0
refactor: add withArray
krocard Nov 13, 2023
f60caee
chore: add documentation
krocard Nov 13, 2023
60b8c2d
chore: migrate android/build.gradle
zigavehovec Nov 13, 2023
c2fb2c8
Merge branch 'development' into PRN-66/update-react-native-to-the-lat…
zigavehovec Nov 13, 2023
d6964b6
chore: migrate example app
zigavehovec Nov 13, 2023
7b81d83
refactor: make map&array helpers type safe
krocard Nov 13, 2023
508caaa
refactor: cast manager module
krocard Nov 13, 2023
c796d81
chore: migrate example app
zigavehovec Nov 13, 2023
9c86447
fix: don't return `Unit`
krocard Nov 14, 2023
c969a41
fix: remove unnecessary promise resolve
krocard Nov 14, 2023
598d8bf
fix: factorize with* methods
krocard Nov 14, 2023
efe8065
refactor: move helper method to extension
krocard Nov 14, 2023
d3c9572
refactor: rename PromiseRejectOnExceptionBlock to RejectPromiseOnExce…
krocard Nov 14, 2023
a6528bb
refactor: migrate SourceModule to BitmovinBaseModule
krocard Nov 14, 2023
e58417e
chore: fix native module auto-linking
zigavehovec Nov 14, 2023
d6306f6
chore: gradle fixes
zigavehovec Nov 14, 2023
ef81c51
Merge remote-tracking branch 'origin/main' into refactor--improve-nul…
krocard Nov 14, 2023
69eed4b
chore: fix android build
zigavehovec Nov 14, 2023
a5b9cd2
chore: update example flipper implementations
zigavehovec Nov 15, 2023
d1c90fa
chore: remove not needed files
zigavehovec Nov 15, 2023
f61fc3e
chore: sync with reference project
zigavehovec Nov 15, 2023
e098826
chore: migrate iOS
zigavehovec Nov 15, 2023
63b3f1f
chore: use the new metro config
zigavehovec Nov 15, 2023
de73fb8
Merge branch 'development' into PRN-66/update-react-native-to-the-lat…
zigavehovec Nov 15, 2023
8105c4a
chore: update podfile.lock
zigavehovec Nov 15, 2023
e593555
chore: ignore node_modules folders from SwiftLint
rolandkakonyi Nov 16, 2023
2d98c66
Merge branch 'development' into PRN-66/update-react-native-to-the-lat…
rolandkakonyi Nov 16, 2023
2cfdae4
chore: fix tvOS example application
rolandkakonyi Nov 16, 2023
80b50b9
chore: remove unneeded import
rolandkakonyi Nov 16, 2023
a9ddb70
chore: some updates
zigavehovec Nov 16, 2023
59bf04d
chore: remove unndecessary backport for Xcode 15
rolandkakonyi Nov 16, 2023
2f2d0df
Merge branch 'PRN-66/update-react-native-to-the-latest-version' of gi…
rolandkakonyi Nov 16, 2023
fe244b9
refactor: migrate offline module
krocard Nov 17, 2023
9f8abdb
refactor: migrate drm module
krocard Nov 17, 2023
3fd0906
refactor: remove duplicated promise.resolve
krocard Nov 17, 2023
edd2bfa
refactor: remove duplicated promise.resolve
krocard Nov 17, 2023
2aff015
fix: allow duration not propagated
krocard Nov 22, 2023
8d1d05c
fix: don't resolve Unit
krocard Nov 22, 2023
944088c
chore: prevent Brewfile.lock.json to be generated when using via yarn
rolandkakonyi Nov 22, 2023
d2474a1
chore: start packager when running iOS or tvOS example app
rolandkakonyi Nov 22, 2023
22e540f
chore: fix tvOS UI
rolandkakonyi Nov 22, 2023
22fa260
Merge branch 'development' into PRN-66/update-react-native-to-the-lat…
rolandkakonyi Nov 22, 2023
88a4cc7
Merge branch 'development' into PRN-66/update-react-native-to-the-lat…
rolandkakonyi Nov 24, 2023
bf17584
feat(playertesting): add empty application for hosting integration tests
rolandkakonyi Nov 24, 2023
78e591e
feat(playertesting): setup cavy framework
rolandkakonyi Nov 24, 2023
6210d66
feat(playertesting): add player testing framework
rolandkakonyi Nov 24, 2023
b1bb85e
chore: change target & compile sdk to 33
zigavehovec Nov 24, 2023
a826b1e
Merge remote-tracking branch 'origin/PRN-66/update-react-native-to-th…
zigavehovec Nov 24, 2023
0426f27
feat(playertesting): fix app setup
rolandkakonyi Nov 24, 2023
f9c361a
Merge branch 'PRN-66/update-react-native-to-the-latest-version' into …
rolandkakonyi Nov 24, 2023
734e696
Merge branch 'player-testing/integration-test-app-setup' into player-…
rolandkakonyi Nov 24, 2023
fea3d22
Merge branch 'player-testing/cavy-setup' into player-testing/add-play…
rolandkakonyi Nov 24, 2023
1c63807
feat(playertesting): fix react types resolution in integration tests
rolandkakonyi Nov 24, 2023
17c0e66
Merge branch 'player-testing/cavy-setup' into player-testing/add-play…
rolandkakonyi Nov 24, 2023
bff5d8d
feat(playertesting): add instructions when running without cavy
rolandkakonyi Nov 24, 2023
9fc60c5
feat(playertesting): refactor
rolandkakonyi Nov 24, 2023
b939ae6
chore: refactor bootstrap commands
rolandkakonyi Nov 25, 2023
fdd74de
chore: fix CI workflows
rolandkakonyi Nov 25, 2023
8c469a7
Merge branch 'player-testing/cavy-setup' into player-testing/add-play…
rolandkakonyi Nov 25, 2023
1a128cf
chore: remove unneeded lint command
rolandkakonyi Nov 27, 2023
7b257ad
Merge branch 'player-testing/integration-test-app-setup' into player-…
rolandkakonyi Nov 27, 2023
6a86342
Merge branch 'player-testing/cavy-setup' into player-testing/add-play…
rolandkakonyi Nov 27, 2023
0d00e43
chore: add changelog entry
rolandkakonyi Nov 27, 2023
97999dd
feat(playertesting): rename CLI commands
rolandkakonyi Nov 27, 2023
188d3ec
chore: update contribution guide
rolandkakonyi Nov 27, 2023
4a8c76c
chore: update contribution guide
rolandkakonyi Nov 27, 2023
f8a1ec0
Merge branch 'player-testing/cavy-setup' into player-testing/add-play…
rolandkakonyi Nov 27, 2023
5bc5937
Merge pull request #336 from bitmovin/main
rolandkakonyi Nov 27, 2023
b8f0f0f
Merge branch 'development' into PRN-66/update-react-native-to-the-lat…
rolandkakonyi Nov 28, 2023
3263ada
Merge branch 'PRN-66/update-react-native-to-the-latest-version' into …
rolandkakonyi Nov 28, 2023
d91ea99
Merge branch 'player-testing/integration-test-app-setup' into player-…
rolandkakonyi Nov 28, 2023
0d64213
Merge branch 'player-testing/cavy-setup' into player-testing/add-play…
rolandkakonyi Nov 28, 2023
11aebab
chore: update Podfile after version bump
rolandkakonyi Nov 28, 2023
1634338
Merge branch 'player-testing/cavy-setup' into player-testing/add-play…
rolandkakonyi Nov 28, 2023
5840f23
chore: remove workaround from Podfile
rolandkakonyi Nov 28, 2023
6fd2d83
Update CONTRIBUTING.md
rolandkakonyi Nov 28, 2023
bd45e21
Update CONTRIBUTING.md
rolandkakonyi Nov 28, 2023
dbf2c61
Merge branch 'player-testing/integration-test-app-setup' into player-…
rolandkakonyi Nov 28, 2023
7955765
Merge branch 'player-testing/cavy-setup' into player-testing/add-play…
rolandkakonyi Nov 28, 2023
150bc5e
chore: use UUID generator library
rolandkakonyi Nov 28, 2023
fe5f4ea
feat(playertesting): make event expectation helpers more verbose
rolandkakonyi Nov 28, 2023
a4c62d7
feat(playertesting): use variadic parameters for multiple event expec…
rolandkakonyi Nov 28, 2023
23323d3
feat(playertesting): add more meaningful tests
rolandkakonyi Nov 28, 2023
9cf03b2
feat(playertesting): fix variadic parameters usage
rolandkakonyi Nov 28, 2023
3742d68
feat(playertesting): update contribution guide with real test
rolandkakonyi Nov 28, 2023
78c0994
feat(playertesting): extend documentation for integration tests
rolandkakonyi Nov 28, 2023
a57ae4a
fix return type of RepeatedEvent function
rolandkakonyi Nov 29, 2023
0d97cc6
feat(playertesting): rename PlayerWorld to PlayerTestWorld
rolandkakonyi Nov 29, 2023
7e10e11
Merge branch 'player-testing/add-player-testing-framework' into playe…
rolandkakonyi Nov 29, 2023
a416968
feat(playertesting): improve API docs for player testing
rolandkakonyi Nov 29, 2023
76ab8ac
fix(silentiosplayback): fix silent iOS playback when device is muted
rolandkakonyi Nov 29, 2023
d733d09
refactor: introduce a type safe promise
krocard Nov 29, 2023
4e6f164
fix: code formating
krocard Nov 29, 2023
7fda4b6
Merge pull request #338 from bitmovin/set-audiosession-category-in-ev…
rolandkakonyi Nov 30, 2023
7ab087b
fix(loadingstate): loadingState was missing in source events
rolandkakonyi Nov 30, 2023
39c2e07
feat(playertests): fix source loadingState in events
rolandkakonyi Nov 30, 2023
3993e56
feat(playertests): fix wrong type annotation for player testing function
rolandkakonyi Nov 30, 2023
f4c0407
feat(playertests): add Sources helper to support player tests
rolandkakonyi Nov 30, 2023
be36949
feat(playertests): fix race-condition in player testing network
rolandkakonyi Nov 30, 2023
8cefd02
feat(playertests): add note about setting license key for tests
rolandkakonyi Nov 30, 2023
f1dc4cf
feat(playertests): add playback and loading tests
rolandkakonyi Nov 30, 2023
fe9c38b
fix(loadingstate): add missing loadingState to EventSource
rolandkakonyi Nov 30, 2023
75a40c4
Merge pull request #339 from bitmovin/fix-source-events-loadingstate-…
rolandkakonyi Nov 30, 2023
6c8b9aa
feat(playertests): extend loading tests and add unloading tests
rolandkakonyi Nov 30, 2023
b06668a
feat(playertests): rename live test property
rolandkakonyi Nov 30, 2023
bbcab5d
chore(ios): update ios player version to 3.50.0
Dec 1, 2023
cb07f50
refactor: prefer early return on failure
krocard Dec 1, 2023
cfed18c
chore: add changelog
zigavehovec Dec 1, 2023
807a221
Merge branch 'development' into PRN-66/update-react-native-to-the-lat…
zigavehovec Dec 1, 2023
8773de7
fix: reject invalid command
krocard Dec 1, 2023
c30b6fe
fix: formating
krocard Dec 1, 2023
6231fd9
refactor: improve documentation
krocard Dec 1, 2023
f32a92f
fix: reject if analytics is disable
krocard Dec 4, 2023
4373ab6
refactor: mark noop function as inline
krocard Dec 4, 2023
08ab485
fix: made all array non nullable (empty on null)
krocard Dec 4, 2023
2c0d887
fix: serializing methods
krocard Dec 4, 2023
779b1e3
fix: don't skip player creation if config is missing
krocard Dec 4, 2023
ff59feb
Merge pull request #342 from bitmovin/update_ios_player_to_3.50.0
rolandkakonyi Dec 5, 2023
b1cf875
Merge branch 'development' into PRN-66/update-react-native-to-the-lat…
rolandkakonyi Dec 5, 2023
d77c955
fix: don't send scaling mode if undefined
krocard Dec 6, 2023
4994562
fix: rename&use runOnMainLooperAndLogException
krocard Dec 6, 2023
d36c14d
fix: log invalid playerId
krocard Dec 6, 2023
ff1148c
fix: error message
krocard Dec 6, 2023
d272236
refactor: avoid creating a handler for each request
krocard Dec 6, 2023
e035a36
refactor: use single line function
krocard Dec 6, 2023
653fcd2
refactor: invalid ref in kdoc
krocard Dec 6, 2023
cc22758
feat(adplayertests): add ad player tests
rolandkakonyi Dec 4, 2023
ae6f3da
fix: inverted condition breaking PiP
krocard Dec 7, 2023
fef1113
Merge pull request #317 from bitmovin/PRN-74/refactor--improve-null-s…
krocard Dec 7, 2023
e137689
Treat TS lint warnings as error
krocard Dec 7, 2023
b97d304
chore: reduce possible race-conditions when running tests and calling…
rolandkakonyi Dec 7, 2023
d977d88
chore: improve running from the command line
rolandkakonyi Dec 7, 2023
eafa6ec
Merge branch 'improve-player-testing-setup' into add-ads-player-tests
rolandkakonyi Dec 7, 2023
2e6fc90
chore: reduce possible race-conditions when running tests and calling…
rolandkakonyi Dec 7, 2023
19fff75
Merge branch 'improve-player-testing-setup' into add-ads-player-tests
rolandkakonyi Dec 7, 2023
f3b191b
chore(android): update android player version to 3.53.0+jason
Dec 11, 2023
25c9347
chore: increae min RN version to 0.65
rolandkakonyi Dec 11, 2023
6c22fc2
Merge pull request #351 from bitmovin/update_android_player_to_3.53.0…
strangesource Dec 12, 2023
0c62cff
Merge branch 'development' into PRN-66/update-react-native-to-the-lat…
zigavehovec Dec 12, 2023
4de7966
Merge pull request #318 from bitmovin/PRN-66/update-react-native-to-t…
zigavehovec Dec 12, 2023
a93646c
Merge pull request #352 from bitmovin/PRN-91/change-min-version-to-0.…
rolandkakonyi Dec 13, 2023
d8a6d02
Merge pull request #330 from bitmovin/player-testing/integration-test…
rolandkakonyi Dec 13, 2023
eb3fe01
Merge pull request #331 from bitmovin/player-testing/cavy-setup
rolandkakonyi Dec 13, 2023
7ed5dbc
Merge pull request #332 from bitmovin/player-testing/add-player-testi…
rolandkakonyi Dec 13, 2023
812abf9
Merge pull request #337 from bitmovin/player-testing/add-more-documen…
rolandkakonyi Dec 13, 2023
e39272d
Merge pull request #341 from bitmovin/prepare-for-player-tests
rolandkakonyi Dec 13, 2023
118b30c
feat(playertesting): improve test structure based on feedback
rolandkakonyi Dec 13, 2023
7cfda29
Merge pull request #340 from bitmovin/add-player-tests
rolandkakonyi Dec 13, 2023
d3643a6
chore: Improve code style
rolandkakonyi Dec 13, 2023
e9ee5c1
Merge branch 'development' into improve-player-testing-setup
rolandkakonyi Dec 13, 2023
d833a12
Merge branch 'improve-player-testing-setup' into add-ads-player-tests
rolandkakonyi Dec 13, 2023
ede8d9d
Merge pull request #350 from bitmovin/improve-player-testing-setup
rolandkakonyi Dec 13, 2023
878d065
Merge pull request #349 from bitmovin/add-ads-player-tests
rolandkakonyi Dec 13, 2023
c97b8a8
fix: currentTime mode handling as it was marked optional, while we on…
rolandkakonyi Dec 13, 2023
db3ceae
chore: always run android integration tests on emulator
rolandkakonyi Dec 13, 2023
304e89d
chore: add changelog entry for Android Player 3.53.0 update
strangesource Dec 14, 2023
346ed97
Merge pull request #355 from bitmovin/add-changelog-entry
strangesource Dec 14, 2023
f3509bd
Merge pull request #354 from bitmovin/feature/fix-current-time-mode-h…
rolandkakonyi Dec 14, 2023
6a6db1d
chore: add FLAG_KEEP_SCREEN_ON to example/MainActivity
zigavehovec Dec 14, 2023
e33825f
chore: improve documentation about integration test limitations
rolandkakonyi Dec 14, 2023
e25543a
chore: fix skipping CI builds when committing only markdown files
rolandkakonyi Dec 14, 2023
7bc4f6f
Merge pull request #353 from bitmovin/feature/always-run-android-test…
rolandkakonyi Dec 14, 2023
b8ee618
chore: disable Flipper on CI
rolandkakonyi Dec 14, 2023
970c677
Merge pull request #357 from bitmovin/disable-flipper-on-CI
rolandkakonyi Dec 14, 2023
5457277
Fix changelog typo
rolandkakonyi Dec 14, 2023
71dff7a
Merge pull request #356 from bitmovin/PRN-94/screensaver-covers-playe…
zigavehovec Dec 14, 2023
f76dd8a
chore(ios): update ios player version to 3.51.0
Dec 15, 2023
409198a
Merge pull request #358 from bitmovin/update_ios_player_to_3.51.0
rolandkakonyi Dec 15, 2023
d57cfba
chore(android): update android player version to 3.54.0+jason
Dec 15, 2023
0e5c22d
chore: update Kotlin to 1.8.20
zigavehovec Dec 18, 2023
fec7e73
Merge pull request #361 from bitmovin/update_android_player_to_3.54.0…
zigavehovec Dec 18, 2023
8955262
chore: add to changelog
zigavehovec Dec 18, 2023
32c9dfe
Merge pull request #362 from bitmovin/untracked/update-changelog
zigavehovec Dec 18, 2023
9b70cbb
chore: prepare release 0.15.0
Dec 18, 2023
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
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ node_modules/
example/node_modules/
example/ios/
example/ios/Pods/
integration_test/node_modules/
integration_test/ios/
integration_test/ios/Pods/
17 changes: 14 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@ name: CI
on:
pull_request:
paths-ignore:
- '*.md'
- '**.md'

push:
branches: [development]
paths-ignore:
- '*.md'
- '**.md'

concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
NO_FLIPPER: 1

jobs:
code-style-typescript:
name: Code style Typescript
Expand Down Expand Up @@ -94,6 +97,9 @@ jobs:
- name: Install node_modules (example/)
run: yarn install --frozen-lockfile --cwd example

- name: Install node_modules (integration_test/)
run: yarn install --frozen-lockfile --cwd integration_test

- name: Compile TypeScript
run: yarn typescript

Expand All @@ -117,6 +123,9 @@ jobs:
- name: Install node_modules (example/)
run: yarn install --frozen-lockfile --cwd example

- name: Install node_modules (integration_test/)
run: yarn install --frozen-lockfile --cwd integration_test

- name: Build docs
run: yarn docs

Expand Down Expand Up @@ -146,6 +155,9 @@ jobs:
- name: Install node_modules (example/)
run: yarn install --frozen-lockfile --cwd example

- name: Install node_modules (integration_test/)
run: yarn install --frozen-lockfile --cwd integration_test

- name: Set up Gradle cache
uses: gradle/gradle-build-action@v2
with:
Expand Down Expand Up @@ -200,7 +212,6 @@ jobs:
working-directory: example/ios
env:
CP_HOME_DIR: ${{ github.workspace }}/.cocoapods-cache
NO_FLIPPER: 1

- name: Save Pods cache
if: steps.pods-cache-restore.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ android.iml

# Cocoapods
#
example/ios/Pods/
*/ios/Pods/

# node.js
#
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ android/.settings
.eslintignore
type-test.ts
example/
integration_test/
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ node_modules/
example/node_modules/
example/ios/
example/ios/Pods/
integration_test/node_modules/
integration_test/ios/
integration_test/ios/Pods/
.github/*.md
4 changes: 4 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
excluded:
# folders that are excluded from linting, external dependencies or generated files
- ${PWD}/node_modules
- ${PWD}/example/ios/Pods
- ${PWD}/example/node_modules
- ${PWD}/integration_test/ios/Pods
- ${PWD}/integration_test/node_modules

disabled_rules:
- todo
Expand Down
6 changes: 3 additions & 3 deletions Brewfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
"system": {
"macos": {
"sonoma": {
"HOMEBREW_VERSION": "4.1.15",
"HOMEBREW_VERSION": "4.1.20",
"HOMEBREW_PREFIX": "/opt/homebrew",
"Homebrew/homebrew-core": "api",
"CLT": "15.0.0.0.1.1694021235",
"Xcode": "15.0",
"CLT": "",
"Xcode": "15.0.1",
"macOS": "14.0"
}
}
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
# Changelog

## [unreleased]

### Changed

- React Native version to `0.72.6`
- React Native peer dependency version to `0.65.0+`
- Update Bitmovin's native Android SDK version to `3.54.0`
- Android: Kotlin version to `1.8.20`

## [0.14.2] (2023-11-27)

### Added

- Player (E2E) tests for Android and iOS can now be executed via `yarn integration-test test:android` and `yarn integration-test test:ios` respectively

## [0.15.0] (2023-12-18)

### Fixed

- Android: `onEvent` callback not being called on `PlayerView`
- iOS: `onEvent` on iOS has incomplete payload information
- tvOS: Picture in Picture sample screen has unwanted padding
- iOS: hide home indicator when entering fullscreen mode in the example application
- iOS: invalid `loadingState` value in `SeekEvent`, `SourceLoadEvent`, `SourceLoadedEvent` and in `SourceUnloadedEvent`

## [0.14.1] (2023-11-16)

Expand Down
67 changes: 61 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ To build and run the example app on iOS:
yarn example ios
```

To edit the Swift/Objective-C files, open `example/ios/BitmovinPlayerReactNativeExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > RNBitmovinPlayer`.
To edit the Swift/Objective-C files, open `example/ios/BitmovinPlayerReactNativeExample.xcworkspace` in Xcode and find the source files at `Pods > Development Pods > RNBitmovinPlayer`.

To edit the Kotlin files, open `example/android` in Android Studio and find the source files at `bitmovin-player-react-native` under `Android`.

Expand Down Expand Up @@ -122,10 +122,57 @@ swiftlint lint --autocorrect

## Testing

Remember to add tests for your change if possible. Run the unit tests by:
Remember to add tests for your change if possible. Run the player tests by:

```sh
yarn test
yarn integration-test test:android
yarn integration-test test:ios
```

To set the license key to be used for the tests, you can set the key `"licenseKey"` in `integration_test/app.json`.

See available API for testing [here](/integration_test/playertesting/PlayerTesting.ts).

### Adding new tests

To add new tests:

1. create a new file in the `specs/` folder.
1. import the new file to the `specs/index.ts` file and add it to the default exported array.

A Player Test has the following structure always:

```ts
export default (spec: TestScope) => {
spec.describe('SCENARIO TO TEST', () => {
spec.it('EXPECTATION', async () => {
await startPlayerTest({}, async () => {
// TEST CODE
});
});
});
};
```

For example:

```ts
export default (spec: TestScope) => {
spec.describe('playing a source', () => {
spec.it('emits TimeChanged events', async () => {
await startPlayerTest({}, async () => {
await loadSourceConfig({
url: 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8',
type: SourceType.HLS,
});
await callPlayerAndExpectEvents((player) => {
player.play();
}, EventSequence(EventType.Play, EventType.Playing));
await expectEvents(RepeatedEvent(EventType.TimeChanged, 5));
});
});
});
};
```

## Commit message convention
Expand All @@ -145,12 +192,20 @@ Our pre-commit hooks verify that your commit message matches this format when co

The `package.json` file contains various scripts for common tasks:

- `yarn bootstrap`: setup project by installing all dependencies and pods.
- `yarn pods`: install pods only.
- `yarn bootstrap`: setup the whole project by installing all dependencies and pods.
- `yarn bootstrap:example`: setup example project by installing all dependencies and pods.
- `yarn bootstrap:integration-test`: setup integration tests project by installing all dependencies and pods.
- `yarn build`: compile TypeScript files into `lib/` with ESBuild.
- `yarn typescript`: type-check files with TypeScript.
- `yarn lint`: lint files with ESLint.
- `yarn test`: run unit tests with Jest.
- `yarn format`: format files with Prettier.
- `yarn docs`: generate documentation with TypeDoc.
- `yarn brew`: install all dependencies for iOS development with Homebrew.
- `yarn example start`: start the Metro server for the example app.
- `yarn example android`: run the example app on Android.
- `yarn example pods`: install pods only.
- `yarn integration-test start`: start the Metro server for the integration tests.
- `yarn integration-test test:android`: run the player tests on Android emulator.
- `yarn integration-test test:ios`: run the player tests on iOS simulator.
- `yarn integration-test pods`: install pods only.
- `yarn example ios`: run the example app on iOS.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This is an open-source project created to enable customers to integrate the Bitm

## Platform Support

This library requires at least React Native 0.64+ and React 17+ to work properly. The **officially supported** platforms are:
This library requires at least React Native 0.65+ and React 17+ to work properly. The **officially supported** platforms are:

- **iOS/iPadOS/tvOS:** 14.0+
- **Android:** 5.0+
Expand Down
2 changes: 1 addition & 1 deletion RNBitmovinPlayer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Pod::Spec.new do |s|
s.source_files = "ios/**/*.{h,m,mm,swift}"

s.dependency "React-Core"
s.dependency "BitmovinPlayer", "3.49.0"
s.dependency "BitmovinPlayer", "3.51.0"
s.ios.dependency "GoogleAds-IMA-iOS-SDK", "3.18.4"
s.tvos.dependency "GoogleAds-IMA-tvOS-SDK", "4.8.2"
end
96 changes: 69 additions & 27 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
buildscript {
ext {
kotlinVersion = '1.7.21'
androidToolsVersion = '7.4.2'
ktlintVersion = '11.6.0'
}
// Buildscript is evaluated before everything else so we can't use getExtOrDefault
def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["BitmovinPlayerReactNative_kotlinVersion"]
def ktlint_version = rootProject.ext.has("ktlintVersion") ? rootProject.ext.get("ktlintVersion") : project.properties["BitmovinPlayerReactNative_ktlintVersion"]
def android_tools_version = rootProject.ext.has("androidToolsVersion") ? rootProject.ext.get("androidToolsVersion") : project.properties["BitmovinPlayerReactNative_androidToolsVersion"]

repositories {
google()
mavenCentral()
Expand All @@ -12,54 +12,96 @@ buildscript {
}
}
dependencies {
classpath "com.android.tools.build:gradle:$androidToolsVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jlleitschuh.gradle:ktlint-gradle:$ktlintVersion"
classpath "com.android.tools.build:gradle:$android_tools_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jlleitschuh.gradle:ktlint-gradle:$ktlint_version"
}
}

def isNewArchitectureEnabled() {
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'org.jlleitschuh.gradle.ktlint'

repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
google()
mavenCentral()
maven { url 'https://artifacts.bitmovin.com/artifactory/public-releases' }
if (isNewArchitectureEnabled()) {
apply plugin: "com.facebook.react"
}

def getExtOrDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["BitmovinPlayerReactNative_" + name]
}

def getExtOrIntegerDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["BitmovinPlayerReactNative_" + name]).toInteger()
}

def supportsNamespace() {
def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
def major = parsed[0].toInteger()
def minor = parsed[1].toInteger()

// Namespace support was added in 7.3.0
return (major == 7 && minor >= 3) || major >= 8
}

android {
compileSdk 33
if (supportsNamespace()) {
namespace "com.bitmovin.player.reactnative"

sourceSets {
main {
manifest.srcFile "src/main/AndroidManifestNew.xml"
}
}
}

compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")

defaultConfig {
minSdkVersion 21
targetSdkVersion 33
versionCode 1
versionName '1.0'
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")

}

buildTypes {
release {
minifyEnabled false
}
}

lintOptions {
disable 'GradleCompatible'
disable "GradleCompatible"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

buildFeatures {
buildConfig true
}
}

repositories {
google()
mavenCentral()
}

def kotlin_version = getExtOrDefault("kotlinVersion")

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.31.0'
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
implementation 'com.bitmovin.player:player:3.51.0+jason'
// For < 0.71, this will be from the local maven repo
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+' // From node_modules
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

// Bitmovin
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.31.0'
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
implementation 'com.bitmovin.player:player:3.54.0+jason'
}
7 changes: 7 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
android.useAndroidX=true
BitmovinPlayerReactNative_kotlinVersion=1.8.20
BitmovinPlayerReactNative_minSdkVersion=21
BitmovinPlayerReactNative_targetSdkVersion=33
BitmovinPlayerReactNative_compileSdkVersion=33
BitmovinPlayerReactNative_ndkversion=21.4.7075529
BitmovinPlayerReactNative_androidToolsVersion=7.4.2
BitmovinPlayerReactNative_ktlintVersion=11.6.0
Loading
Loading