Skip to content

Commit

Permalink
[Video] use correct max size (#5245)
Browse files Browse the repository at this point in the history
Co-authored-by: Hailey <[email protected]>
  • Loading branch information
mozzius and haileyok authored Sep 10, 2024
1 parent 723a5e4 commit 436e30f
Show file tree
Hide file tree
Showing 21 changed files with 44 additions and 44 deletions.
4 changes: 2 additions & 2 deletions src/lib/media/video/compress.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {ImagePickerAsset} from 'expo-image-picker'
import {VideoTooLargeError} from 'lib/media/video/errors'
import {CompressedVideo} from './types'

const MAX_VIDEO_SIZE = 1024 * 1024 * 100 // 100MB
const MAX_VIDEO_SIZE = 1024 * 1024 * 50 // 50mb

// doesn't actually compress, but throws if >100MB
// doesn't actually compress, converts to ArrayBuffer
export async function compressVideo(
asset: ImagePickerAsset,
_opts?: {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/media/video/errors.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export class VideoTooLargeError extends Error {
constructor() {
super('Videos cannot be larger than 100MB')
super('Videos cannot be larger than 50mb')
this.name = 'VideoTooLargeError'
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/locale/locales/ca/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -7664,8 +7664,8 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "La política de privacitat ha estat traslladada a <0/>"

#: src/state/queries/video/video.ts:222
msgid "The selected video is larger than 100MB."
msgstr "El vídeo triat és més gran de 100MB."
msgid "The selected video is larger than 50MB."
msgstr "El vídeo triat és més gran de 50MB."

#: src/screens/StarterPack/StarterPackScreen.tsx:713
msgid "The starter pack that you are trying to view is invalid. You may delete this starter pack instead."
Expand Down Expand Up @@ -8605,8 +8605,8 @@ msgid "Video: {0}"
msgstr ""

#: src/view/com/composer/videos/state.ts:27
#~ msgid "Videos cannot be larger than 100MB"
#~ msgstr "Els vídeos no poder ser de més de 100MB"
#~ msgid "Videos cannot be larger than 50MB"
#~ msgstr "Els vídeos no poder ser de més de 50MB"

#: src/screens/Profile/Header/Shell.tsx:113
msgid "View {0}'s avatar"
Expand Down
4 changes: 2 additions & 2 deletions src/locale/locales/de/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -6965,7 +6965,7 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "Die Datenschutzerklärung wurde nach <0/> verschoben"

#: src/state/queries/video/video.ts:222
msgid "The selected video is larger than 100MB."
msgid "The selected video is larger than 50MB."
msgstr ""

#: src/screens/StarterPack/StarterPackScreen.tsx:713
Expand Down Expand Up @@ -7871,7 +7871,7 @@ msgid "Video: {0}"
msgstr ""

#: src/view/com/composer/videos/state.ts:27
#~ msgid "Videos cannot be larger than 100MB"
#~ msgid "Videos cannot be larger than 50MB"
#~ msgstr ""

#: src/screens/Profile/Header/Shell.tsx:113
Expand Down
4 changes: 2 additions & 2 deletions src/locale/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -7039,7 +7039,7 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr ""

#: src/state/queries/video/video.ts:227
msgid "The selected video is larger than 100MB."
msgid "The selected video is larger than 50MB."
msgstr ""

#: src/screens/StarterPack/StarterPackScreen.tsx:713
Expand Down Expand Up @@ -7917,7 +7917,7 @@ msgid "Video: {0}"
msgstr ""

#: src/view/com/composer/videos/state.ts:27
#~ msgid "Videos cannot be larger than 100MB"
#~ msgid "Videos cannot be larger than 50MB"
#~ msgstr ""

#: src/screens/Profile/Header/Shell.tsx:113
Expand Down
4 changes: 2 additions & 2 deletions src/locale/locales/es/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -6893,7 +6893,7 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "La Política de privacidad se ha trasladado a <0/>"

#: src/state/queries/video/video.ts:222
msgid "The selected video is larger than 100MB."
msgid "The selected video is larger than 50MB."
msgstr ""

#: src/screens/StarterPack/StarterPackScreen.tsx:713
Expand Down Expand Up @@ -7763,7 +7763,7 @@ msgid "Video: {0}"
msgstr ""

#: src/view/com/composer/videos/state.ts:27
#~ msgid "Videos cannot be larger than 100MB"
#~ msgid "Videos cannot be larger than 50MB"
#~ msgstr ""

#: src/screens/Profile/Header/Shell.tsx:113
Expand Down
4 changes: 2 additions & 2 deletions src/locale/locales/fi/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -6989,7 +6989,7 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "Tietosuojakäytäntö on siirretty kohtaan <0/>"

#: src/state/queries/video/video.ts:222
msgid "The selected video is larger than 100MB."
msgid "The selected video is larger than 50MB."
msgstr ""

#: src/screens/StarterPack/StarterPackScreen.tsx:713
Expand Down Expand Up @@ -7863,7 +7863,7 @@ msgid "Video: {0}"
msgstr ""

#: src/view/com/composer/videos/state.ts:27
#~ msgid "Videos cannot be larger than 100MB"
#~ msgid "Videos cannot be larger than 50MB"
#~ msgstr ""

#: src/screens/Profile/Header/Shell.tsx:113
Expand Down
4 changes: 2 additions & 2 deletions src/locale/locales/fr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -6486,7 +6486,7 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "Notre politique de confidentialité a été déplacée vers <0/>"

#: src/state/queries/video/video.ts:222
msgid "The selected video is larger than 100MB."
msgid "The selected video is larger than 50MB."
msgstr ""

#: src/screens/StarterPack/StarterPackScreen.tsx:713
Expand Down Expand Up @@ -7302,7 +7302,7 @@ msgid "Video: {0}"
msgstr ""

#: src/view/com/composer/videos/state.ts:27
#~ msgid "Videos cannot be larger than 100MB"
#~ msgid "Videos cannot be larger than 50MB"
#~ msgstr "Les vidéos ne peuvent pas dépasser 100 Mo"

#: src/screens/Profile/Header/Shell.tsx:113
Expand Down
4 changes: 2 additions & 2 deletions src/locale/locales/ga/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -7035,7 +7035,7 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "Bogadh Polasaí na Príobháideachta go dtí <0/>"

#: src/state/queries/video/video.ts:222
msgid "The selected video is larger than 100MB."
msgid "The selected video is larger than 50MB."
msgstr ""

#: src/screens/StarterPack/StarterPackScreen.tsx:713
Expand Down Expand Up @@ -7912,7 +7912,7 @@ msgid "Video: {0}"
msgstr ""

#: src/view/com/composer/videos/state.ts:27
#~ msgid "Videos cannot be larger than 100MB"
#~ msgid "Videos cannot be larger than 50MB"
#~ msgstr ""

#: src/screens/Profile/Header/Shell.tsx:113
Expand Down
4 changes: 2 additions & 2 deletions src/locale/locales/hi/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -7609,7 +7609,7 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "गोपनीयता नीति को <0/> पर स्थानांतरित किया गया है"

#: src/state/queries/video/video.ts:222
msgid "The selected video is larger than 100MB."
msgid "The selected video is larger than 50MB."
msgstr ""

#: src/screens/StarterPack/StarterPackScreen.tsx:713
Expand Down Expand Up @@ -8535,7 +8535,7 @@ msgid "Video: {0}"
msgstr ""

#: src/view/com/composer/videos/state.ts:27
#~ msgid "Videos cannot be larger than 100MB"
#~ msgid "Videos cannot be larger than 50MB"
#~ msgstr ""

#: src/screens/Profile/Header/Shell.tsx:113
Expand Down
6 changes: 3 additions & 3 deletions src/locale/locales/id/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -7040,7 +7040,7 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "Kebijakan Privasi telah dipindahkan ke <0/>"

#: src/state/queries/video/video.ts:222
msgid "The selected video is larger than 100MB."
msgid "The selected video is larger than 50MB."
msgstr ""

#: src/screens/StarterPack/StarterPackScreen.tsx:713
Expand Down Expand Up @@ -7914,8 +7914,8 @@ msgid "Video: {0}"
msgstr ""

#: src/view/com/composer/videos/state.ts:27
#~ msgid "Videos cannot be larger than 100MB"
#~ msgstr "Video tidak boleh lebih besar dari 100MB"
#~ msgid "Videos cannot be larger than 50MB"
#~ msgstr "Video tidak boleh lebih besar dari 50MB"

#: src/screens/Profile/Header/Shell.tsx:113
msgid "View {0}'s avatar"
Expand Down
8 changes: 4 additions & 4 deletions src/locale/locales/it/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -7321,8 +7321,8 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "La politica sulla privacy è stata spostata a <0/><0/>"

#: src/state/queries/video/video.ts:222
msgid "The selected video is larger than 100MB."
msgstr "Questo video è più grande di 100MB."
msgid "The selected video is larger than 50MB."
msgstr "Questo video è più grande di 50MB."

#: src/screens/StarterPack/StarterPackScreen.tsx:713
msgid "The starter pack that you are trying to view is invalid. You may delete this starter pack instead."
Expand Down Expand Up @@ -8222,8 +8222,8 @@ msgid "Video: {0}"
msgstr ""

#: src/view/com/composer/videos/state.ts:27
#~ msgid "Videos cannot be larger than 100MB"
#~ msgstr "I video non possono essere più grandi di 100MB"
#~ msgid "Videos cannot be larger than 50MB"
#~ msgstr "I video non possono essere più grandi di 50MB"

#: src/screens/Profile/Header/Shell.tsx:113
msgid "View {0}'s avatar"
Expand Down
4 changes: 2 additions & 2 deletions src/locale/locales/ja/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -6272,8 +6272,8 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "プライバシーポリシーは<0/>に移動しました"

#: src/state/queries/video/video.ts:222
msgid "The selected video is larger than 100MB."
msgstr "選択したビデオのサイズが100MBを超えています。"
msgid "The selected video is larger than 50MB."
msgstr "選択したビデオのサイズが50MBを超えています。"

#: src/screens/StarterPack/StarterPackScreen.tsx:713
msgid "The starter pack that you are trying to view is invalid. You may delete this starter pack instead."
Expand Down
4 changes: 2 additions & 2 deletions src/locale/locales/ko/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -6272,8 +6272,8 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "개인정보 처리방침을 <0/>(으)로 이동했습니다"

#: src/state/queries/video/video.ts:222
msgid "The selected video is larger than 100MB."
msgstr "선택한 동영상이 100MB를 초과합니다."
msgid "The selected video is larger than 50MB."
msgstr "선택한 동영상이 50MB를 초과합니다."

#: src/screens/StarterPack/StarterPackScreen.tsx:713
msgid "The starter pack that you are trying to view is invalid. You may delete this starter pack instead."
Expand Down
4 changes: 2 additions & 2 deletions src/locale/locales/pt-BR/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -7039,7 +7039,7 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "A Política de Privacidade foi movida para <0/>"

#: src/state/queries/video/video.ts:227
msgid "The selected video is larger than 100MB."
msgid "The selected video is larger than 50MB."
msgstr "Vídeo selecionado é maior que 100 MB."

#: src/screens/StarterPack/StarterPackScreen.tsx:713
Expand Down Expand Up @@ -7917,7 +7917,7 @@ msgid "Video: {0}"
msgstr ""

#: src/view/com/composer/videos/state.ts:27
#~ msgid "Videos cannot be larger than 100MB"
#~ msgid "Videos cannot be larger than 50MB"
#~ msgstr "Vídeos não podem ter mais de 100 MB"

#: src/screens/Profile/Header/Shell.tsx:113
Expand Down
2 changes: 1 addition & 1 deletion src/locale/locales/ru/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -6237,7 +6237,7 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "Политика конфиденциальности была перемещена в <0/>"

#: src/state/queries/video/video.ts:188
msgid "The selected video is larger than 100MB."
msgid "The selected video is larger than 50MB."
msgstr "Размер выбранного видео превышает 100МБ."

#: src/screens/StarterPack/StarterPackScreen.tsx:713
Expand Down
4 changes: 2 additions & 2 deletions src/locale/locales/tr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -7498,7 +7498,7 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "Gizlilik Politikası <0/> konumuna taşındı"

#: src/state/queries/video/video.ts:222
msgid "The selected video is larger than 100MB."
msgid "The selected video is larger than 50MB."
msgstr ""

#: src/screens/StarterPack/StarterPackScreen.tsx:713
Expand Down Expand Up @@ -8412,7 +8412,7 @@ msgid "Video: {0}"
msgstr ""

#: src/view/com/composer/videos/state.ts:27
#~ msgid "Videos cannot be larger than 100MB"
#~ msgid "Videos cannot be larger than 50MB"
#~ msgstr ""

#: src/screens/Profile/Header/Shell.tsx:113
Expand Down
4 changes: 2 additions & 2 deletions src/locale/locales/uk/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -7040,7 +7040,7 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "Політика конфіденційності була переміщена до <0/>"

#: src/state/queries/video/video.ts:222
msgid "The selected video is larger than 100MB."
msgid "The selected video is larger than 50MB."
msgstr ""

#: src/screens/StarterPack/StarterPackScreen.tsx:713
Expand Down Expand Up @@ -7914,7 +7914,7 @@ msgid "Video: {0}"
msgstr ""

#: src/view/com/composer/videos/state.ts:27
#~ msgid "Videos cannot be larger than 100MB"
#~ msgid "Videos cannot be larger than 50MB"
#~ msgstr ""

#: src/screens/Profile/Header/Shell.tsx:113
Expand Down
4 changes: 2 additions & 2 deletions src/locale/locales/zh-CN/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -6272,8 +6272,8 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "隐私政策已迁移至 <0/>"

#: src/state/queries/video/video.ts:222
msgid "The selected video is larger than 100MB."
msgstr "选择的视频大小超过 100MB。"
msgid "The selected video is larger than 50MB."
msgstr "选择的视频大小超过 50MB。"

#: src/screens/StarterPack/StarterPackScreen.tsx:713
msgid "The starter pack that you are trying to view is invalid. You may delete this starter pack instead."
Expand Down
4 changes: 2 additions & 2 deletions src/locale/locales/zh-TW/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -6272,8 +6272,8 @@ msgid "The Privacy Policy has been moved to <0/>"
msgstr "隱私政策已移動到 <0/>"

#: src/state/queries/video/video.ts:222
msgid "The selected video is larger than 100MB."
msgstr "選擇的影片檔案大小超過 100MB。"
msgid "The selected video is larger than 50MB."
msgstr "選擇的影片檔案大小超過 50MB。"

#: src/screens/StarterPack/StarterPackScreen.tsx:713
msgid "The starter pack that you are trying to view is invalid. You may delete this starter pack instead."
Expand Down
2 changes: 1 addition & 1 deletion src/state/queries/video/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export function useUploadVideo({
} else if (e instanceof VideoTooLargeError) {
dispatch({
type: 'SetError',
error: _(msg`The selected video is larger than 100MB.`),
error: _(msg`The selected video is larger than 50MB.`),
})
} else {
dispatch({
Expand Down

0 comments on commit 436e30f

Please sign in to comment.