Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

feat: Group chat and Audio player capabilities #2441

Closed
wants to merge 116 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
5714019
Squashed commit of the following:
hirbod Aug 10, 2023
29e09e9
feat(wip): Add channel message audio player
hirbod Aug 11, 2023
562698f
feat: add audio service and event listeners
hirbod Aug 11, 2023
fdc2b39
feat: audio progress storage with valtio
hirbod Aug 11, 2023
716b902
feat: music duration to date time
hirbod Aug 11, 2023
6c92bbc
feat(wip): AudioPlayer component for CC
hirbod Aug 11, 2023
66360ac
feat: register audio service on boot
hirbod Aug 11, 2023
bb868f4
chore: add react-native-track-player
hirbod Aug 11, 2023
78483cc
feat: add use-track-progress hook
hirbod Aug 11, 2023
de530c7
chore: dont warn unused vars with underscore
hirbod Aug 11, 2023
054da8a
fix: linting issues
hirbod Aug 11, 2023
ea9ef38
chore: refactor track player
hirbod Aug 11, 2023
d4603fd
feat: add track player web implementation with shaka
hirbod Aug 11, 2023
4d03ac0
feat: add universal audio player solution
hirbod Aug 11, 2023
ffd05c5
feat: destroy audio player when leaving / changing channel
hirbod Aug 11, 2023
7986855
feat: add platform based player export
hirbod Aug 11, 2023
4f39a43
feat: register playback service in _app.tsx
hirbod Aug 11, 2023
2d5356f
fix: add transpile packges
hirbod Aug 11, 2023
40b4372
Merge branch 'staging' into feat/track-player
hirbod Aug 11, 2023
d99805a
fix: merge conflicts
hirbod Aug 11, 2023
d548dc5
fix: dont through SetupNotCalledError, just return
hirbod Aug 11, 2023
cf35f19
feat: add audio player demo
hirbod Aug 11, 2023
b225984
fix: scrubbing logic on audio track
hirbod Aug 11, 2023
4015a4d
fix(web): correctly pause running tracks
hirbod Aug 11, 2023
ba542b5
fix(web): unmount of channels needs to stop music
hirbod Aug 11, 2023
e527d6f
fix: reduce remote player capabilities
hirbod Aug 11, 2023
206c6ad
feat: add track player metadata for trackcenter
hirbod Aug 11, 2023
4119788
feat: init audio service after app mount
hirbod Aug 11, 2023
f61c85f
feat: add minimal styling to audio player
hirbod Aug 11, 2023
e33c5e3
feat: style track player further
hirbod Aug 11, 2023
9b1cbba
feat: trigger setup player when messages loaded
hirbod Aug 11, 2023
4bc2a8d
Merge branch 'staging' into feat/track-player
hirbod Aug 14, 2023
a8c74e3
Merge branch 'staging' into feat/track-player
hirbod Aug 15, 2023
78e5247
Merge branch 'staging' into feat/track-player
hirbod Aug 17, 2023
57d3757
Merge branch 'staging' into feat/track-player
hirbod Aug 17, 2023
24b3a10
Merge branch 'staging' into feat/track-player
hirbod Aug 18, 2023
eac0059
Merge branch 'staging' into feat/track-player
hirbod Aug 21, 2023
cd43ea2
Merge branch 'staging' into feat/track-player
hirbod Aug 23, 2023
2c27627
Merge branch 'staging' into feat/track-player
hirbod Aug 23, 2023
98177d0
Merge branch 'staging' into feat/track-player
hirbod Aug 23, 2023
3382c5b
Merge branch 'staging' into feat/track-player
hirbod Sep 7, 2023
d41edd0
Merge branch 'staging' into feat/track-player
hirbod Sep 11, 2023
bc8fd5f
Merge branch 'staging' into feat/track-player
hirbod Sep 15, 2023
52fd6d4
fix: imports
hirbod Sep 15, 2023
c1f0fcf
fix: update track states
hirbod Sep 15, 2023
9413bc0
fix: imports
hirbod Sep 15, 2023
68dab0a
feat: finalize track player - YIHA
hirbod Sep 15, 2023
9e321ea
feat: track player design (white mode)
hirbod Sep 15, 2023
7f898b4
Merge branch 'staging' into feat/track-player
hirbod Sep 18, 2023
be1fcba
feat: dark mode for Audio Player
hirbod Sep 18, 2023
bd4b08a
fix: finalize AudioPlayer
hirbod Sep 19, 2023
7b00b98
feat: created creator badge component
hirbod Sep 19, 2023
a6cd3ac
feat: add URL detection for non creators in channels
hirbod Sep 19, 2023
b688ad1
feat: add admin check to message input component
hirbod Sep 19, 2023
4483c85
feat: add support for username in multichat channels
hirbod Sep 19, 2023
5978155
feat: replace star drop badge against creator badge
hirbod Sep 19, 2023
0ea79eb
feat: message input permission handling
hirbod Sep 19, 2023
842cc56
chore: bump reanimated and rngh
hirbod Sep 19, 2023
0fcb659
chore: upgrade packages
hirbod Sep 19, 2023
e20c5d6
feat: update channelById types (added permissions)
hirbod Sep 19, 2023
e8e5d59
chore: commit yarn.lock
hirbod Sep 19, 2023
98e7328
feat: allow admins to delete every message
hirbod Sep 19, 2023
bcbe837
Merge branch 'staging' into feat/track-player
hirbod Sep 19, 2023
1504d14
fix: remove nativeID
hirbod Sep 19, 2023
69793ec
fix: remove unused stardropbadge
hirbod Sep 19, 2023
0efabef
Merge branch 'staging' into feat/track-player
hirbod Sep 20, 2023
799b5f9
fix: link detection
hirbod Sep 20, 2023
ee0bfe4
fix: creator can delete all messages by any member
hirbod Sep 20, 2023
bad0ec7
Merge branch 'staging' into feat/track-player
hirbod Sep 21, 2023
f82bc14
fix: adjust new creator channels header
hirbod Sep 21, 2023
39812d8
chore: bump reanimated
hirbod Sep 21, 2023
46a7c2b
chore: add support for expo-document-picker (mp3 uploads)
hirbod Sep 21, 2023
b05befa
feat: add attachment types to api response
hirbod Sep 21, 2023
8b1bf10
fix: channel header
hirbod Sep 21, 2023
eed270f
Merge branch 'staging' into feat/track-player
hirbod Sep 21, 2023
e4cb726
Merge branch 'staging' into feat/track-player
hirbod Sep 22, 2023
d76ced6
fix: creator badge
hirbod Sep 22, 2023
8661aaa
fix: share button in channel header
hirbod Sep 22, 2023
95042a6
fix: remove AudioPlayer from Message List
hirbod Sep 22, 2023
cf8a32f
fix: reaction position ios 17
hirbod Sep 22, 2023
306407a
fix: remove itemType for channel message
hirbod Sep 22, 2023
0637169
fix: date format wrong in channels
hirbod Sep 22, 2023
14589c4
feat: date format update in channels (new design)
hirbod Sep 22, 2023
c649d1e
feat: prevent excessive audio player setup
hirbod Sep 22, 2023
b781b56
feat: connect attachment to audio player
hirbod Sep 22, 2023
bf3194d
feat: add blur text with fake placeholder
hirbod Sep 22, 2023
0ad741a
feat: utility to generate randomized lorem text
hirbod Sep 22, 2023
e184275
chore: upgrade ChannelMessage types
hirbod Sep 22, 2023
49fe5d8
fix: change getItemType signature to fix reaction bug
hirbod Sep 22, 2023
b09e56e
fix: channel message header arrow
hirbod Sep 22, 2023
c71c96a
fix: keyboard package
hirbod Sep 22, 2023
85ef791
chore: package update
hirbod Sep 22, 2023
6f05e0f
feat: add blurred placeholder text to channels
hirbod Sep 22, 2023
0c122a3
fix: issues with different attchement types
hirbod Sep 22, 2023
deb8de9
fix: unblur reactions
hirbod Sep 25, 2023
5d0e86a
fix: issues with wav files and audio reset after reaching 0
hirbod Sep 25, 2023
b0f4e73
fix: message permissions for admins
hirbod Sep 25, 2023
c157e7e
fix: support stage URLs
hirbod Sep 25, 2023
173b4fc
fix: broken attachment types
hirbod Sep 25, 2023
7de2408
feat: support attachments in channel list
hirbod Sep 25, 2023
9e8fc80
feat: support attachment preview in list
hirbod Sep 25, 2023
134e37d
fix: gap for icons
hirbod Sep 25, 2023
c8abc90
fix: list crashing with empty latest_message
hirbod Sep 26, 2023
e677f9e
fix: channel list web preview
hirbod Sep 26, 2023
8154e37
fix: optimistic update
hirbod Sep 26, 2023
a598bcb
Fix the lightbox on the message-item
alantoa Sep 26, 2023
393b670
fix the size of the lightbox on the web
alantoa Sep 26, 2023
ee614a0
fix lightbox
alantoa Sep 26, 2023
f4e5d17
feat: add react-native-compressor for upload
hirbod Sep 26, 2023
69a41b6
fix: preview message
hirbod Sep 26, 2023
891faaf
fix: preview message for web and native
hirbod Sep 26, 2023
b4c9eb8
fix lightbox
alantoa Sep 26, 2023
f9ead13
clear up code
alantoa Sep 26, 2023
0a78142
add icons
alantoa Sep 26, 2023
95fcb9c
fix: packages not transpiling on web
hirbod Sep 26, 2023
1a3e1e8
fix: missing preview text bug with attachments
hirbod Sep 26, 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
9 changes: 8 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ module.exports = {
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"unused-imports/no-unused-vars": "warn",
"unused-imports/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"no-empty": "warn",
"react/display-name": "warn",
"no-async-promise-executor": "warn",
Expand Down
9 changes: 9 additions & 0 deletions apps/expo/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const expoConfig: ExpoConfig = {
ios: {
bundleIdentifier: config.scheme,
buildNumber: majorVersion.toString(),
usesIcloudStorage: true,
hirbod marked this conversation as resolved.
Show resolved Hide resolved
supportsTablet: false, // TODO:
jsEngine: "hermes",
backgroundColor: "#FFFFFF",
Expand Down Expand Up @@ -155,6 +156,13 @@ const expoConfig: ExpoConfig = {
isAccessMediaLocationEnabled: true,
},
],
[
"expo-document-picker",
{
iCloudContainerEnvironment:
STAGE === "production" ? "Production" : "Development",
},
],
"expo-localization",
[
"expo-image-picker",
Expand Down Expand Up @@ -233,6 +241,7 @@ const expoConfig: ExpoConfig = {
},
},
],
["react-native-compressor"],
],
hooks: {
postPublish: [
Expand Down
7 changes: 7 additions & 0 deletions apps/expo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ import "expo-dev-launcher";
import "expo/build/Expo.fx";
import "react-native-gesture-handler";

import { PlaybackService } from "app/components/audio-player/service";

import TrackPlayer from "design-system/track-player";

import App from "./App";

// if (__DEV__) {
// activateKeepAwake();
// }

registerRootComponent(App);

// register audio service
TrackPlayer.registerPlaybackService(() => PlaybackService);
10 changes: 7 additions & 3 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"@hookform/resolvers": "^3.1.1",
"@magic-ext/react-native-expo-oauth": "^8.1.0",
"@magic-sdk/react-native-expo": "^14.1.0",
"@miblanchard/react-native-slider": "^2.3.1",
"@react-native-async-storage/async-storage": "~1.19.1",
"@react-native-community/blur": "^4.3.2",
"@react-native-community/datetimepicker": "7.4.1",
Expand Down Expand Up @@ -98,6 +99,7 @@
"expo-constants": "~14.4.2",
"expo-dev-client": "~2.4.7",
"expo-device": "~5.4.0",
"expo-document-picker": "~11.5.4",
"expo-font": "~11.4.0",
"expo-gl": "~13.0.1",
"expo-haptics": "~12.4.0",
Expand Down Expand Up @@ -137,11 +139,12 @@
"react-native-bignumber": "^0.2.1",
"react-native-blob-jsi-helper": "^0.3.1",
"react-native-blurhash": "^1.1.10",
"react-native-gesture-handler": "2.12.0",
"react-native-compressor": "^1.8.4",
"react-native-gesture-handler": "2.13.1",
"react-native-get-random-values": "~1.9.0",
"react-native-image-colors": "^2.3.0",
"react-native-ios-context-menu": "^1.15.3",
"react-native-keyboard-controller": "^1.5.8",
"react-native-keyboard-controller": "^1.7.0",
"react-native-level-fs": "^3.0.1",
"react-native-localhost": "^1.0.0",
"react-native-mmkv": "2.10.1",
Expand All @@ -151,13 +154,14 @@
"react-native-popper": "^0.3.2",
"react-native-quick-base64": "^2.0.7",
"react-native-quick-crypto": "^0.6.1",
"react-native-reanimated": "3.4.1",
"react-native-reanimated": "3.5.4",
"react-native-reanimated-carousel": "^3.5.1",
"react-native-safe-area-context": "4.7.1",
"react-native-screens": "^3.23.0",
"react-native-share": "^9.2.3",
"react-native-svg": "13.10.0",
"react-native-tab-view": "^3.5.2",
"react-native-track-player": "v4.0.0-rc08",
"react-native-view-shot": "3.7.0",
"react-native-volume-manager": "^1.10.0",
"react-native-web": "~0.19.7",
Expand Down
5 changes: 5 additions & 0 deletions apps/next/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ const nextConfig = {
"universal-tooltip",
"react-native-image-colors",
"react-native-reanimated-carousel",
"@miblanchard/react-native-slider",
"react-native-track-player",
"expo-document-picker",
"react-native-compressor",
],
webpack: (config, options) => {
if (!options.isServer) {
Expand Down Expand Up @@ -139,6 +143,7 @@ const nextConfig = {
"storage.googleapis.com",
"testingservice-dot-showtimenft.wl.r.appspot.com",
"media.showtime.xyz",
"media-stage.showtime.xyz",
],
},
async headers() {
Expand Down
1 change: 1 addition & 0 deletions apps/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"resize-observer-polyfill": "^1.5.1",
"screenfull": "^6.0.2",
"setimmediate": "^1.0.5",
"shaka-player": "^4.3.8",
"swiper": "^10.0.4",
"swr": "^2.2.0",
"twitter-lite": "^1.1.0",
Expand Down
4 changes: 4 additions & 0 deletions apps/next/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import "react-datepicker/dist/react-datepicker.css";

import { View } from "@showtime-xyz/universal.view";

import { PlaybackService } from "app/components/audio-player/service";
import Footer from "app/components/footer";
import Header from "app/components/header";
import { withColorScheme } from "app/components/memo-with-theme";
Expand Down Expand Up @@ -58,6 +59,7 @@ import { VerifyPhoneNumberScreen } from "app/screens/settings-verify-phone-numbe
import { prevRouteRef } from "app/utilities";

import { Toaster } from "design-system/toast";
import TrackPlayer from "design-system/track-player";

import "../styles/styles.css";

Expand All @@ -66,6 +68,8 @@ Sentry.init({
environment: process.env.STAGE,
});

TrackPlayer.registerPlaybackService(() => PlaybackService);

function App({ Component, pageProps, router }: AppProps) {
const meta = pageProps.meta;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"react-dom": "18.2.0",
"@jest/create-cache-key-function": "29.2.1",
"jest-runtime": "29.5.0",
"react-native-reanimated": "3.4.1",
"react-native-reanimated": "3.5.4",
"@types/react": "~18.2.14",
"@ethersproject/bignumber": "5.7.0",
"@ethersproject/signing-key": "5.7.0",
Expand Down
Loading
Loading