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

feat: Creator Channels Group Chat and Audio, Camera and Image upload #2442

Merged
merged 153 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 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
1d0996e
feat: add creator channels toolbar
hirbod Sep 25, 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
4480bf0
Merge branch 'feat/track-player' into feat/creator-channels-toolbar
hirbod Sep 26, 2023
200d35a
feat(wip): support uploads
hirbod 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
2ac1e6d
Merge branch 'feat/track-player' into feat/creator-channels-toolbar
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
b448e7d
feat: support background upload and real endpoints
hirbod Sep 26, 2023
6c18f32
Merge branch 'feat/track-player' into feat/creator-channels-toolbar
hirbod Sep 26, 2023
f849e87
feat(wip): add camera and photo upload support
hirbod Sep 26, 2023
114b9f5
feat: add image compression before upload
hirbod 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
354e572
Merge branch 'feat/track-player' into feat/creator-channels-toolbar
hirbod Sep 26, 2023
cc735d3
feat: finalize native upload and items
hirbod Sep 27, 2023
bd4bba8
fix: support channel uploads on web
hirbod Sep 27, 2023
e08e30e
fix(creator-channels): support optimistic images on web
hirbod Sep 27, 2023
9e256f1
fix: add width and height to image
hirbod Sep 27, 2023
9926bb8
fix: move audio compress to native upload func
hirbod Sep 27, 2023
8e8aaa3
fix: pause state on android
hirbod Sep 27, 2023
ff05c7c
fix lightbox size
alantoa Sep 27, 2023
5f499d8
fix: severa channel item issues recycling
hirbod Sep 27, 2023
969bf47
fix: input issues
hirbod Sep 27, 2023
7653564
fix: upload compressing pipeline was incorrect
hirbod Sep 27, 2023
4664f6e
fix: gated urls
hirbod Sep 27, 2023
74af467
feat: make creator channels 90% faster
hirbod Sep 27, 2023
25c6016
feat: lean text for channels
hirbod Sep 27, 2023
6cf8ad1
fix: channel issues
hirbod Sep 27, 2023
7883d45
fix: plenty of issues with channels
hirbod Sep 27, 2023
fa2fb0c
fix: calculate date and currency efficient
hirbod Sep 27, 2023
c2082c0
fix: calculate dates faster
hirbod Sep 27, 2023
31f326b
fix: wrong channel permission management
hirbod Sep 27, 2023
288052c
fix: imports
hirbod Sep 27, 2023
2f2b145
Fix the stretched image on web
alantoa Sep 28, 2023
a3a6614
fix: permission dialogs
hirbod Sep 28, 2023
c58acc2
fix: base64 image previews on web
hirbod Sep 28, 2023
18e03fc
fix lightbox
alantoa Sep 28, 2023
a10ed64
Make background of the lightbox always dark
alantoa Sep 28, 2023
fc569b7
change close button color
alantoa Sep 28, 2023
d982c5c
fix: breaking memoization
hirbod Sep 28, 2023
b0a5937
fix: code organization
hirbod Sep 28, 2023
be7de57
fix: final channel bugfixes
hirbod Sep 28, 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
19 changes: 16 additions & 3 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,
supportsTablet: false, // TODO:
jsEngine: "hermes",
backgroundColor: "#FFFFFF",
Expand Down Expand Up @@ -150,17 +151,28 @@ const expoConfig: ExpoConfig = {
[
"expo-media-library",
{
photosPermission: "Allow $(PRODUCT_NAME) to access your photos.",
savePhotosPermission: "Allow $(PRODUCT_NAME) to save photos.",
savePhotosPermission:
"Allow $(PRODUCT_NAME) to save photos to your media library.",
isAccessMediaLocationEnabled: true,
},
],
[
"expo-document-picker",
{
iCloudContainerEnvironment:
STAGE === "production" ? "Production" : "Development",
},
],
"expo-localization",
[
"expo-image-picker",
{
photosPermission:
"$(PRODUCT_NAME) needs to access your camera roll so that you can upload photos on Showtime.",
"$(PRODUCT_NAME) accesses your photos to allow you to share them with your audience and to personalize your profile.",
cameraPermission:
"$(PRODUCT_NAME) requires access to your camera to capture photos and videos, allowing you to share moments with your audience and enhance your creator channel.",
microphonePermission:
"$(PRODUCT_NAME) requires access to your microphone to record voice messages. This also ensures that when you record videos, they aren't muted, providing a richer interactive experience for your audience.",
},
],
[
Expand Down Expand Up @@ -233,6 +245,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