Describe the bug
iOS 14.2 beta can't play any remote tracks. Tested on a physical device iPhone 11 Pro with Profile build. Tried running the example app from the repo, the same issue.
(Just added Alert and playback-error event listener to example app)
To Reproduce
Run example app from this repo on physical device with release build.
Environment (please complete the following information):
React Native Environment Info:
System:
OS: macOS 10.15.7
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 7.54 GB / 32.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 6.14.6 - ~/.nvm/versions/node/v12.18.3/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6200805
Xcode: 12.0.1/12A7300 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.9 => 0.59.9
Real Device iPhone 11 Pro with iOS 14.2 beta.
Code
Please, see example app from current repo.
Any insights or guidance is appreciated. Thank you.
did you also check your device logs for more information on what might be going wrong? I will be checking this in the coming days – just waiting on a device to be delivered that I can install the beta on.
I will look into logs today and post here if I find anything.
@puckey I saw something similar in logs as this post https://developer.apple.com/forums/thread/663178.
then I saw this code in RNTrackPlayer.swift:
// configure if player waits to play
let autoWait: Bool = config["waitForBuffer"] as? Bool ?? false
player.automaticallyWaitsToMinimizeStalling = autoWait
waitForBuffer is an option you can pass to .setupPlayer() method. (Its missing from Docs)
Passing this option as true fixed the problem.
TrackPlayer.setupPlayer({
waitForBuffer: true,
});
perhaps we should look into using that automatically whenever a track is being loaded externally..
Closing this as it is a non issue