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.11.0 #231

Merged
merged 40 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c0996c3
chore(android): update android player version to 3.43.0
Sep 4, 2023
2f816e5
Merge pull request #216 from bitmovin/update_android_player_to_3.43.0
matamegger Sep 4, 2023
7edf764
Merge pull request #218 from bitmovin/main
rolandkakonyi Sep 4, 2023
ace8103
chore: upgrade GitHub Actions checkout step to v4
rolandkakonyi Sep 4, 2023
5a22fb5
Merge pull request #219 from bitmovin/upgrade-github-actions-checkout…
rolandkakonyi Sep 4, 2023
6365efb
chore: add placeholder start release train job to allow manual trigger
rolandkakonyi Sep 5, 2023
970c4ad
chore: add inputs for start-release-train workflow to enable testing
rolandkakonyi Sep 5, 2023
786f7f1
chore: add start release train GitHub Actions workflow
rolandkakonyi Sep 5, 2023
ba26c63
chore: add unreleased section to changelog
rolandkakonyi Sep 5, 2023
ef2fab6
chore: improve the CI workflow code style
rolandkakonyi Sep 5, 2023
4593a6a
chore: fix sed for changelog update
rolandkakonyi Sep 5, 2023
d15dddc
chore: add missing token
rolandkakonyi Sep 5, 2023
1f26889
chore: set git user to [email protected]
rolandkakonyi Sep 5, 2023
30e2b6f
chore: add concurrency to start release train workflow
rolandkakonyi Sep 5, 2023
a452a45
chore: add placeholder job for finish release train workflow
rolandkakonyi Sep 5, 2023
549144a
Merge branch 'development' into automate-release-process
rolandkakonyi Sep 5, 2023
90385f6
chore: implement finish release workflow and replace publish workflow
rolandkakonyi Sep 5, 2023
ce2a9b1
chore: fix filters for finish release workflow
rolandkakonyi Sep 5, 2023
8b97168
Update reference to custom playback in README.md
rolandkakonyi Sep 6, 2023
7d7590a
feat(audio): add getAudioTrack API
rolandkakonyi Sep 6, 2023
04d6040
feat(subtitle): add getSubtitleTrack API
rolandkakonyi Sep 6, 2023
0ae6343
feat: add changelog entry
rolandkakonyi Sep 6, 2023
fad703f
chore: Fix setMaxSelectableBitrate API docs
rolandkakonyi Sep 6, 2023
25bfdc4
feat(thumbnail): add getThumbnail APIs
rolandkakonyi Sep 6, 2023
cf260ac
feat(sourcedescription): add SourceConfig.description property
rolandkakonyi Sep 6, 2023
c5a1def
chore: add missing empty line
rolandkakonyi Sep 7, 2023
6ca3b8d
chore: add comment for deleting existing release branch
rolandkakonyi Sep 7, 2023
0d65650
Merge pull request #223 from bitmovin/automate-release-process
rolandkakonyi Sep 7, 2023
2f8b3a1
Merge branch 'development' into add-missing-subtitle-and-audio-APIs
rolandkakonyi Sep 7, 2023
629ac1f
feat(thumbnail): improve changelog entry
rolandkakonyi Sep 7, 2023
2b1f11b
Merge pull request #224 from bitmovin/add-missing-subtitle-and-audio-…
rolandkakonyi Sep 7, 2023
dd067e4
Merge branch 'development' into add-thumbnail-API
rolandkakonyi Sep 7, 2023
9a9ea73
feat(sourcedescription): improve changelog
rolandkakonyi Sep 7, 2023
269aec9
Merge branch 'development' into add-sourceconfig-description-property
rolandkakonyi Sep 7, 2023
a5d2cee
Merge pull request #226 from bitmovin/add-sourceconfig-description-pr…
rolandkakonyi Sep 7, 2023
98401ce
Merge branch 'development' into add-thumbnail-API
rolandkakonyi Sep 7, 2023
28f0d75
Merge pull request #225 from bitmovin/add-thumbnail-API
rolandkakonyi Sep 7, 2023
346799e
chore: mention SystemUI example screen in Readme
rolandkakonyi Sep 7, 2023
5414b5c
chore: prepare release 0.11.0
Sep 11, 2023
3f44924
chore: add changelog entry for Android Player SDK update
rolandkakonyi Sep 11, 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
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup node and npm registry
uses: actions/setup-node@v3
Expand All @@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup node and npm registry
uses: actions/setup-node@v3
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
runs-on: macOS-12
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup node and npm registry
uses: actions/setup-node@v3
Expand Down Expand Up @@ -116,10 +116,11 @@ jobs:
run: |
bundle exec pod repo remove trunk
bundle exec pod repo add bitmovin https://github.com/bitmovin/cocoapod-specs.git || bundle exec pod repo update bitmovin
NO_FLIPPER=1 bundle exec pod install --repo-update
bundle exec pod install --repo-update
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 All @@ -141,7 +142,7 @@ jobs:
runs-on: macOS-12
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup node and npm registry
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-sdk-update-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup git user
run: |
Expand Down
89 changes: 89 additions & 0 deletions .github/workflows/finish-release-train.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Finish Release Train
on:
pull_request:
types:
- closed
branches:
- main
env:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
concurrency:
group: finish-release-train-${{ github.ref_name }}
cancel-in-progress: true
jobs:
create_pr:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/v')
runs-on: ubuntu-latest
outputs:
version_number: ${{ steps.version_number.outputs.version_number }}
steps:
- uses: actions/checkout@v4

