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/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index 7d5cbb8e..e0c0be64 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -54,6 +54,6 @@ body: value: | ## Support - If this functionality is important to you and you need it, contact [TheWidlarzGroup](https://www.thewidlarzgroup.com/?utm_source=rnv&utm_medium=feature-request#Contact) - [`hi@thewidlarzgroup.com`](mailto:hi@thewidlarzgroup.com) + If this functionality is important to you and you need it, contact [TheWidlarzGroup](https://www.thewidlarzgroup.com/?utm_source=rnv&utm_medium=feature-request&utm_campaign=issue-template&utm_id=sponsorship#Contact) - [`hi@thewidlarzgroup.com`](mailto:hi@thewidlarzgroup.com) 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..03010edc 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -13,11 +13,11 @@ runs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 20.x - 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/scripts/validate.js b/.github/scripts/validate.js index 36de83d7..59a8776a 100644 --- a/.github/scripts/validate.js +++ b/.github/scripts/validate.js @@ -25,28 +25,40 @@ const BOT_LABELS = [ 'Missing Repro', 'Waiting for Review', 'Newer Version Available', + '6.x.x', + '7.0', ...Object.values(PLATFORM_LABELS), ]; const SKIP_LABEL = 'No Validation'; +const ISSUE_BOOST_INFO = (issueNumber) => ` +Need faster resolution? Consider [Issue Boost](https://www.thewidlarzgroup.com/issue-boost/?utm_source=rnv&utm_medium=bug-report&utm_campaign=bot-message&utm_id=${issueNumber}) – it allows us to dedicate time specifically to your issue and fix it faster πŸš€`; + const MESSAGE = { - FEATURE_REQUEST: `Thank you for your feature request. We will review it and get back to you if we need more information.`, - BUG_REPORT: `Thank you for your bug report. We will review it and get back to you if we need more information.`, + FEATURE_REQUEST: (issueNumber) => `Thanks for the feature request! πŸš€ + \nYou can check out our [public roadmap](https://github.com/orgs/TheWidlarzGroup/projects/6) to see what we're currently working on. All requests are automatically added there, so you can track progress anytime. + \nWe review and implement new features when time allows, but this can take a while. If you'd like to speed things up and make this a priority, consider [Issue Boost](https://www.thewidlarzgroup.com/issue-boost/?utm_source=rnv&utm_medium=feature-request&utm_campaign=bot-message&utm_id=${issueNumber}), our commercial option that lets us dedicate time specifically to your request. + \nThanks for your input and patience! πŸ™Œ`, + BUG_REPORT: (issueNumber) => `Hey! πŸ‘‹ + Thanks for reporting this issue. We try to fix bugs as quickly as possible, but since our time is limited, we prioritize sponsored issues first, then focus on critical problems affecting many users, and finally, we handle other reports when we can. Some issues might take a while to be resolved. + \nIf you want to speed up this process, check out [Issue Boost](https://www.thewidlarzgroup.com/issue-boost/?utm_source=rnv&utm_medium=bug-report&utm_campaign=bot-message-valid&utm_id=${issueNumber}) – it allows us to dedicate time specifically to your issue and fix it faster. + \nThanks for your patience and support! πŸš€`, MISSING_INFO: (missingFields) => { - return `Thank you for your issue report. Please note that the following information is missing or incomplete:\n\n${missingFields + return `Hey! πŸ‘‹ + Thanks for the bug report. To help us resolve your issue effectively, we still need some key information:\n\n${missingFields .map((field) => `- ${field.replace('missing-', '')}`) - .join( - '\n', - )}\n\nPlease update your issue with this information to help us address it more effectively. - \n > Note: issues without complete information have a lower priority`; + .join('\n')} + + Please edit your issue and fill in the missing details. + > Issues with incomplete info are treated with lower priority, so this helps speed things up.`; }, OUTDATED_VERSION: (issueVersion, latestVersion) => { return ( - `There is a newer version of the library available. ` + - `You are using version ${issueVersion}, while the latest stable version is ${latestVersion}. ` + - `Please update to the latest version and check if the issue still exists.` + - `\n > Note: If the issue still exists, please update the issue report with the latest information.` + `Heads up! ⚠️ You're using version **${issueVersion}**, but the latest stable version is **${latestVersion}**. ` + + `Please update to the newest version and check if the issue still occurs.\n\n` + + `> Keeping your dependencies up-to-date often resolves many common problems.` + + `\n\nStill having the issue after upgrading? Update the report with the new version details so we can investigate.` ); }, }; @@ -114,6 +126,17 @@ const validateBugReport = async (body, labels) => { if (!isVersionValid) { labels.add('missing-version'); + } else { + // Add version-specific labels + const versionMatch = words.find((word) => versionPattern.test(word)); + if (versionMatch) { + const majorVersion = versionMatch.split('.')[0]; + if (majorVersion === '6') { + labels.add('6.x.x'); + } else if (majorVersion === '7') { + labels.add('7.0'); + } + } } const latestVersion = await checkLatestVersion(); @@ -178,7 +201,8 @@ const handleIssue = async ({github, context}) => { const handleFeatureRequest = async ({github, context, body, labels}) => { validateFeatureRequest(body, labels); - const comment = MESSAGE.FEATURE_REQUEST; + const comment = MESSAGE.FEATURE_REQUEST(context.payload.issue.number); + await hidePreviousComments({github, context}); await createComment({github, context, body: comment}); }; @@ -212,6 +236,8 @@ const handleMissingInformation = async ({github, context, labels}) => { )}`; } + comment += `\n\n${ISSUE_BOOST_INFO(context.payload.issue.number)}`; + await hidePreviousComments({github, context}); await createComment({github, context, body: comment}); } @@ -220,7 +246,7 @@ const handleMissingInformation = async ({github, context, labels}) => { }; const handleValidReport = async ({github, context, labels}) => { - let comment = MESSAGE.BUG_REPORT; + let comment = MESSAGE.BUG_REPORT(context.payload.issue.number); const outdatedVersionLabel = Array.from(labels).find((label) => label.startsWith('outdated-version'), @@ -267,11 +293,15 @@ const hidePreviousComments = async ({github, context}) => { issue_number: context.payload.issue.number, }); - const botComments = comments.data.filter( - (comment) => comment.user.type === 'Bot', + // Filter for bot comments that aren't already hidden + const unhiddenBotComments = comments.data.filter( + (comment) => + comment.user.type === 'Bot' && + !comment.body.includes('
') && + !comment.body.includes('Previous bot comment'), ); - for (const comment of botComments) { + for (const comment of unhiddenBotComments) { // Don't format string - it will broke the markdown const hiddenBody = `
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..0c24bc17 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,43 +52,58 @@ 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' \ + -destination 'platform=iOS Simulator,name=iPhone 16' \ build \ CODE_SIGNING_ALLOWED=NO | xcpretty" 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,43 +116,58 @@ 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' \ + -destination 'platform=iOS Simulator,name=iPhone 16' \ build \ CODE_SIGNING_ALLOWED=NO | xcpretty" 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,26 +180,35 @@ 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: Install gem dependencies + run: bundle install + + - name: Generate Native Project + run: export RNV_SAMPLE_VIDEO_CACHING=true && bundle exec pod install + - name: Install Pods - run: export RNV_SAMPLE_VIDEO_CACHING=true && pod install + run: export RNV_SAMPLE_VIDEO_CACHING=true && bundle exec 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' \ + -destination 'platform=iOS Simulator,name=iPhone 16' \ build \ CODE_SIGNING_ALLOWED=NO | xcpretty" \ No newline at end of file diff --git a/.github/workflows/check-android.yml b/.github/workflows/check-android.yml index 1c434a17..73b2fa3d 100644 --- a/.github/workflows/check-android.yml +++ b/.github/workflows/check-android.yml @@ -28,7 +28,7 @@ jobs: with: report-path: ./android/build/*.xml continue-on-error: false - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ktlint-report path: ./android/build/*.xml diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml deleted file mode 100644 index 76f55f9e..00000000 --- a/.github/workflows/deploy-docs.yml +++ /dev/null @@ -1,46 +0,0 @@ - -name: deploy docs -on: - workflow_dispatch: - push: - branches: - - master - paths: - - '.github/workflows/deploy-docs.yml' - - 'docs/**' - -jobs: - deploy-docs: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup - uses: ./.github/actions/setup-bun - with: - working-directory: ./docs - - - name: Cache build - uses: actions/cache@v3 - with: - path: | - docs/.next/cache - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }} - ${{ runner.os }}-nextjs- - - - name: Build docs - run: | - bun --cwd docs build - touch docs/out/.nojekyll - - - name: Deploy docs to GitHub Pages - uses: JamesIves/github-pages-deploy-action@v4 - with: - branch: gh-pages - folder: docs/out - -permissions: - contents: write \ No newline at end of file diff --git a/.github/workflows/test-build-docs.yml b/.github/workflows/test-build-docs.yml deleted file mode 100644 index 825df994..00000000 --- a/.github/workflows/test-build-docs.yml +++ /dev/null @@ -1,35 +0,0 @@ - -name: Test Docs build -on: - workflow_dispatch: - pull_request: - paths: - - '.github/workflows/test-build-docs.yml' - - 'docs/**' - -jobs: - build-docs: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup - uses: ./.github/actions/setup-bun - with: - working-directory: ./docs - - - name: Cache build - uses: actions/cache@v3 - with: - path: | - docs/.next/cache - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }} - ${{ runner.os }}-nextjs- - - - name: Build docs - run: | - bun --cwd docs build - touch docs/out/.nojekyll \ No newline at end of file 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/.gitmodules b/.gitmodules new file mode 100644 index 00000000..fc493864 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "examples/react-native-offline-video-download-starter"] + path = examples/react-native-offline-video-download-starter + url = https://github.com/TheWidlarzGroup/react-native-offline-video-starter.git + branch = main diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100644 index 00000000..3b041f8c --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,2 @@ +echo "precommit" +yarn check-all diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e2180b5..c709db13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,262 @@ +# Changelog +## [6.19.2](https://github.com/moskalakamil/react-native-video/compare/v6.19.1...v6.19.2) (2026-04-28) + + +### Bug Fixes + +* replace `absoluteFillObject` with `absoluteFill` ([#4880](https://github.com/moskalakamil/react-native-video/issues/4880)) ([ae7ff4f](https://github.com/moskalakamil/react-native-video/commit/ae7ff4fa07ce9234575664a541bbd2f557ff051c)) + +## [6.19.1](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.19.0...v6.19.1) (2026-03-15) + + +### Bug Fixes + +* **ios:** IMA ad container resizing on orientation change ([#4771](https://github.com/TheWidlarzGroup/react-native-video/issues/4771)) ([fc936c4](https://github.com/TheWidlarzGroup/react-native-video/commit/fc936c49ef3c2734173442042b7d5038aeaef301)) +* RCTVideoManager crash in bridgeless mode RN0.84 ([#4855](https://github.com/TheWidlarzGroup/react-native-video/issues/4855)) ([92b0a0e](https://github.com/TheWidlarzGroup/react-native-video/commit/92b0a0e416c7f313120a811cd2dc972f87b1c82f)) + +# [6.19.0](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.18.0...v6.19.0) (2026-01-19) + + +### Bug Fixes + +* **android:** correct videoTrack type definitions to match Android implementation ([#4778](https://github.com/TheWidlarzGroup/react-native-video/issues/4778)) ([commit](https://github.com/TheWidlarzGroup/react-native-video/commit/f38717778515b06c462fe75dcd94d2cce5ba3f95)) + + +### Features + +* **BREAKING CHANGE:** add DAI support ([#4816](https://github.com/TheWidlarzGroup/react-native-video/issues/4816)) ([commit](https://github.com/TheWidlarzGroup/react-native-video/commit/88ac1ae1dcdc907415f806bd64bd3d0a92ccd7d1)) + +# [6.18.0](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.17.0...v6.18.0) (2025-11-18) + + +### Bug Fixes + +* **android:** prevent duplicate `onVideoEnd` callback on prop changes ([#4762](https://github.com/TheWidlarzGroup/react-native-video/issues/4762)) ([05cd597](https://github.com/TheWidlarzGroup/react-native-video/commit/05cd5972c21ebcacf3cd5952e92f121a84b5c9a9)) +* **ci:** update ios device for builds ([#4757](https://github.com/TheWidlarzGroup/react-native-video/issues/4757)) ([a9f7524](https://github.com/TheWidlarzGroup/react-native-video/commit/a9f752435f3d94abfdb37ef5dc9c444038e3ad6a)) +* entering PiP mode when controls are true ([#4776](https://github.com/TheWidlarzGroup/react-native-video/issues/4776)) ([ba65ab1](https://github.com/TheWidlarzGroup/react-native-video/commit/ba65ab123321713e537fc7ccb1ac3ed5676f1677)) +* **iOS:** use top-most presented view controller for fullscreen presentation on iOS ([#4753](https://github.com/TheWidlarzGroup/react-native-video/issues/4753)) ([5d75b48](https://github.com/TheWidlarzGroup/react-native-video/commit/5d75b482952a9cd3e5f59237e302137857739d4e)) +* prevent `audiovisualBackgroundPlaybackPolicy` crash ([#4763](https://github.com/TheWidlarzGroup/react-native-video/issues/4763)) ([fbb260e](https://github.com/TheWidlarzGroup/react-native-video/commit/fbb260e9164194a55d2b26404aea000e924e2f04)) + + +### Features + +* **ios:** add PublicAudioSessionManager for audio session management ([#4747](https://github.com/TheWidlarzGroup/react-native-video/issues/4747)) ([f2afd16](https://github.com/TheWidlarzGroup/react-native-video/commit/f2afd16d0bc7fc72e0b4d8400d74342244158674)) + +# [6.17.0](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.16.1...v6.17.0) (2025-10-06) + + +### Bug Fixes + +* android control option is not work when init video ([#4698](https://github.com/TheWidlarzGroup/react-native-video/issues/4698)) ([5074ca5](https://github.com/TheWidlarzGroup/react-native-video/commit/5074ca5a1b1ae687255f3509fd75cc847ace0dca)) +* **android:** catch errors from `activity.packageManager` ([5b59b06](https://github.com/TheWidlarzGroup/react-native-video/commit/5b59b06d1e19f138a98648d06a931ab4c634cb75)) +* **ios:** add audiovisualBackgroundPlaybackPolicy ([#4570](https://github.com/TheWidlarzGroup/react-native-video/issues/4570)) ([bf81038](https://github.com/TheWidlarzGroup/react-native-video/commit/bf810386b9ee1aed579b24adffb02f4acfa413db)) +* **ios:** disable audio session management when no views ([#4666](https://github.com/TheWidlarzGroup/react-native-video/issues/4666)) ([d2c92a1](https://github.com/TheWidlarzGroup/react-native-video/commit/d2c92a1f3f6579aa6607389de8e51e4b75012f3b)) +* **player:** trigger relayout after exiting pip ([#4665](https://github.com/TheWidlarzGroup/react-native-video/issues/4665)) ([4b996fc](https://github.com/TheWidlarzGroup/react-native-video/commit/4b996fc514b015dfb848dd2a0226cda4b0c527fb)) + + +### Features + +* **android:** enable flexible page sizes in native build configuration ([#4691](https://github.com/TheWidlarzGroup/react-native-video/issues/4691)) ([7d233f4](https://github.com/TheWidlarzGroup/react-native-video/commit/7d233f414f8a00734d3991f2e1d148bbadae0f0e)) +* **android:** report full native stack trace on error ([#4651](https://github.com/TheWidlarzGroup/react-native-video/issues/4651)) ([724f639](https://github.com/TheWidlarzGroup/react-native-video/commit/724f63930d2de3c81b9d9316ae70bbb9e1dcae49)) +* **examples:** add offline-video-starter as submodule ([#4644](https://github.com/TheWidlarzGroup/react-native-video/issues/4644)) ([60baecd](https://github.com/TheWidlarzGroup/react-native-video/commit/60baecdf739baa3ce9a84b3a02cd4e5b9060275f)) + +## [6.16.1](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.16.0...v6.16.1) (2025-07-08) + +# [6.16.0](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.15.0...v6.16.0) (2025-07-02) + + +### Bug Fixes + +* **android:** create custom event class for dispatcher ([#4575](https://github.com/TheWidlarzGroup/react-native-video/issues/4575)) ([94967fc](https://github.com/TheWidlarzGroup/react-native-video/commit/94967fc4a61e00c521242d29fd28bed13bbba7c4)) +* **android:** speed control is not applied ([#4572](https://github.com/TheWidlarzGroup/react-native-video/issues/4572)) ([b56b647](https://github.com/TheWidlarzGroup/react-native-video/commit/b56b647d85aa24df2ba2ad436eb5ada67735417f)) +* **ios:** allow audio mixing when none of the players are playing ([#4579](https://github.com/TheWidlarzGroup/react-native-video/issues/4579)) ([2d7e039](https://github.com/TheWidlarzGroup/react-native-video/commit/2d7e03942d5e2525e5c71dc914926ba07f67d54a)) +* **ios:** retain cycle and memory leak involving the RCTVideo instance when using Google IMA ads in react-native-video. ([#4574](https://github.com/TheWidlarzGroup/react-native-video/issues/4574)) ([b51b579](https://github.com/TheWidlarzGroup/react-native-video/commit/b51b579ff00067231fb1d0754e1a86692f44bc50)) + + +### Features + +* **android:** replace custom VideoView with media3 `PlayerView` ([#4581](https://github.com/TheWidlarzGroup/react-native-video/issues/4581)) ([978683b](https://github.com/TheWidlarzGroup/react-native-video/commit/978683b64582e6363d7b5a1817e22fec342d1c47)) + +# [6.15.0](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.14.1...v6.15.0) (2025-06-12) + + +### Bug Fixes + +* **web:** add missing component type ([9f03cc5](https://github.com/TheWidlarzGroup/react-native-video/commit/9f03cc5a0983e05515d3d194204a7c9eb71b383d)) + + +### Features + +* allow audio mixing if one of the video views require it ([#4559](https://github.com/TheWidlarzGroup/react-native-video/issues/4559)) ([3576a13](https://github.com/TheWidlarzGroup/react-native-video/commit/3576a134e678e6273d9195d7a17c9828c30426e2)) +* **ios:** forward real fullscreen events from AVPlayer instead of guessing ([#4509](https://github.com/TheWidlarzGroup/react-native-video/issues/4509)) ([88c20d1](https://github.com/TheWidlarzGroup/react-native-video/commit/88c20d1c065b2778a66ddde4a3b92bd58bec043b)) +* **plugin:** overrideMediaSourceFactory ([#4566](https://github.com/TheWidlarzGroup/react-native-video/issues/4566)) ([9cf7802](https://github.com/TheWidlarzGroup/react-native-video/commit/9cf780276af7f0a890025a13e1685e49c6589f0e)) + +## [6.14.1](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.14.0...v6.14.1) (2025-05-28) + + +### Features + +* **android:** allow plugins to override drm session manager ([#4558](https://github.com/TheWidlarzGroup/react-native-video/issues/4558)) ([9449eb3](https://github.com/TheWidlarzGroup/react-native-video/commit/9449eb34f3ebcf7ac08bde1ee55e5cc26a142217)) + +# [6.14.0](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.13.0...v6.14.0) (2025-05-10) + + +### Bug Fixes + +* **ios:** default cropStart fallback ([#4540](https://github.com/TheWidlarzGroup/react-native-video/issues/4540)) ([ecfe12a](https://github.com/TheWidlarzGroup/react-native-video/commit/ecfe12aa816a3126e023d0c14896681d92fe8926)) +* **ios:** set `_isBuffering = true` only if newValue is also true ([#4532](https://github.com/TheWidlarzGroup/react-native-video/issues/4532)) ([089e938](https://github.com/TheWidlarzGroup/react-native-video/commit/089e938aebc222378f4d16006f585f20a8b0eed1)) +* **ios:** swfit modular headers ([#4527](https://github.com/TheWidlarzGroup/react-native-video/issues/4527)) ([987be4b](https://github.com/TheWidlarzGroup/react-native-video/commit/987be4b293dc21a40b0b183433707bc9a733b715)) + + +### Features + +* **web:** allow `style` prop overrides ([#4528](https://github.com/TheWidlarzGroup/react-native-video/issues/4528)) ([fc1e3f4](https://github.com/TheWidlarzGroup/react-native-video/commit/fc1e3f4fd17faf1503b6b3d7cc604dbe1bc659c1)) + +# [6.13.0](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.12.0...v6.13.0) (2025-04-18) + + +### Bug Fixes + +* **macCatalyst:** allowsVideoFrameAnalysis not available in catalyst until 18.0 ([#4515](https://github.com/TheWidlarzGroup/react-native-video/issues/4515)) ([b17c319](https://github.com/TheWidlarzGroup/react-native-video/commit/b17c319c32ad8080ad911ec4be7fa02bc4a6d6ee)) +* **tvos:** build ([#4511](https://github.com/TheWidlarzGroup/react-native-video/issues/4511)) ([4034046](https://github.com/TheWidlarzGroup/react-native-video/commit/40340467d7df2ad606f25606041630c489c385f6)) + + +### Features + +* **ios:** add `overridePlayerAsset` to `AVPlayerPlugin` ([#4522](https://github.com/TheWidlarzGroup/react-native-video/issues/4522)) ([b1b3db3](https://github.com/TheWidlarzGroup/react-native-video/commit/b1b3db301097e82c8d449c08f7d334a2eaeac0ea)) + +# [6.12.0](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.11.0...v6.12.0) (2025-04-06) + + +### Bug Fixes + +* add extra checks to determine if a file is local ([#4503](https://github.com/TheWidlarzGroup/react-native-video/issues/4503)) ([a849cc1](https://github.com/TheWidlarzGroup/react-native-video/commit/a849cc19e8dafe0cc8147aeb8a226fc1373bb84d)) +* **ios:** don't try to modify react view after unmount ([#4474](https://github.com/TheWidlarzGroup/react-native-video/issues/4474)) ([229a576](https://github.com/TheWidlarzGroup/react-native-video/commit/229a5764ea45ea74e5d469aaac30057c201bd228)) + + +### Features + +* **android:** add asset management functions to plugin ([#4494](https://github.com/TheWidlarzGroup/react-native-video/issues/4494)) ([697afd5](https://github.com/TheWidlarzGroup/react-native-video/commit/697afd52f60cbd52660843b8d29228a2ff7d0060)) +* **android:** initial bitrate ([#4480](https://github.com/TheWidlarzGroup/react-native-video/issues/4480)) ([41ddc5c](https://github.com/TheWidlarzGroup/react-native-video/commit/41ddc5c27a9c180a6d0364b3f3286211f7a10e68)) +* **ios:** allow to disable audio sessions management ([#4492](https://github.com/TheWidlarzGroup/react-native-video/issues/4492)) ([8836362](https://github.com/TheWidlarzGroup/react-native-video/commit/8836362609d226f795b01e1c65a70b9c4ecde1e5)) +* **ios:** set playback speed controls to initial playback rate ([#4495](https://github.com/TheWidlarzGroup/react-native-video/issues/4495)) ([d2e5d9c](https://github.com/TheWidlarzGroup/react-native-video/commit/d2e5d9c64eeb80143c39ca39fcdc8ba65f40a400)) + +# [6.11.0](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.10.2...v6.11.0) (2025-03-16) + + +### Bug Fixes + +* **android:** call `startForeground()` immediately to prevent `ForegroundServiceDidNotStartInTimeException` ([#4453](https://github.com/TheWidlarzGroup/react-native-video/issues/4453)) ([b510374](https://github.com/TheWidlarzGroup/react-native-video/commit/b5103743e87a6ef24c69a07a8368415ff0fc7886)) +* **android:** fix bugs related Android PIP listeners ([#4441](https://github.com/TheWidlarzGroup/react-native-video/issues/4441)) ([82f5f3d](https://github.com/TheWidlarzGroup/react-native-video/commit/82f5f3d21c2f29282c024bfa3a8f9562a4ed8e0f)) +* **android:** prevent ratio calculations before loading video ([#4442](https://github.com/TheWidlarzGroup/react-native-video/issues/4442)) ([235c281](https://github.com/TheWidlarzGroup/react-native-video/commit/235c28121903e20f58d4d830fea5929d2e6e0b56)) +* **ios:** invalid metadata handling ([#4422](https://github.com/TheWidlarzGroup/react-native-video/issues/4422)) ([bc533e5](https://github.com/TheWidlarzGroup/react-native-video/commit/bc533e53b0b4c6906f6e72eac7e3f228da3e4bbd)) +* **tvOS:** handle allowsPictureInPicturePlayback for tvOS ([#4448](https://github.com/TheWidlarzGroup/react-native-video/issues/4448)) ([057c287](https://github.com/TheWidlarzGroup/react-native-video/commit/057c287f127b9f796e592ae538478386f42a447c)) +* **windows:** event name not matches with SPEC ([#4455](https://github.com/TheWidlarzGroup/react-native-video/issues/4455)) ([fa20223](https://github.com/TheWidlarzGroup/react-native-video/commit/fa20223c4498e72bd13b87b05c0297b544c4724b)) + + +### Features + +* enhance react-native-video plugins [Plugins API Breaking] ([#4366](https://github.com/TheWidlarzGroup/react-native-video/issues/4366)) ([6e6f915](https://github.com/TheWidlarzGroup/react-native-video/commit/6e6f91517c492cdc7d2140ae8564712e9a98450a)) +* **windows:** add topSeek parms mentioned in docs ([#4456](https://github.com/TheWidlarzGroup/react-native-video/issues/4456)) ([d902c1b](https://github.com/TheWidlarzGroup/react-native-video/commit/d902c1bf4390a5503eb0ff924ec7cafb2b08a428)) + +## [6.10.2](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.10.1...v6.10.2) (2025-02-22) + + +### Bug Fixes + +* **android:** fix gradle exception text related to AndroidX version ([#4420](https://github.com/TheWidlarzGroup/react-native-video/issues/4420)) ([6697cbf](https://github.com/TheWidlarzGroup/react-native-video/commit/6697cbf5d07ce5cc882637acc1249192f6189e53)) +* **tvOS:** fix tvos compile error for rotation handler ([#4417](https://github.com/TheWidlarzGroup/react-native-video/issues/4417)) ([04eec42](https://github.com/TheWidlarzGroup/react-native-video/commit/04eec42f1e0f8b8f25dc1c50e1e57e62ca8c3356)) + +## [6.10.1](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.10.0...v6.10.1) (2025-02-15) + + +### Bug Fixes + +* **android:** check androidX version at early build process before really launching build ([#4388](https://github.com/TheWidlarzGroup/react-native-video/issues/4388)) ([638f454](https://github.com/TheWidlarzGroup/react-native-video/commit/638f454a2118873de23a14f673848f14eeb10122)) +* **android:** check for valid width and height on video format data ([#4394](https://github.com/TheWidlarzGroup/react-native-video/issues/4394)) ([ad52668](https://github.com/TheWidlarzGroup/react-native-video/commit/ad52668d0541a2d29b1ee8087f9d25cc6a5e8ab2)) +* **android:** remove transparent black overlay on android default controls ([#4392](https://github.com/TheWidlarzGroup/react-native-video/issues/4392)) ([74b1d5b](https://github.com/TheWidlarzGroup/react-native-video/commit/74b1d5b540a062371689f619f1843807ab7ca0e5)) +* **infra:** kotlin linter github action ([#4408](https://github.com/TheWidlarzGroup/react-native-video/issues/4408)) ([2905b61](https://github.com/TheWidlarzGroup/react-native-video/commit/2905b61a0d993715cdf94d9f85f949c9e64d098b)) +* **ios:** fix constraints when controls are enabled and video is inside a ScrollView ([#4383](https://github.com/TheWidlarzGroup/react-native-video/issues/4383)) ([a8ca97f](https://github.com/TheWidlarzGroup/react-native-video/commit/a8ca97f05fd52ec331fd8fe0e7c2375956a76c2c)) +* **ios:** the video has no audio by default ([#4409](https://github.com/TheWidlarzGroup/react-native-video/issues/4409)) ([c8b800a](https://github.com/TheWidlarzGroup/react-native-video/commit/c8b800a508f51a4488b7b260a6bf573b5b6d44d9)), closes [#4400](https://github.com/TheWidlarzGroup/react-native-video/issues/4400) +* **sample:** remove duplicate code in sample ([#4391](https://github.com/TheWidlarzGroup/react-native-video/issues/4391)) ([faac5ad](https://github.com/TheWidlarzGroup/react-native-video/commit/faac5ad45689a605045dae57061d6648244c7dad)) + +# [6.10.0](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.9.1...v6.10.0) (2025-01-22) + + +### Bug Fixes + +* **android:** support RN 0.77 ([#4386](https://github.com/TheWidlarzGroup/react-native-video/issues/4386)) ([8b952e7](https://github.com/TheWidlarzGroup/react-native-video/commit/8b952e709a6535325ffbfab9358538d06b308a15)) +* **ios:** fix paused video by default ([#4379](https://github.com/TheWidlarzGroup/react-native-video/issues/4379)) ([3d3eba9](https://github.com/TheWidlarzGroup/react-native-video/commit/3d3eba97e814519cd79836208af25b948059795b)) +* **tvOS:** fix tvos compile error ([#4369](https://github.com/TheWidlarzGroup/react-native-video/issues/4369)) ([6c3af99](https://github.com/TheWidlarzGroup/react-native-video/commit/6c3af99979c847887796baefd421cb5a50ed32ba)) +* **windows:** conversion of string to Stretch enum ([#4381](https://github.com/TheWidlarzGroup/react-native-video/issues/4381)) ([d90bf47](https://github.com/TheWidlarzGroup/react-native-video/commit/d90bf47df58e61a8946f4762659f3e5613aba95d)) + + +### Features + +* **web:** implement web pip method and event ([#4370](https://github.com/TheWidlarzGroup/react-native-video/issues/4370)) ([8dc10fd](https://github.com/TheWidlarzGroup/react-native-video/commit/8dc10fd4b774b2cc91bf75f4f1680b63411b8559)) + +## [6.9.1](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.9.0...v6.9.1) (2025-01-10) + + +### Bug Fixes + +* avoid memory leak on iOS ([#4355](https://github.com/TheWidlarzGroup/react-native-video/issues/4355)) ([424f4ee](https://github.com/TheWidlarzGroup/react-native-video/commit/424f4eeddea989392e25c52f45a9a0281ead6fe1)) +* NPE in setEnterPictureInPictureOnLeave for unsupported Android versions ([#4362](https://github.com/TheWidlarzGroup/react-native-video/issues/4362)) ([3924b5e](https://github.com/TheWidlarzGroup/react-native-video/commit/3924b5e295ed64c97284f4665bc294066a83574a)) + +# [6.9.0](https://github.com/TheWidlarzGroup/react-native-video/compare/v6.8.2...v6.9.0) (2025-01-04) + + +### Bug Fixes + +* **android:** disable caching on local asset files ([#4304](https://github.com/TheWidlarzGroup/react-native-video/issues/4304)) ([63c592f](https://github.com/TheWidlarzGroup/react-native-video/commit/63c592f7cd897caf918fd3bd5f129c72432d2b55)) +* **docs:** bump `next.js` version & fix meta warnings ([#4327](https://github.com/TheWidlarzGroup/react-native-video/issues/4327)) ([7b4bd9a](https://github.com/TheWidlarzGroup/react-native-video/commit/7b4bd9a0169fc2ea6f277dd7ed904bada98bc63a)) +* hiding poster ([#4308](https://github.com/TheWidlarzGroup/react-native-video/issues/4308)) ([621a802](https://github.com/TheWidlarzGroup/react-native-video/commit/621a80299c690c07846f3fcd8a6c73b7ecde39bf)) +* **ios:** `_paused` is updated when video playback pause ([#4320](https://github.com/TheWidlarzGroup/react-native-video/issues/4320)) ([3da4f1c](https://github.com/TheWidlarzGroup/react-native-video/commit/3da4f1ca979058b387b1be2c2141f6b93fd084a7)) +* **ios:** disables subtitles for `none` and `empty` track types ([#4319](https://github.com/TheWidlarzGroup/react-native-video/issues/4319)) ([1033c9d](https://github.com/TheWidlarzGroup/react-native-video/commit/1033c9d4f3db7042a96e7108a7fe9f1567d69ded)) + + +### Features + +* implement enterPictureInPictureOnLeave prop for both platform (Android, iOS) ([#3385](https://github.com/TheWidlarzGroup/react-native-video/issues/3385)) ([69a7bc2](https://github.com/TheWidlarzGroup/react-native-video/commit/69a7bc2d265f2cf4985f8d81054c46f47ee3bae2)) + +## [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) @@ -514,7 +772,7 @@ * add release-it ([#3342](https://github.com/react-native-video/react-native-video/issues/3342)) ([da27089](https://github.com/react-native-video/react-native-video/commit/da270891fbce485bb132825a336638f2af98408d)) * **ios:** add onBandwidthUpdate event ([#3331](https://github.com/react-native-video/react-native-video/issues/3331)) ([9054db3](https://github.com/react-native-video/react-native-video/commit/9054db35d7d5e4e6d54739fc9349576c03522d7c)) -## Changelog +# ## Next - Android, iOS: add onVolumeChange event #3322 @@ -863,4 +1121,4 @@ - Add cookie support for ExoPlayer [#922](https://github.com/react-native-community/react-native-video/pull/922) - Remove ExoPlayer onMetadata that wasn't being used [#1040](https://github.com/react-native-community/react-native-video/pull/1040) - Fix bug where setting the progress interval on iOS didn't work [#800](https://github.com/react-native-community/react-native-video/pull/800) -- Support setting the poster resize mode [#595](https://github.com/react-native-community/react-native-video/pull/595) \ No newline at end of file +- Support setting the poster resize mode [#595](https://github.com/react-native-community/react-native-video/pull/595) 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..3ab412db 100644 --- a/README.md +++ b/README.md @@ -1,62 +1,173 @@ -# react-native-video -🎬 `
visionOS ## visionOS -Run `pod install` in the `visionos` directory of your project + +Run `pod install` in the `visionos` directory of your project. + +
+ +
+Web + +## Web + +No additional setup is required. Everything should work out of the box. + +However, only basic video support is available. HLS, Dash, ads, and DRM are not currently supported.
diff --git a/docs/pages/other/_meta.json b/docs/pages/other/_meta.json index 0cd936a9..41ff18d0 100644 --- a/docs/pages/other/_meta.json +++ b/docs/pages/other/_meta.json @@ -1,8 +1,9 @@ { "caching": "Caching", + "downloading": "Downloading", "misc": "Misc", "debug": "Debugging", "new-arch": "New Architecture", "expo": "Expo", "plugin": "Plugin (experimental)" -} \ No newline at end of file +} diff --git a/docs/pages/other/caching.md b/docs/pages/other/caching.md index 34361e66..25a139c5 100644 --- a/docs/pages/other/caching.md +++ b/docs/pages/other/caching.md @@ -1,12 +1,14 @@ # Caching -Caching is supported on `iOS` platforms with a CocoaPods setup, and on `android` using `SimpleCache`. +Caching is supported on `iOS` platforms with a CocoaPods setup and on `Android` using `SimpleCache`. ## Android -Android uses a LRU `SimpleCache` with a variable cache size that can be specified by bufferConfig - cacheSizeMB. This creates a folder named `RNVCache` in the app's `cache` folder. Do note RNV does not yet offer a native call to flush the cache, it can be flushed by clearing the app's cache. +Android uses an LRU `SimpleCache` with a variable cache size, which can be specified by `bufferConfig - cacheSizeMB`. This creates a folder named `RNVCache` inside the app's `cache` directory. -In addition, this resolves RNV6's repeated source URI call problem when looping a video on Android. +Note that `react-native-video` does not currently offer a native method to flush the cache, but it can be cleared by manually clearing the app's cache. + +Additionally, this resolves the issue in RNV6 where the source URI was repeatedly called when looping a video on Android. ## iOS @@ -14,17 +16,33 @@ In addition, this resolves RNV6's repeated source URI call problem when looping The cache is backed by [SPTPersistentCache](https://github.com/spotify/SPTPersistentCache) and [DVAssetLoaderDelegate](https://github.com/vdugnist/DVAssetLoaderDelegate). -### How Does It Work +### How It Works -The caching is based on the url of the asset. -SPTPersistentCache is a LRU ([Least Recently Used]()) cache. +Caching is based on the asset's URL. `SPTPersistentCache` uses an LRU ([Least Recently Used](https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU))) caching policy. ### Restrictions -Currently, caching is only supported for URLs that end in a `.mp4`, `.m4v`, or `.mov` extension. In future versions, URLs that end in a query string (e.g. test.mp4?resolution=480p) will be support once dependencies allow access to the `Content-Type` header. At this time, HLS playlists (.m3u8) and videos that sideload text tracks are not supported and will bypass the cache. +Currently, caching is only supported for URLs ending in `.mp4`, `.m4v`, or `.mov`. In future versions, URLs with query strings (e.g., `test.mp4?resolution=480p`) will be supported once dependencies allow access to the `Content-Type` header. -You will also receive warnings in the Xcode logs by using the `debug` mode. So if you are not 100% sure if your video is cached, check your Xcode logs! +At this time, HLS playlists (`.m3u8`) and videos with sideloaded text tracks are not supported and will bypass the cache. -By default files expire after 30 days and the maximum cache size is 100mb. +You will see warnings in the Xcode logs when using `debug` mode. If you're unsure whether your video is cached, check your Xcode logs. -In a future release the cache might have more configurable options. +By default, files expire after 30 days, and the maximum cache size is 100MB. + +Future updates may include more configurable caching options. + +> **Note:** If you are enabling video caching (using `$RNVideoUseVideoCaching`), you must add the following to your `Gemfile`: +> +> ```ruby +> gem "cocoapods-swift-modular-headers" +> ``` +> +> Then, install dependencies using: +> +> ```sh +> bundle install +> bundle exec pod install +> ``` +> +> This enables Swift modular headers for Swift dependencies. diff --git a/docs/pages/other/debug.md b/docs/pages/other/debug.md index 51fa11d0..9b1762f0 100644 --- a/docs/pages/other/debug.md +++ b/docs/pages/other/debug.md @@ -1,20 +1,38 @@ # Debugging -This page describe useful tips for debugging and investigating issue in the package or in your application. +This page provides useful tips for debugging and troubleshooting issues in the package or your application. -## Using the sample app -This repository contains multiple a sample implementation in example folder. -It is always preferable to test behavior on a sample app than in a full app implementation. -The basic sample allow to test a lot of feature. -To use the sample you will need to do steps: -- Clone this repository: ``` git clone git@github.com:TheWidlarzGroup/react-native-video.git``` -- Go to root folder and build it. It will generate a transpiled version of the package in lib folder: ```cd react-native-video && yarn && yarn build``` -- Go to the sample and install it: ```cd example/basic && yarn install``` -- Build it ! for android ```yarn android``` for ios ```cd ios && pod install && cd .. && yarn ios``` +## Using the Sample App +This repository contains multiple sample implementations in the `example` folder. It is always preferable to test behavior in a sample app rather than in a full application. The basic sample allows testing of many features. -## HTTP playback doesn't work or Black Screen on Release build (Android) -If your video work on Debug mode, but on Release you see only black screen, please, check the link to your video. If you use 'http' protocol there, you will need to add next string to your AndroidManifest.xml file. [Details here](https://developer.android.com/guide/topics/manifest/application-element#usesCleartextTraffic) +To use the sample app, follow these steps: + +- Clone this repository: + ```shell + git clone git@github.com:TheWidlarzGroup/react-native-video.git + ``` +- Navigate to the root folder and build the package. This generates a transpiled version in the `lib` folder: + ```shell + cd react-native-video && yarn && yarn build + ``` +- Navigate to the sample app and install dependencies: + ```shell + cd example/basic && yarn install + ``` +- Build and run the app: + - For Android: + ```shell + yarn android + ``` + - For iOS: + ```shell + cd ios && pod install && cd .. && yarn ios + ``` + +## HTTP Playback Doesn't Work or Black Screen on Release Build (Android) + +If your video works in Debug mode but shows only a black screen in Release mode, check the URL of your video. If you are using the `http` protocol, you need to add the following line to your `AndroidManifest.xml` file. [More details here](https://developer.android.com/guide/topics/manifest/application-element#usesCleartextTraffic): ```xml +For more details, check this [article](https://cocoacasts.com/how-to-add-app-transport-security-exception-domains). ## Audio Mixing -At some point in the future, react-native-video will include an Audio Manager for configuring how videos mix with other apps playing sounds on the device. +In future versions, `react-native-video` will include an Audio Manager for configuring how videos mix with other audio-playing apps. -On iOS, if you would like to allow other apps to play music over your video component, make the following change: +On iOS, if you want to allow background music from other apps to continue playing over your video component, update your `AppDelegate.m` file: -**AppDelegate.m** +### **AppDelegate.m** ```objective-c -#import // import +#import // Import the AVFoundation framework - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { ... - [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil]; // allow + [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil]; // Allow background audio ... } ``` -You can also use the [ignoreSilentSwitch](#ignoresilentswitch) prop. -
+You can also use the [`ignoreSilentSwitch`](#ignoresilentswitch) prop. ## Android Expansion File Usage -Expansions files allow you to ship assets that exceed the 100MB apk size limit and don't need to be updated each time you push an app update. -This only supports mp4 files and they must not be compressed. Example command line for preventing compression: +Expansion files allow you to include assets exceeding the 100MB APK size limit without requiring an update every time you push a new version. + +- Only supports `.mp4` files, and they **must not be compressed**. +- Example command to prevent compression: + ```bash zip -r -n .mp4 *.mp4 player.video.example.com ``` +### Example Usage in Code: + ```javascript -// Within your render function, assuming you have a file called -// "background.mp4" in your expansion file. Just add your main and (if applicable) patch version -