diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..22714f10 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: TheWidlarzGroup diff --git a/.github/actions/setup-bun/action.yml b/.github/actions/setup-bun/action.yml index 0aee178c..8661cd1c 100644 --- a/.github/actions/setup-bun/action.yml +++ b/.github/actions/setup-bun/action.yml @@ -17,7 +17,7 @@ runs: - name: Cache dependencies id: bun-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | **/node_modules diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index 185ddc27..ec4ef52a 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -17,7 +17,7 @@ runs: - name: Cache dependencies id: yarn-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ${{ inputs.working-directory }}/node_modules diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index d33db3b3..26d5ba7d 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -7,16 +7,16 @@ on: paths: - '.github/workflows/build-android.yml' - 'android/**' - - 'examples/basic/android/**' + - 'examples/bare/android/**' - 'yarn.lock' - - 'examples/basic/yarn.lock' + - 'examples/bare/yarn.lock' pull_request: paths: - '.github/workflows/build-android.yml' - 'android/**' - - 'examples/basic/android/**' + - 'examples/bare/android/**' - 'yarn.lock' - - 'examples/basic/yarn.lock' + - 'examples/bare/yarn.lock' jobs: build: @@ -32,13 +32,21 @@ jobs: java-version: 17 java-package: jdk - - name: Install node_modules + - name: Install node_modules at Root uses: ./.github/actions/setup-node with: - working-directory: examples/basic + working-directory: ./ + + - name: Build Library + run: yarn build + + - name: Install node_modules at Example + uses: ./.github/actions/setup-node + with: + working-directory: examples/bare - name: Restore Gradle cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -46,11 +54,11 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-gradle- - - name: Run Gradle Build for basic example - run: cd examples/basic/android && ./gradlew assembleDebug --build-cache && cd ../../.. + - name: Run Gradle Build for bare example + run: cd examples/bare/android && ./gradlew assembleDebug --build-cache && cd ../../.. - build-without-ads: - name: Build Android Example App Without Ads + build-with-ads: + name: Build Android Example App With Ads runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -62,13 +70,21 @@ jobs: java-version: 17 java-package: jdk - - name: Install node_modules + - name: Install node_modules at Root uses: ./.github/actions/setup-node with: - working-directory: examples/basic + working-directory: ./ + + - name: Build Library + run: yarn build + + - name: Install node_modules at Example + uses: ./.github/actions/setup-node + with: + working-directory: examples/bare - name: Restore Gradle cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -76,5 +92,5 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-gradle- - - name: Run Gradle Build for basic example - run: cd examples/basic/android && export RNV_SAMPLE_ENABLE_ADS=false && ./gradlew assembleDebug --build-cache && cd ../../.. \ No newline at end of file + - name: Run Gradle Build for bare example + run: cd examples/bare/android && export RNV_SAMPLE_ENABLE_ADS=true && ./gradlew assembleDebug --build-cache && cd ../../.. diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index 9e9d4854..5e0759aa 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -9,28 +9,37 @@ on: - '.github/workflows/build-ios.yml' - 'ios/**' - '*.podspec' - - 'examples/basic/ios/**' + - 'examples/bare/ios/**' pull_request: paths: - '.github/workflows/build-ios.yml' - 'ios/**' - '*.podspec' - - 'examples/basic/ios/**' + - 'examples/bare/ios/**' jobs: build: name: Build iOS Example App - runs-on: macos-14 # This allow us to use Xcode 15.0.1 which is a lot faster - TODO change to "macos-latest" once it's out of beta + runs-on: macos-latest defaults: run: - working-directory: examples/basic/ios + working-directory: examples/bare/ios steps: - uses: actions/checkout@v4 - - name: Install node_modules + - name: Install node_modules at Root uses: ./.github/actions/setup-node with: - working-directory: examples/basic + working-directory: ./ + + - name: Build Library + working-directory: ./ + run: yarn build + + - name: Install node_modules at Example + uses: ./.github/actions/setup-node + with: + working-directory: examples/bare - name: Restore buildcache uses: mikehardy/buildcache-action@v2 @@ -43,24 +52,30 @@ jobs: bundler-cache: true - name: Restore Pods cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | - examples/basic/ios/Pods + examples/bare/ios/Pods ~/Library/Caches/CocoaPods ~/.cocoapods key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} restore-keys: | ${{ runner.os }}-pods- + + - name: Generate Native Project + run: pod install + - name: Install Pods run: pod install + - name: Install xcpretty run: gem install xcpretty + - name: Build App run: "set -o pipefail && xcodebuild \ -derivedDataPath build -UseModernBuildSystem=YES \ - -workspace videoplayer.xcworkspace \ - -scheme videoplayer \ + -workspace BareExample.xcworkspace \ + -scheme BareExample \ -sdk iphonesimulator \ -configuration Debug \ -destination 'platform=iOS Simulator,name=iPhone 14' \ @@ -69,17 +84,26 @@ jobs: build-with-ads: name: Build iOS Example App With Ads - runs-on: macos-14 # This allow us to use Xcode 15.0.1 which is a lot faster - TODO change to "macos-latest" once it's out of beta + runs-on: macos-latest defaults: run: - working-directory: examples/basic/ios + working-directory: examples/bare/ios steps: - uses: actions/checkout@v4 - - name: Install node_modules + - name: Install node_modules at Root uses: ./.github/actions/setup-node with: - working-directory: examples/basic + working-directory: ./ + + - name: Build Library + working-directory: ./ + run: yarn build + + - name: Install node_modules at Example + uses: ./.github/actions/setup-node + with: + working-directory: examples/bare - name: Restore buildcache uses: mikehardy/buildcache-action@v2 @@ -92,24 +116,30 @@ jobs: bundler-cache: true - name: Restore Pods cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | - examples/basic/ios/Pods + examples/bare/ios/Pods ~/Library/Caches/CocoaPods ~/.cocoapods key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} restore-keys: | ${{ runner.os }}-pods- + + - name: Generate Native Project + run: export RNV_SAMPLE_ENABLE_ADS=true && pod install + - name: Install Pods run: export RNV_SAMPLE_ENABLE_ADS=true && pod install + - name: Install xcpretty run: gem install xcpretty + - name: Build App run: "set -o pipefail && export RNV_SAMPLE_ENABLE_ADS=true && xcodebuild \ -derivedDataPath build -UseModernBuildSystem=YES \ - -workspace videoplayer.xcworkspace \ - -scheme videoplayer \ + -workspace BareExample.xcworkspace \ + -scheme BareExample \ -sdk iphonesimulator \ -configuration Debug \ -destination 'platform=iOS Simulator,name=iPhone 14' \ @@ -118,17 +148,26 @@ jobs: build-with-caching: name: Build iOS Example App With Caching - runs-on: macos-14 # This allow us to use Xcode 15.0.1 which is a lot faster - TODO change to "macos-latest" once it's out of beta + runs-on: macos-latest defaults: run: - working-directory: examples/basic/ios + working-directory: examples/bare/ios steps: - uses: actions/checkout@v4 - - name: Install node_modules + - name: Install node_modules at Root uses: ./.github/actions/setup-node with: - working-directory: examples/basic + working-directory: ./ + + - name: Build Library + working-directory: ./ + run: yarn build + + - name: Install node_modules at Example + uses: ./.github/actions/setup-node + with: + working-directory: examples/bare - name: Restore buildcache uses: mikehardy/buildcache-action@v2 @@ -141,24 +180,30 @@ jobs: bundler-cache: true - name: Restore Pods cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | - examples/basic/ios/Pods + examples/bare/ios/Pods ~/Library/Caches/CocoaPods ~/.cocoapods key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} restore-keys: | ${{ runner.os }}-pods- + + - name: Generate Native Project + run: export RNV_SAMPLE_VIDEO_CACHING=true && pod install + - name: Install Pods run: export RNV_SAMPLE_VIDEO_CACHING=true && pod install + - name: Install xcpretty run: gem install xcpretty + - name: Build App run: "set -o pipefail && export RNV_SAMPLE_VIDEO_CACHING=true && xcodebuild \ -derivedDataPath build -UseModernBuildSystem=YES \ - -workspace videoplayer.xcworkspace \ - -scheme videoplayer \ + -workspace BareExample.xcworkspace \ + -scheme BareExample \ -sdk iphonesimulator \ -configuration Debug \ -destination 'platform=iOS Simulator,name=iPhone 14' \ diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 76f55f9e..2c9c3ac7 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup-bun @@ -22,7 +22,7 @@ jobs: working-directory: ./docs - name: Cache build - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | docs/.next/cache diff --git a/.github/workflows/test-build-docs.yml b/.github/workflows/test-build-docs.yml index 825df994..052814c8 100644 --- a/.github/workflows/test-build-docs.yml +++ b/.github/workflows/test-build-docs.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup-bun @@ -20,7 +20,7 @@ jobs: working-directory: ./docs - name: Cache build - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | docs/.next/cache diff --git a/.github/workflows/validate-issue.yml b/.github/workflows/validate-issue.yml index 8e6c12ab..eb773925 100644 --- a/.github/workflows/validate-issue.yml +++ b/.github/workflows/validate-issue.yml @@ -8,7 +8,7 @@ jobs: validate-and-label: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Validate Issue Template and Add Labels uses: actions/github-script@v7 diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e2180b5..c6b92dd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,43 @@ +## [6.8.2](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.8.1...v6.8.2) (2024-11-25) + + +### Bug Fixes + +* playback restart without bufferingConfig ([#4305](https://github.com/TheWidlarzGroup/react-native-video/issues/4305)) ([f37dc9e](https://github.com/TheWidlarzGroup/react-native-video/commit/f37dc9e33ebefd922605c5ae91360379fe91bed6)) + +## [6.8.1](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.8.0...v6.8.1) (2024-11-24) + + +### Bug Fixes + +* **ios:** handle async player access in text track selection ([#4293](https://github.com/TheWidlarzGroup/react-native-video/issues/4293)) ([daaac97](https://github.com/TheWidlarzGroup/react-native-video/commit/daaac9740aed1858b7ababae0ec8b08274130a27)) + +# [6.8.0](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.7.0...v6.8.0) (2024-11-17) + + +### Bug Fixes + +* **android:** add helper to avoid type error ([#4257](https://github.com/TheWidlarzGroup/react-native-video/issues/4257)) ([3b4bfd3](https://github.com/TheWidlarzGroup/react-native-video/commit/3b4bfd3936a8cb846c0e61ffd396940987a7ba43)) + +# [6.7.0](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.6.4...v6.7.0) (2024-10-17) + + +### Bug Fixes + +* **android:** sideloaded subtitles ([#4232](https://github.com/TheWidlarzGroup/react-native-video/issues/4232)) ([352dfbb](https://github.com/TheWidlarzGroup/react-native-video/commit/352dfbbc9bef158400c59516a50d889d25757c0d)) +* ensure aspect ratio from video is handled in a coherent way ([#4219](https://github.com/TheWidlarzGroup/react-native-video/issues/4219)) ([a8d5841](https://github.com/TheWidlarzGroup/react-native-video/commit/a8d5841c7c0f9767ec095ffd8401b1579f32623f)) +* **iOS:** pause video on end reached & don't remove listeners ([#4218](https://github.com/TheWidlarzGroup/react-native-video/issues/4218)) ([2c19a47](https://github.com/TheWidlarzGroup/react-native-video/commit/2c19a4770df73179436a9e23a5e55ad0699fcfcc)) +* remove warning and refactor & fix ad workflow ([#4235](https://github.com/TheWidlarzGroup/react-native-video/issues/4235)) ([7501880](https://github.com/TheWidlarzGroup/react-native-video/commit/7501880062a4c381838949084f0017a2aecc58d7)) + + +### Features + +* add setSource API function fix ads playback ([#4185](https://github.com/TheWidlarzGroup/react-native-video/issues/4185)) ([9a3fcda](https://github.com/TheWidlarzGroup/react-native-video/commit/9a3fcda3b8ca4689c9131a12a8375fc43d442f80)) +* **android:** add settings button to control video playback speed ([#4211](https://github.com/TheWidlarzGroup/react-native-video/issues/4211)) ([d1883a7](https://github.com/TheWidlarzGroup/react-native-video/commit/d1883a7e008706cac2a2beac934194539c9b5b77)) +* **exoplayerview:** Migrate ExoPlayerView to kotlin ([#4038](https://github.com/TheWidlarzGroup/react-native-video/issues/4038)) ([78f4f04](https://github.com/TheWidlarzGroup/react-native-video/commit/78f4f0480d70d209fea9e0579963e347c965fd6e)) + ## [6.6.4](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.6.3...v6.6.4) (2024-10-03) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5698524e..a21cb2f9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,8 +24,30 @@ For example, a single file JS code change requires 1 review while a 3 files iOS * If you have time to help out, look for the [`review requested`](https://github.com/TheWidlarzGroup/react-native-video/labels/review%20requested) label. It will have another numeric label with it (`1`, `2`, or `3` indicating how many more reviews are needed to merge). -## Releases - -* Aim for a bi-weekly (every other week) release to flush out whatever was approved and merge. Most people use this with a lock file (and if you don't you are doing it wrong) and should not have any issues with new bugs showing up. This is already a high risk dependency which must be tested well before going into production. Let's take advantage of that and move faster. - Please do not harass people to review your pull request! You can tag those you feel have relevant experience but please don't abuse this as people will unfollow or mute the project if they are called too many times! + +### Running the example + +To see how to run examples locally, please refer to the [examples guide](https://github.com/TheWidlarzGroup/react-native-video/tree/master/examples) + +### Working on documentation + +The documentation is located in the `docs` folder. To work on the documentation, you can run the following command to start a local server: + +```sh +cd docs +bun install +bun dev +``` + +### Publishing a release + +We use [release-it](https://github.com/webpro/release-it) to automate our release. + +## Reporting issues + +You can report issues on our [bug tracker](https://github.com/TheWidlarzGroup/react-native-video/issues). Please follow the issue template when opening an issue. + +## License + +By contributing to React Native Video, you agree that your contributions will be licensed under its **MIT** license. diff --git a/README.md b/README.md index bd216d42..720d8cdc 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,11 @@ 🎬 `