Im trying to bundle a number of video files (100 MBs each) to my app so that the user can play them offline without having to download them from internet (client requirement). Im on expo SDK 30 and tried the offline method suggested by documentation (assetBundlePatterns).
Problem is it looks like expo uploads the video files to server first then decides if it should bundle it with app binary or not. Because it works fine if my video file size less that 50MB but when I go higher it throws me the Exceeding maximum js bandwidth error. Which means expo actually tries to upload the file whereas I specified not to .
So what is the solution ? How Can I include files larger than 50MB ?
My app is not detached/ejected (I have also tried detaching but same thing)
Environment
Expo / iOS && Android / SDK 30
Steps to reproduce
- Add a video larger than 50MB to your assets/video folder
- have this in your code
<Video
source={require("../../../assets/videos/sample_edit_new.mp4")}
rate={1.0}
volume={1.0}
isMuted={false}
resizeMode="cover"
shouldPlay = {false}
isLooping = {false}
style={{ width: 500, height: 300 }}
useNativeControls
/>
- Specify that path in assetBundlePatterns
"assetBundlePatterns": [
"assets/videos/*"
],
- run
expo publish
orexpo build:ios
in terminal
Observed Behaviour
- When trying expo publish I get
[16:02:35] Finished building JavaScript bundle in 15924ms.
[16:02:35] Uploading assets
[16:02:48] Uploading /assets/videos/roleplay.mp4
[16:02:48] 'Request body larger than maxBodyLength limit'
- When trying
expo build:ios
I get
[15:27:46] Publishing to channel 'default'...
[15:27:48] Building iOS bundle
[15:27:53]' Error: socket hang up'