Closed dcvz closed 3 years ago
Hi, Does ProgressComponent does not exist anymore in v2.0.0-rc10 ?
Noup. You must use useProgress()
on a functional component
@Guichaguri , @dcvz .. TrackPlayer.STATE_PLAYING
return undefined
on v2.0.0-rc12 on IOS ...
@Guichaguri , @dcvz ..
TrackPlayer.STATE_PLAYING
returnundefined
on v2.0.0-rc12 on IOS ...
Its like all the constants are undefined.
Thanks @ithustle and @fcaride for reporting them, I'll look into them :)
@dcvz Thanks to you for this amazing library!
@dcvz hi i am getting following error when use with react-native 0.60.3
on pod install i am getting following error
Analyzing dependencies
Fetching podspec for `RNGestureHandler` from `../node_modules/react-native-gesture-handler`
Fetching podspec for `React` from `../node_modules/react-native/`
Fetching podspec for `React-Core` from `../node_modules/react-native/React`
Fetching podspec for `React-DevSupport` from `../node_modules/react-native/React`
Fetching podspec for `React-RCTActionSheet` from `../node_modules/react-native/Libraries/ActionSheetIOS`
Fetching podspec for `React-RCTAnimation` from `../node_modules/react-native/Libraries/NativeAnimation`
Fetching podspec for `React-RCTBlob` from `../node_modules/react-native/Libraries/Blob`
Fetching podspec for `React-RCTImage` from `../node_modules/react-native/Libraries/Image`
Fetching podspec for `React-RCTLinking` from `../node_modules/react-native/Libraries/LinkingIOS`
Fetching podspec for `React-RCTNetwork` from `../node_modules/react-native/Libraries/Network`
Fetching podspec for `React-RCTSettings` from `../node_modules/react-native/Libraries/Settings`
Fetching podspec for `React-RCTText` from `../node_modules/react-native/Libraries/Text`
Fetching podspec for `React-RCTVibration` from `../node_modules/react-native/Libraries/Vibration`
Fetching podspec for `React-RCTWebSocket` from `../node_modules/react-native/Libraries/WebSocket`
Fetching podspec for `React-cxxreact` from `../node_modules/react-native/ReactCommon/cxxreact`
Fetching podspec for `React-fishhook` from `../node_modules/react-native/Libraries/fishhook`
Fetching podspec for `React-jsi` from `../node_modules/react-native/ReactCommon/jsi`
Fetching podspec for `React-jsiexecutor` from `../node_modules/react-native/ReactCommon/jsiexecutor`
Fetching podspec for `React-jsinspector` from `../node_modules/react-native/ReactCommon/jsinspector`
Fetching podspec for `react-native-track-player` from `../node_modules/react-native-track-player`
Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga`
Downloading dependencies
Using DoubleConversion (1.1.6)
Using Folly (2018.10.22.00)
Using RNGestureHandler (1.3.0)
Using React (0.60.3)
Using React-Core (0.60.3)
Using React-DevSupport (0.60.3)
Using React-RCTActionSheet (0.60.3)
Using React-RCTAnimation (0.60.3)
Using React-RCTBlob (0.60.3)
Using React-RCTImage (0.60.3)
Using React-RCTLinking (0.60.3)
Using React-RCTNetwork (0.60.3)
Using React-RCTSettings (0.60.3)
Using React-RCTText (0.60.3)
Using React-RCTVibration (0.60.3)
Using React-RCTWebSocket (0.60.3)
Using React-cxxreact (0.60.3)
Using React-fishhook (0.60.3)
Using React-jsi (0.60.3)
Using React-jsiexecutor (0.60.3)
Using React-jsinspector (0.60.3)
Using boost-for-react-native (1.63.0)
Using glog (0.3.5)
Installing react-native-track-player 2.0.0-rc12 (was 1.2.0)
Using yoga (0.60.3.React)
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `react-native-track-player` depends upon `React-Core`, `React-DevSupport`, `React-RCTActionSheet`, `React-RCTAnimation`, `React-RCTBlob`, `React-RCTImage`, `React-RCTLinking`, `React-RCTNetwork`, `React-RCTSettings`, `React-RCTText`, `React-RCTVibration`, `React-RCTWebSocket`, `Folly`, `React-cxxreact`, `React-jsiexecutor`, `yoga`, `React-fishhook`, `DoubleConversion`, `glog`, `React-jsinspector`, and `React-jsi`, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
Kindly help on that also.
When i do you may set use_modular_headers!
globally in your Podfile, or specify :modular_headers => true
i am getting errors while building project.
Got this error when used use_modular_headers!
Import of module 'glog.glog.log_severity' appears within namespace 'google'
In file included from ios/Pods/Folly/folly/lang/Assume.cpp:19:10
@waqas19921 use_module-headers
is known to not work with RN 0.60 -- there's a couple of issues on that repo. Incuding this one: https://github.com/facebook/react-native/issues/25349
@ithustle @fcaride -- constants are now exported differently since this PR landed: https://github.com/react-native-kit/react-native-track-player/pull/654
I've updated the notes on this thread though to include this information.
Well done, @dcvz . I will try this.
Btw, is it a normal behavior putting a track playing on Android? (RNTP 1.2.0)
Is there a possibility to use track player only for playing music?. As maintaining queue in JavaScript gives more flexibility than queue in Track player. If yes, then How to manage changes in notification bar or Lock screen?
@dcvz, I don't know how but useProgress
it doesn't working. I'm able to use useTrackPlayerProgress
instead and their properties ... RNTP 2.0.0-rc13. Playing songs it get to me position: 0
, bufferedPosition: 0
and duration: 0
UPDATE
Reinstalled and everything back to normal
Is it posible that this version takes more time to load the songs? Im getting like 3 seconds more (before it took me 3 seconds and now it take me 6)
playback-metadata-received
is not a supported event type for RNTrackPlayer. Supported events are: playback-queue-ended
, playback-state
, playback-error
, playback-track-changed
, remote-stop
, remote-pause
, remote-play
, remote-duck
, remote-next
, remote-seek
, remote-previous
, remote-jump-forward
, remote-jump-backward
, remote-like
, remote-dislike
, remote-bookmark
On playback-track-changed
, data.nextTrack
is jumping track position. If played more than 2 songs, on second song playing will show third track information.
async _statusTrackChanged(data) {
const currentTrack = data.nextTrack;
if (currentTrack !== null) {
this.setState({ playing: await TrackPlayer.getTrack(currentTrack) });
}
}
Do I need to add some frameworks to the pod project to get this build in iOS. I get a lot of errors during build about "use of undeclared type":
v2.0.0
Changes
playback-metadata-received
event to be notified of metadata changes on streams #1175 (rc-15)playback-about-to-end
event to provide a chance for loading next track data. - (See https://github.com/react-native-kit/react-native-track-player/issues/818#issuecomment-569370326)~To update run
yarn add react-native-track-player@next
. Breaking changes are outlined below:Migrating to RN 0.60
We've migrated to AndroidX, please follow migration instructions provided by the ReactNative team.
Exports Updated
PR: https://github.com/react-native-kit/react-native-track-player/pull/654 has changed the default export to only include methods on the player.
State
,Capability
,PitchAlgorithm
,TrackType
andEvent
are now exported as enums.Progress Hook Renamed
The hook
useTrackPlayerProgress()
has been fixed and renamed:useProgress()
. The return has also been modified:bufferedPosition
is nowbuffered
.