[ios][audio] Support native preloading#43061
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
The Pull Request introduced fingerprint changes against the base commit: a88fab5 Fingerprint diff[
{
"op": "changed",
"beforeSource": {
"type": "dir",
"filePath": "../../packages/expo-audio/ios",
"reasons": [
"expoAutolinkingIos"
],
"hash": "7483c01f05528676ffaddc1106f124e14532de18"
},
"afterSource": {
"type": "dir",
"filePath": "../../packages/expo-audio/ios",
"reasons": [
"expoAutolinkingIos"
],
"hash": "dc19b7c91768bb26b185907ae492b2b994b718af"
}
}
]Generated by PR labeler 🤖 |
57c43f2 to
1a9a726
Compare
|
Subscribed to pull request
Generated by CodeMention |
64f3a65 to
7ecd857
Compare
|
@alanjhughes thanks for working on this! I want to mention that audio has prop https://docs.expo.dev/versions/latest/sdk/audio/#isloaded which is kinda useless (it doesnt really show audio is ready to play) and there is https://docs.expo.dev/versions/latest/sdk/audio/#isbuffering which works in way you cannot rely on it. So maybe add another status prop like Because of this, neither |
What values outside of what we are already using are provided by the native SDKs would be used to determine that? |
Right now I dont know, I just want to mention that current statuses |
|
@psnet - Ok, I will try out some things and see if this can be improved |
|
@psnet - you can also check the |
on web it is unimplemented (always empty): https://github.com/expo/expo/blob/main/packages/expo-audio/src/AudioModule.web.ts#L89 on android: it is the same as and as |
apps/native-component-list/src/screens/Audio/AudioPreloadScreen.tsx
Outdated
Show resolved
Hide resolved
03a7939 to
39d2142
Compare
39d2142 to
7c67a9d
Compare
7c67a9d to
1fbb601
Compare
a45fd35 to
5dc5ec1
Compare
5dc5ec1 to
bc10a3f
Compare
|
Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines. I've found some issues in your pull request that should be addressed (click on them for more details) 👇
|
Merge activity
|
# Why closes expo#42900 Adds support for native preloading # How Adds a `preload` function and cache that allows users to create a player instance and start loading the buffer ahead of when `useAudioPlayer` is used in the component. When a url is used that exist's in the cache, we return the preloaded `AVPlayer` instance. # Test Plan Bare expo

Why
closes #42900
Adds support for native preloading
How
Adds a
preloadfunction and cache that allows users to create a player instance and start loading the buffer ahead of whenuseAudioPlayeris used in the component. When a url is used that exist's in the cache, we return the preloadedAVPlayerinstance.Test Plan
Bare expo