diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f57f133ea..b1816482c 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,8 +1,8 @@ # Description -*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.* +_Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots._ -*List which issues are fixed by this PR. You must list at least one issue.* +_List which issues are fixed by this PR. You must list at least one issue._ --- @@ -10,15 +10,17 @@ -* +- ### Pre-launch Checklist - [ ] The [Documentation] is updated accordingly, or this PR doesn't require it. +- [ ] I have updated the `ExampleAppChangelog.txt` file with relevant changes. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I added new tests to check the change I am making, or this PR is test-exempt. - [ ] All existing and new tests are passing. + [Documentation]: https://www.100ms.live/docs diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99f7d9d85..d1dbe3866 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,7 @@ concurrency: cancel-in-progress: true on: - workflow_dispatch: + workflow_dispatch: {} push: branches: - main @@ -30,8 +30,8 @@ permissions: contents: read jobs: - build_apk: - name: Build APK + build_android: + name: Build Android App if: github.event.pull_request.draft == false runs-on: ubuntu-latest timeout-minutes: 30 @@ -46,13 +46,100 @@ jobs: distribution: zulu java-version: 11.x + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 16 + - name: Install dependencies - run: cd packages/react-native-hms/example/ && npm install && cd ../../react-native-room-kit/example/ && npm install + run: | + cd packages/react-native-hms/ + npm install + cd example/ + npm install + cd ../../react-native-room-kit/ + npm install + cd example/ + npm install + + - name: Publish Dry Run + run: | + cd packages/react-native-hms/ && npm publish --dry-run + cd ../react-native-room-kit/ && npm publish --dry-run - name: Make Gradlew Executable run: cd packages/react-native-room-kit/example/android && chmod +x ./gradlew - - name: Generate App APK + - name: Build Android App run: | cd packages/react-native-room-kit/example/android - ./gradlew assembleDebug --no-daemon + ./gradlew assembleRelease --no-daemon + + build_ios: + name: Build iOS App + if: github.event.pull_request.draft == false + runs-on: macOS-latest + timeout-minutes: 45 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: 11.x + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 16 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.2 + bundler-cache: true + + - name: Install dependencies + run: | + cd packages/react-native-hms/ + npm install + cd example/ + npm install + cd ../../react-native-room-kit/ + npm install + cd example/ + npm install + + - name: Cache Pods + id: cache-pods + uses: actions/cache@v3 + with: + path: packages/react-native-room-kit/example/ios/Pods + key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-pods- + + - name: Install Pods if Cache Missed + if: steps.cache-pods.outputs.cache-hit != 'true' + run: | + sudo gem install cocoapods + cd ./packages/react-native-room-kit/example/ios + pod install + + - name: Build iOS App + uses: yukiarrr/ios-build-action@v1.11.1 + with: + project-path: packages/react-native-room-kit/example/ios/RNExample.xcodeproj + p12-base64: ${{ secrets.IOS_P12_BASE64 }} + certificate-password: ${{ secrets.IOS_CERTIFICATE_PASSWORD }} + mobileprovision-base64: | + ${{ secrets.ADHOC_MOBILEPROVISION_BASE64 }} + ${{ secrets.ADHOCEXTENSION_MOBILEPROVISION_BASE64 }} + code-signing-identity: iPhone Distribution + team-id: ${{ secrets.IOS_TEAM_ID }} + workspace-path: packages/react-native-room-kit/example/ios/RNExample.xcworkspace + scheme: RNExample + export-method: ad-hoc + export-options: packages/react-native-room-kit/example/ios/ExportOptions.plist diff --git a/.github/workflows/firstinteraction.yml b/.github/workflows/firstinteraction.yml index e2515f3c5..c502606f4 100644 --- a/.github/workflows/firstinteraction.yml +++ b/.github/workflows/firstinteraction.yml @@ -1,13 +1,13 @@ name: first-interaction on: - workflow_dispatch: + workflow_dispatch: {} issues: types: [opened] pull_request: branches: - - main - - develop + - main + - develop types: [opened] jobs: diff --git a/.github/workflows/release_apps.yml b/.github/workflows/release_apps.yml index 97972ef82..f64ca93b7 100644 --- a/.github/workflows/release_apps.yml +++ b/.github/workflows/release_apps.yml @@ -5,10 +5,12 @@ concurrency: cancel-in-progress: true on: - workflow_dispatch: + workflow_dispatch: {} push: branches: - release + tags: + - v* permissions: checks: write diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index a42fecfc0..11a5130ec 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,8 +1,8 @@ -name: 'Close stale issues and PRs' +name: "Close stale issues and PRs" on: - workflow_dispatch: + workflow_dispatch: {} schedule: - - cron: '30 1 * * *' + - cron: "30 1 * * *" jobs: stale: @@ -10,11 +10,11 @@ jobs: steps: - uses: actions/stale@v8 with: - stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' - stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.' - close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.' - close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.' + stale-issue-message: "This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days." + stale-pr-message: "This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days." + close-issue-message: "This issue was closed because it has been stalled for 5 days with no activity." + close-pr-message: "This PR was closed because it has been stalled for 10 days with no activity." days-before-issue-stale: 30 days-before-pr-stale: 45 days-before-issue-close: 5 - days-before-pr-close: 10 \ No newline at end of file + days-before-pr-close: 10 diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml index 6b3dab3a7..b14eaeacd 100644 --- a/.github/workflows/vale.yml +++ b/.github/workflows/vale.yml @@ -1,7 +1,7 @@ name: Vale Linter on: - workflow_dispatch: + workflow_dispatch: {} pull_request: branches: - develop diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index e59c219cd..257b2d011 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -11,10 +11,10 @@ lint: - actionlint@1.6.26 - prettier@3.1.1 - swiftlint@0.54.0 - - checkov@3.1.40 + - checkov@3.1.43 - osv-scanner@1.5.0 - trivy@0.48.1 - - trufflehog@3.63.5 + - trufflehog@3.63.7 - oxipng@9.0.0 - yamllint@1.33.0 - ktlint@1.1.0 @@ -32,9 +32,8 @@ runtimes: - java@13.0.11 - node@18.12.1 actions: - disabled: - - trunk-check-pre-push - - trunk-fmt-pre-commit enabled: - trunk-announce - trunk-upgrade-available + - trunk-check-pre-push + - trunk-fmt-pre-commit diff --git a/packages/react-native-hms/example/src/screens/MeetingScreen/Modals.tsx b/packages/react-native-hms/example/src/screens/MeetingScreen/Modals.tsx index 687968206..cdcb138e9 100644 --- a/packages/react-native-hms/example/src/screens/MeetingScreen/Modals.tsx +++ b/packages/react-native-hms/example/src/screens/MeetingScreen/Modals.tsx @@ -1049,8 +1049,8 @@ export const RtcStatsModal = () => { value?.width ?? 0 }` : key === 'qualityLimitationReasons' - ? value.reason - : value} + ? value.reason + : value} ); diff --git a/packages/react-native-hms/example/src/screens/MeetingScreen/index.tsx b/packages/react-native-hms/example/src/screens/MeetingScreen/index.tsx index 03041ed8c..1db25ca87 100644 --- a/packages/react-native-hms/example/src/screens/MeetingScreen/index.tsx +++ b/packages/react-native-hms/example/src/screens/MeetingScreen/index.tsx @@ -1053,7 +1053,9 @@ const DisplayView = (data: { // remove Session Store key update listener on cleanup sessionStoreListeners.current.forEach(listener => listener.remove()); - if (toastTimeoutId !== null) clearTimeout(toastTimeoutId); + if (toastTimeoutId !== null) { + clearTimeout(toastTimeoutId); + } }; } }, [hmsSessionStore]); diff --git a/packages/react-native-hms/src/classes/HMSPIPConfig.ts b/packages/react-native-hms/src/classes/HMSPIPConfig.ts index 876a8eb80..fdae41c01 100644 --- a/packages/react-native-hms/src/classes/HMSPIPConfig.ts +++ b/packages/react-native-hms/src/classes/HMSPIPConfig.ts @@ -4,4 +4,4 @@ export interface HMSPIPConfig { endButton?: boolean; audioButton?: boolean; videoButton?: boolean; -}; +} diff --git a/packages/react-native-hms/src/components/HMSHLSPlayer/HMSHLSPlayer.tsx b/packages/react-native-hms/src/components/HMSHLSPlayer/HMSHLSPlayer.tsx index 7e1a5df80..5c5abd435 100644 --- a/packages/react-native-hms/src/components/HMSHLSPlayer/HMSHLSPlayer.tsx +++ b/packages/react-native-hms/src/components/HMSHLSPlayer/HMSHLSPlayer.tsx @@ -200,9 +200,10 @@ const _HMSHLSPlayer: React.ForwardRefRenderFunction< ) { setHMSHLSPlayerPlaybackError(data.error); } else if ( - event === HMSHLSPlayerPlaybackEventTypes.ON_PLAYBACK_RESOLUTION_CHANGE_EVENT + event === + HMSHLSPlayerPlaybackEventTypes.ON_PLAYBACK_RESOLUTION_CHANGE_EVENT ) { - setHMSHLSPlayerResolution({...data}); + setHMSHLSPlayerResolution({ ...data }); const aspectRatio = data.width / data.height; diff --git a/packages/react-native-hms/src/components/HMSHLSPlayer/hooks.ts b/packages/react-native-hms/src/components/HMSHLSPlayer/hooks.ts index f3030fa3b..bfc6baebb 100644 --- a/packages/react-native-hms/src/components/HMSHLSPlayer/hooks.ts +++ b/packages/react-native-hms/src/components/HMSHLSPlayer/hooks.ts @@ -93,8 +93,7 @@ export const useHMSHLSPlayerCue = ( export const setHMSHLSPlayerPlaybackState = useHMSStore.getState().setPlaybackState; -export const setHMSHLSPlayerResolution = - useHMSStore.getState().setResolution; +export const setHMSHLSPlayerResolution = useHMSStore.getState().setResolution; export const setHMSHLSPlayerCue = useHMSStore.getState().setCue; diff --git a/packages/react-native-hms/src/hooks/hmsviews.ts b/packages/react-native-hms/src/hooks/hmsviews.ts index 2c28fa99d..bf7fb2de6 100644 --- a/packages/react-native-hms/src/hooks/hmsviews.ts +++ b/packages/react-native-hms/src/hooks/hmsviews.ts @@ -4,7 +4,9 @@ import { useHMSStore } from '../stores/hms-store'; // use latest state (with component rerender) export const useHmsViewsResolutionsState = (trackId?: TrackId) => { - return useHMSStore((state) => trackId ? state.hmsviewsResolutions[trackId] : undefined); + return useHMSStore((state) => + trackId ? state.hmsviewsResolutions[trackId] : undefined + ); }; // state setters diff --git a/packages/react-native-hms/src/stores/hms-store.ts b/packages/react-native-hms/src/stores/hms-store.ts index 09528e440..6de425e95 100644 --- a/packages/react-native-hms/src/stores/hms-store.ts +++ b/packages/react-native-hms/src/stores/hms-store.ts @@ -8,6 +8,6 @@ import type { HMSStore } from './types'; export const useHMSStore = create()( subscribeWithSelector((...a) => ({ ...createHMSHLSPlayerPlaybackSlice(...a), - ...createHMSViewsSlice(...a) + ...createHMSViewsSlice(...a), })) ); diff --git a/packages/react-native-hms/src/stores/types.ts b/packages/react-native-hms/src/stores/types.ts index ec589f4c0..10261d186 100644 --- a/packages/react-native-hms/src/stores/types.ts +++ b/packages/react-native-hms/src/stores/types.ts @@ -24,7 +24,7 @@ export type Resolution = { export interface HMSViewsSlice { hmsviewsResolutions: Record; setHmsviewsResolutions(trackId: TrackId, resolution: Resolution): void; -}; +} // HLS Player Playback Slice @@ -40,7 +40,9 @@ export type HMSHLSPlayerPlaybackError = | HMSHLSPlayerPlaybackFailureEventData['error'] | undefined; -export type HMSHLSPlayerResolution = HMSHLSPlayerPlaybackResolutionChangeEventData | undefined; +export type HMSHLSPlayerResolution = + | HMSHLSPlayerPlaybackResolutionChangeEventData + | undefined; export interface HMSHLSPlayerPlaybackSlice { cue: HMSHLSPlayerCue;