- name: Detect version number
id: version_number
run: |
version_number="$(npm view bitmovin-player-react-native version)"
echo "Detected version number: $version_number"
echo "version_number=$version_number" >> $GITHUB_OUTPUT

- name: Create PR
run: |
gh pr create \
--base "development" \
--head "main" \
--title "Finish release ${{ steps.version_number.outputs.version_number }}" \
--body "Finish release ${{ steps.version_number.outputs.version_number }}"
env:
GH_TOKEN: ${{ github.token }}

publish_release:
needs: [create_pr]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Git User
run: |
# setup git
git config --global user.name "Bitmovin Release Automation"
git config --global user.email "[email protected]"

- name: Add tag
run: |
git tag v${{ needs.create_pr.outputs.version_number }}

- name: Git push
run: |
git push origin v${{ needs.create_pr.outputs.version_number }}

- name: Setup node and npm registry
uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build TypeScript files
run: yarn build

- name: Publish npm package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Extract changelog
id: changelog
uses: ffurrer2/extract-release-notes@v1

- name: Create GitHub release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: ${{ steps.changelog.outputs.release_notes }}
41 changes: 0 additions & 41 deletions .github/workflows/publish.yml

This file was deleted.

78 changes: 78 additions & 0 deletions .github/workflows/start-release-train.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Start Release Train
on:
workflow_dispatch:
inputs:
version_number:
description: 'Next version number of the release'
type: string
required: true
release_date:
description: 'Date of the final release. Will be used for CHANGELOG.md (format YYYY-MM-DD, e.g. 2023-02-27)'
type: string
required: true
env:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
concurrency:
group: start-release-train-${{ inputs.version_number }}
cancel-in-progress: true
jobs:
create_release_pr:
name: Create release branch and bump version
runs-on: macos-latest
outputs:
branch_name: ${{ steps.branching.outputs.branch_name }}
steps:
- uses: actions/checkout@v4

- name: Setup Git User
run: |
# setup git
git config --global user.name "Bitmovin Release Automation"
git config --global user.email "[email protected]"

- name: Setup node and npm registry
uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'

- name: Set Release Branch name
id: branching
run: |
branch_name="release/v${{ inputs.version_number }}"
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT

- name: Create Release Branch
run: |
# Delete the release branch if already exists, useful in case we need to re-run this workflow
git push origin --delete ${{ steps.branching.outputs.branch_name }} || true
git checkout -b ${{ steps.branching.outputs.branch_name }}

- name: Bump changelog version
run: |
sed -i'.bak' "s/\[Unreleased\]/\[${{ inputs.version_number }}\] \(${{ inputs.release_date }}\)/g" CHANGELOG.md

- name: Bump package.json version
run: |
npm version ${{ inputs.version_number }} --no-git-tag-version

- name: Update Podfile.lock
run: |
yarn bootstrap

- name: Commit changelog version bump
run: |
git add CHANGELOG.md package.json example/ios/Podfile.lock
git commit -m "chore: prepare release ${{ inputs.version_number }}"
git push origin ${{ steps.branching.outputs.branch_name }}

- name: Create PR
run: |
gh pr create \
--base "main" \
--title "Release ${{ inputs.version_number }}" \
--body "Release ${{ inputs.version_number }}"
env:
GH_TOKEN: ${{ github.token }}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [0.11.0] (2023-09-11)

### Added

- `Player.getAudioTrack` and `Player.getSubtitleTrack` APIs to get currently selected audio and subtitle tracks
- `SourceConfig.description` property to allow setting a description for the source
- `Player.getThumbnail` and `Source.getThumbnail` APIs to get thumbnail images

### Changed

- Update Bitmovin's native Android SDK version to `3.43.0`

## [0.10.0] (2023-09-04)

### Added
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.29.0'
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
implementation 'com.bitmovin.player:player:3.42.0'
implementation 'com.bitmovin.player:player:3.43.0'
//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+' // From node_modules
}
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,18 @@ class PlayerModule(private val context: ReactApplicationContext) : ReactContextB
}
}

/**
* Resolve `nativeId`'s currently selected audio track.
* @param nativeId Target player Id.
* @param promise JS promise object.
*/
@ReactMethod
fun getAudioTrack(nativeId: NativeId, promise: Promise) {
uiManager()?.addUIBlock {
promise.resolve(JsonConverter.fromAudioTrack(players[nativeId]?.source?.selectedAudioTrack))
}
}

/**
* Resolve `nativeId`'s player available audio tracks.
* @param nativeId Target player Id.
Expand Down Expand Up @@ -323,6 +335,18 @@ class PlayerModule(private val context: ReactApplicationContext) : ReactContextB
}
}

/**
* Resolve `nativeId`'s currently selected subtitle track.
* @param nativeId Target player Id.
* @param promise JS promise object.
*/
@ReactMethod
fun getSubtitleTrack(nativeId: NativeId, promise: Promise) {
uiManager()?.addUIBlock {
promise.resolve(JsonConverter.fromSubtitleTrack(players[nativeId]?.source?.selectedSubtitleTrack))
}
}

/**
* Resolve `nativeId`'s player available subtitle tracks.
* @param nativeId Target player Id.
Expand Down Expand Up @@ -428,6 +452,18 @@ class PlayerModule(private val context: ReactApplicationContext) : ReactContextB
}
}

/**
* Returns the thumbnail image for the active `Source` at a certain time.
* @param nativeId Target player id.
* @param time Playback time for the thumbnail.
*/
@ReactMethod
fun getThumbnail(nativeId: NativeId, time: Double, promise: Promise) {
uiManager()?.addUIBlock {
promise.resolve(JsonConverter.fromThumbnail(players[nativeId]?.source?.getThumbnail(time)))
}
}

/**
* Helper function that returns the initialized `UIManager` instance.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ class SourceModule(private val context: ReactApplicationContext) : ReactContextB
/**
* Set the metadata for a loaded `nativeId` source.
* @param nativeId Source `nativeId`.
* @param promise: JS promise object.
*/
@ReactMethod
fun setMetadata(nativeId: NativeId, metadata: ReadableMap?) {
Expand All @@ -149,6 +148,18 @@ class SourceModule(private val context: ReactApplicationContext) : ReactContextB
}
}

/**
* Returns the thumbnail image for the `Source` at a certain time.
* @param nativeId Target player id.
* @param time Playback time for the thumbnail.
*/
@ReactMethod
fun getThumbnail(nativeId: NativeId, time: Double, promise: Promise) {
uiManager()?.addUIBlock {
promise.resolve(JsonConverter.fromThumbnail(sources[nativeId]?.getThumbnail(time)))
}
}

/**
* Helper method that converts a React `ReadableMap` into a kotlin String -> String map.
*/
Expand Down
Loading