doublesymmetry / react-native-track-player

A fully fledged audio module created for music apps. Provides audio playback, external media controls, background mode and more!
https://rntp.dev/
Apache License 2.0
3.22k stars 996 forks source link

v2 [@next, rc-18 published] #662

Closed dcvz closed 3 years ago

dcvz commented 5 years ago

v2.0.0

Changes

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 and Event are now exported as enums.

import TrackPlayer, { State, Capability, TrackType } from '...'

Progress Hook Renamed

The hook useTrackPlayerProgress() has been fixed and renamed: useProgress(). The return has also been modified: bufferedPosition is now buffered.

@returns { position, duration, ~buffered~ }
maikmacs commented 5 years ago

Hi, Does ProgressComponent does not exist anymore in v2.0.0-rc10 ?

ithustle commented 5 years ago

Noup. You must use useProgress() on a functional component

ithustle commented 5 years ago

@Guichaguri , @dcvz .. TrackPlayer.STATE_PLAYING return undefined on v2.0.0-rc12 on IOS ...

fcaride commented 5 years ago

@Guichaguri , @dcvz .. TrackPlayer.STATE_PLAYING return undefined on v2.0.0-rc12 on IOS ...

Its like all the constants are undefined.

dcvz commented 5 years ago

Thanks @ithustle and @fcaride for reporting them, I'll look into them :)

fcaride commented 5 years ago

@dcvz Thanks to you for this amazing library!

waqas19921 commented 5 years ago

@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.

waqas19921 commented 5 years ago

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

dcvz commented 5 years ago

@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

dcvz commented 5 years ago

@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.

ithustle commented 5 years ago

Well done, @dcvz . I will try this. Btw, is it a normal behavior putting a track playing on Android? (RNTP 1.2.0) Captura de ecrã de 2019-07-16 13-44-36

YajanaRao commented 5 years ago

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?

ithustle commented 5 years ago

@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

sayem314 commented 5 years ago

fcaride commented 4 years ago

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)

ithustle commented 4 years ago

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

ithustle commented 4 years ago

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) });
        }
}
cyrusbuilt commented 4 years ago

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":

Click to expand ``` Showing All Messages CompileSwift normal x86_64 /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Capabilities.swift (in target: react-native-track-player) cd /ios/Pods /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Capabilities.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/MediaURL.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/PitchAlgorithms.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/SessionCategories.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Track.swift -emit-module-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Capabilities\~partial.swiftmodule -emit-module-doc-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Capabilities\~partial.swiftdoc -serialize-diagnostics-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Capabilities.dia -emit-dependencies-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Capabilities.d -emit-reference-dependencies-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Capabilities.swiftdeps -target x86_64-apple-ios10.0-simulator -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk -I /Build/Products/Debug-iphonesimulator/react-native-track-player -F /Build/Products/Debug-iphonesimulator/react-native-track-player -enable-testing -g -import-underlying-module -module-cache-path /Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 4.2 -enforce-exclusivity=checked -Onone -D DEBUG -D COCOAPODS -serialize-debugging-options -Xcc -working-directory -Xcc /ios/Pods -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file=/ios/Pods/Headers/Public/react_native_track_player/react-native-track-player.modulemap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/swift-overrides.hmap -Xcc -iquote -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-generated-files.hmap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-own-target-headers.hmap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/all-product-headers.yaml -Xcc -iquote -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-project-headers.hmap -Xcc -I/Build/Products/Debug-iphonesimulator/react-native-track-player/include -Xcc -I/ios/Pods/Headers/Private -Xcc -I/ios/Pods/Headers/Private/react-native-track-player -Xcc -I/ios/Pods/Headers/Public -Xcc -I/ios/Pods/Headers/Public/DoubleConversion -Xcc -I/ios/Pods/Headers/Public/React-Core -Xcc -I/ios/Pods/Headers/Public/React-DevSupport -Xcc -I/ios/Pods/Headers/Public/React-RCTActionSheet -Xcc -I/ios/Pods/Headers/Public/React-RCTAnimation -Xcc -I/ios/Pods/Headers/Public/React-RCTBlob -Xcc -I/ios/Pods/Headers/Public/React-RCTImage -Xcc -I/ios/Pods/Headers/Public/React-RCTLinking -Xcc -I/ios/Pods/Headers/Public/React-RCTNetwork -Xcc -I/ios/Pods/Headers/Public/React-RCTSettings -Xcc -I/ios/Pods/Headers/Public/React-RCTText -Xcc -I/ios/Pods/Headers/Public/React-RCTVibration -Xcc -I/ios/Pods/Headers/Public/React-RCTWebSocket -Xcc -I/ios/Pods/Headers/Public/React-cxxreact -Xcc -I/ios/Pods/Headers/Public/React-jsi -Xcc -I/ios/Pods/Headers/Public/React-jsiexecutor -Xcc -I/ios/Pods/Headers/Public/React-jsinspector -Xcc -I/ios/Pods/Headers/Public/glog -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources-normal/x86_64 -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources/x86_64 -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources -Xcc -DPOD_CONFIGURATION_DEBUG=1 -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -module-name react_native_track_player -o /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Capabilities.o -index-store-path /Index/DataStore -index-system-modules /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Capabilities.swift:17:65: error: use of undeclared type 'RemoteCommand' bookmarkOptions: [String: Any]?) -> RemoteCommand { ^~~~~~~~~~~~~ CompileSwift normal x86_64 /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/MediaURL.swift (in target: react-native-track-player) cd /ios/Pods /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Capabilities.swift -primary-file /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/MediaURL.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/PitchAlgorithms.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/SessionCategories.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Track.swift -emit-module-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/MediaURL\~partial.swiftmodule -emit-module-doc-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/MediaURL\~partial.swiftdoc -serialize-diagnostics-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/MediaURL.dia -emit-dependencies-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/MediaURL.d -emit-reference-dependencies-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/MediaURL.swiftdeps -target x86_64-apple-ios10.0-simulator -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk -I /Build/Products/Debug-iphonesimulator/react-native-track-player -F /Build/Products/Debug-iphonesimulator/react-native-track-player -enable-testing -g -import-underlying-module -module-cache-path /Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 4.2 -enforce-exclusivity=checked -Onone -D DEBUG -D COCOAPODS -serialize-debugging-options -Xcc -working-directory -Xcc /ios/Pods -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file=/ios/Pods/Headers/Public/react_native_track_player/react-native-track-player.modulemap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/swift-overrides.hmap -Xcc -iquote -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-generated-files.hmap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-own-target-headers.hmap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/all-product-headers.yaml -Xcc -iquote -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-project-headers.hmap -Xcc -I/Build/Products/Debug-iphonesimulator/react-native-track-player/include -Xcc -I/ios/Pods/Headers/Private -Xcc -I/ios/Pods/Headers/Private/react-native-track-player -Xcc -I/ios/Pods/Headers/Public -Xcc -I/ios/Pods/Headers/Public/DoubleConversion -Xcc -I/ios/Pods/Headers/Public/React-Core -Xcc -I/ios/Pods/Headers/Public/React-DevSupport -Xcc -I/ios/Pods/Headers/Public/React-RCTActionSheet -Xcc -I/ios/Pods/Headers/Public/React-RCTAnimation -Xcc -I/ios/Pods/Headers/Public/React-RCTBlob -Xcc -I/ios/Pods/Headers/Public/React-RCTImage -Xcc -I/ios/Pods/Headers/Public/React-RCTLinking -Xcc -I/ios/Pods/Headers/Public/React-RCTNetwork -Xcc -I/ios/Pods/Headers/Public/React-RCTSettings -Xcc -I/ios/Pods/Headers/Public/React-RCTText -Xcc -I/ios/Pods/Headers/Public/React-RCTVibration -Xcc -I/ios/Pods/Headers/Public/React-RCTWebSocket -Xcc -I/ios/Pods/Headers/Public/React-cxxreact -Xcc -I/ios/Pods/Headers/Public/React-jsi -Xcc -I/ios/Pods/Headers/Public/React-jsiexecutor -Xcc -I/ios/Pods/Headers/Public/React-jsinspector -Xcc -I/ios/Pods/Headers/Public/glog -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources-normal/x86_64 -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources/x86_64 -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources -Xcc -DPOD_CONFIGURATION_DEBUG=1 -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -module-name react_native_track_player -o /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/MediaURL.o -index-store-path /Index/DataStore -index-system-modules CompileSwift normal x86_64 /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift (in target: react-native-track-player) cd /ios/Pods /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Capabilities.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/MediaURL.swift -primary-file /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/PitchAlgorithms.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/SessionCategories.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Track.swift -emit-module-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Metadata\~partial.swiftmodule -emit-module-doc-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Metadata\~partial.swiftdoc -serialize-diagnostics-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Metadata.dia -emit-dependencies-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Metadata.d -emit-reference-dependencies-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Metadata.swiftdeps -target x86_64-apple-ios10.0-simulator -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk -I /Build/Products/Debug-iphonesimulator/react-native-track-player -F /Build/Products/Debug-iphonesimulator/react-native-track-player -enable-testing -g -import-underlying-module -module-cache-path /Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 4.2 -enforce-exclusivity=checked -Onone -D DEBUG -D COCOAPODS -serialize-debugging-options -Xcc -working-directory -Xcc /ios/Pods -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file=/ios/Pods/Headers/Public/react_native_track_player/react-native-track-player.modulemap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/swift-overrides.hmap -Xcc -iquote -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-generated-files.hmap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-own-target-headers.hmap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/all-product-headers.yaml -Xcc -iquote -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-project-headers.hmap -Xcc -I/Build/Products/Debug-iphonesimulator/react-native-track-player/include -Xcc -I/ios/Pods/Headers/Private -Xcc -I/ios/Pods/Headers/Private/react-native-track-player -Xcc -I/ios/Pods/Headers/Public -Xcc -I/ios/Pods/Headers/Public/DoubleConversion -Xcc -I/ios/Pods/Headers/Public/React-Core -Xcc -I/ios/Pods/Headers/Public/React-DevSupport -Xcc -I/ios/Pods/Headers/Public/React-RCTActionSheet -Xcc -I/ios/Pods/Headers/Public/React-RCTAnimation -Xcc -I/ios/Pods/Headers/Public/React-RCTBlob -Xcc -I/ios/Pods/Headers/Public/React-RCTImage -Xcc -I/ios/Pods/Headers/Public/React-RCTLinking -Xcc -I/ios/Pods/Headers/Public/React-RCTNetwork -Xcc -I/ios/Pods/Headers/Public/React-RCTSettings -Xcc -I/ios/Pods/Headers/Public/React-RCTText -Xcc -I/ios/Pods/Headers/Public/React-RCTVibration -Xcc -I/ios/Pods/Headers/Public/React-RCTWebSocket -Xcc -I/ios/Pods/Headers/Public/React-cxxreact -Xcc -I/ios/Pods/Headers/Public/React-jsi -Xcc -I/ios/Pods/Headers/Public/React-jsiexecutor -Xcc -I/ios/Pods/Headers/Public/React-jsinspector -Xcc -I/ios/Pods/Headers/Public/glog -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources-normal/x86_64 -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources/x86_64 -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources -Xcc -DPOD_CONFIGURATION_DEBUG=1 -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -module-name react_native_track_player -o /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Metadata.o -index-store-path /Index/DataStore -index-system-modules /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift:15:36: error: use of undeclared type 'AudioPlayer' static func update(for player: AudioPlayer, with metadata: [String: Any]) { ^~~~~~~~~~~ /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift:17:19: error: use of undeclared type 'NowPlayingInfoKeyValue' var ret: [NowPlayingInfoKeyValue] = [] ^~~~~~~~~~~~~~~~~~~~~~ /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift:20:24: error: use of unresolved identifier 'MediaItemProperty' ret.append(MediaItemProperty.title(title)) ^~~~~~~~~~~~~~~~~ MediaPlayer.MPMediaItemPropertyGenre:1:12: note: did you mean 'MPMediaItemPropertyGenre'? public let MPMediaItemPropertyGenre: String ^ MediaPlayer.MPMediaItemPropertyTitle:1:12: note: did you mean 'MPMediaItemPropertyTitle'? public let MPMediaItemPropertyTitle: String ^ /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift:24:24: error: use of unresolved identifier 'MediaItemProperty' ret.append(MediaItemProperty.artist(artist)) ^~~~~~~~~~~~~~~~~ MediaPlayer.MPMediaItemPropertyGenre:1:12: note: did you mean 'MPMediaItemPropertyGenre'? public let MPMediaItemPropertyGenre: String ^ MediaPlayer.MPMediaItemPropertyTitle:1:12: note: did you mean 'MPMediaItemPropertyTitle'? public let MPMediaItemPropertyTitle: String ^ /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift:28:24: error: use of unresolved identifier 'MediaItemProperty' ret.append(MediaItemProperty.albumTitle(album)) ^~~~~~~~~~~~~~~~~ MediaPlayer.MPMediaItemPropertyGenre:1:12: note: did you mean 'MPMediaItemPropertyGenre'? public let MPMediaItemPropertyGenre: String ^ MediaPlayer.MPMediaItemPropertyTitle:1:12: note: did you mean 'MPMediaItemPropertyTitle'? public let MPMediaItemPropertyTitle: String ^ /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift:32:24: error: use of unresolved identifier 'MediaItemProperty' ret.append(MediaItemProperty.duration(duration)) ^~~~~~~~~~~~~~~~~ MediaPlayer.MPMediaItemPropertyGenre:1:12: note: did you mean 'MPMediaItemPropertyGenre'? public let MPMediaItemPropertyGenre: String ^ MediaPlayer.MPMediaItemPropertyTitle:1:12: note: did you mean 'MPMediaItemPropertyTitle'? public let MPMediaItemPropertyTitle: String ^ /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift:36:24: error: use of unresolved identifier 'NowPlayingInfoProperty' ret.append(NowPlayingInfoProperty.elapsedPlaybackTime(elapsedTime)) ^~~~~~~~~~~~~~~~~~~~~~ /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift:47:68: error: use of unresolved identifier 'MediaItemProperty' player?.nowPlayingInfoController.set(keyValue: MediaItemProperty.artwork(artwork)) ^~~~~~~~~~~~~~~~~ MediaPlayer.MPMediaItemPropertyGenre:1:12: note: did you mean 'MPMediaItemPropertyGenre'? public let MPMediaItemPropertyGenre: String ^ MediaPlayer.MPMediaItemPropertyTitle:1:12: note: did you mean 'MPMediaItemPropertyTitle'? public let MPMediaItemPropertyTitle: String ^ CompileSwift normal x86_64 /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/PitchAlgorithms.swift (in target: react-native-track-player) cd /ios/Pods /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Capabilities.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/MediaURL.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift -primary-file /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/PitchAlgorithms.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/SessionCategories.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Track.swift -emit-module-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/PitchAlgorithms\~partial.swiftmodule -emit-module-doc-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/PitchAlgorithms\~partial.swiftdoc -serialize-diagnostics-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/PitchAlgorithms.dia -emit-dependencies-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/PitchAlgorithms.d -emit-reference-dependencies-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/PitchAlgorithms.swiftdeps -target x86_64-apple-ios10.0-simulator -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk -I /Build/Products/Debug-iphonesimulator/react-native-track-player -F /Build/Products/Debug-iphonesimulator/react-native-track-player -enable-testing -g -import-underlying-module -module-cache-path /Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 4.2 -enforce-exclusivity=checked -Onone -D DEBUG -D COCOAPODS -serialize-debugging-options -Xcc -working-directory -Xcc /ios/Pods -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file=/ios/Pods/Headers/Public/react_native_track_player/react-native-track-player.modulemap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/swift-overrides.hmap -Xcc -iquote -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-generated-files.hmap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-own-target-headers.hmap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/all-product-headers.yaml -Xcc -iquote -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-project-headers.hmap -Xcc -I/Build/Products/Debug-iphonesimulator/react-native-track-player/include -Xcc -I/ios/Pods/Headers/Private -Xcc -I/ios/Pods/Headers/Private/react-native-track-player -Xcc -I/ios/Pods/Headers/Public -Xcc -I/ios/Pods/Headers/Public/DoubleConversion -Xcc -I/ios/Pods/Headers/Public/React-Core -Xcc -I/ios/Pods/Headers/Public/React-DevSupport -Xcc -I/ios/Pods/Headers/Public/React-RCTActionSheet -Xcc -I/ios/Pods/Headers/Public/React-RCTAnimation -Xcc -I/ios/Pods/Headers/Public/React-RCTBlob -Xcc -I/ios/Pods/Headers/Public/React-RCTImage -Xcc -I/ios/Pods/Headers/Public/React-RCTLinking -Xcc -I/ios/Pods/Headers/Public/React-RCTNetwork -Xcc -I/ios/Pods/Headers/Public/React-RCTSettings -Xcc -I/ios/Pods/Headers/Public/React-RCTText -Xcc -I/ios/Pods/Headers/Public/React-RCTVibration -Xcc -I/ios/Pods/Headers/Public/React-RCTWebSocket -Xcc -I/ios/Pods/Headers/Public/React-cxxreact -Xcc -I/ios/Pods/Headers/Public/React-jsi -Xcc -I/ios/Pods/Headers/Public/React-jsiexecutor -Xcc -I/ios/Pods/Headers/Public/React-jsinspector -Xcc -I/ios/Pods/Headers/Public/glog -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources-normal/x86_64 -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources/x86_64 -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources -Xcc -DPOD_CONFIGURATION_DEBUG=1 -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -module-name react_native_track_player -o /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/PitchAlgorithms.o -index-store-path /Index/DataStore -index-system-modules CompileSwift normal x86_64 /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift (in target: react-native-track-player) cd /ios/Pods /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Capabilities.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/MediaURL.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/PitchAlgorithms.swift -primary-file /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/SessionCategories.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Track.swift -emit-module-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/RNTrackPlayer\~partial.swiftmodule -emit-module-doc-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/RNTrackPlayer\~partial.swiftdoc -serialize-diagnostics-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/RNTrackPlayer.dia -emit-dependencies-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/RNTrackPlayer.d -emit-reference-dependencies-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/RNTrackPlayer.swiftdeps -target x86_64-apple-ios10.0-simulator -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk -I /Build/Products/Debug-iphonesimulator/react-native-track-player -F /Build/Products/Debug-iphonesimulator/react-native-track-player -enable-testing -g -import-underlying-module -module-cache-path /Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 4.2 -enforce-exclusivity=checked -Onone -D DEBUG -D COCOAPODS -serialize-debugging-options -Xcc -working-directory -Xcc /ios/Pods -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file=/ios/Pods/Headers/Public/react_native_track_player/react-native-track-player.modulemap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/swift-overrides.hmap -Xcc -iquote -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-generated-files.hmap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-own-target-headers.hmap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/all-product-headers.yaml -Xcc -iquote -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-project-headers.hmap -Xcc -I/Build/Products/Debug-iphonesimulator/react-native-track-player/include -Xcc -I/ios/Pods/Headers/Private -Xcc -I/ios/Pods/Headers/Private/react-native-track-player -Xcc -I/ios/Pods/Headers/Public -Xcc -I/ios/Pods/Headers/Public/DoubleConversion -Xcc -I/ios/Pods/Headers/Public/React-Core -Xcc -I/ios/Pods/Headers/Public/React-DevSupport -Xcc -I/ios/Pods/Headers/Public/React-RCTActionSheet -Xcc -I/ios/Pods/Headers/Public/React-RCTAnimation -Xcc -I/ios/Pods/Headers/Public/React-RCTBlob -Xcc -I/ios/Pods/Headers/Public/React-RCTImage -Xcc -I/ios/Pods/Headers/Public/React-RCTLinking -Xcc -I/ios/Pods/Headers/Public/React-RCTNetwork -Xcc -I/ios/Pods/Headers/Public/React-RCTSettings -Xcc -I/ios/Pods/Headers/Public/React-RCTText -Xcc -I/ios/Pods/Headers/Public/React-RCTVibration -Xcc -I/ios/Pods/Headers/Public/React-RCTWebSocket -Xcc -I/ios/Pods/Headers/Public/React-cxxreact -Xcc -I/ios/Pods/Headers/Public/React-jsi -Xcc -I/ios/Pods/Headers/Public/React-jsiexecutor -Xcc -I/ios/Pods/Headers/Public/React-jsinspector -Xcc -I/ios/Pods/Headers/Public/glog -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources-normal/x86_64 -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources/x86_64 -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources -Xcc -DPOD_CONFIGURATION_DEBUG=1 -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -module-name react_native_track_player -o /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/RNTrackPlayer.o -index-store-path /Index/DataStore -index-system-modules /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:19:30: error: use of undeclared type 'QueuedAudioPlayer' private lazy var player: QueuedAudioPlayer = { ^~~~~~~~~~~~~~~~~ /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:40:27: error: use of unresolved identifier 'AVPlayerWrapperState'; did you mean 'AVPlayerLooperStatus'? "STATE_NONE": AVPlayerWrapperState.idle.rawValue, ^~~~~~~~~~~~~~~~~~~~ AVPlayerLooperStatus AVFoundation.AVPlayerLooperStatus:2:18: note: 'AVPlayerLooperStatus' declared here public typealias AVPlayerLooperStatus = AVPlayerLooper.Status ^ /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:41:28: error: use of unresolved identifier 'AVPlayerWrapperState'; did you mean 'AVPlayerLooperStatus'? "STATE_READY": AVPlayerWrapperState.ready.rawValue, ^~~~~~~~~~~~~~~~~~~~ AVPlayerLooperStatus AVFoundation.AVPlayerLooperStatus:2:18: note: 'AVPlayerLooperStatus' declared here public typealias AVPlayerLooperStatus = AVPlayerLooper.Status ^ /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:42:30: error: use of unresolved identifier 'AVPlayerWrapperState'; did you mean 'AVPlayerLooperStatus'? "STATE_PLAYING": AVPlayerWrapperState.playing.rawValue, ^~~~~~~~~~~~~~~~~~~~ AVPlayerLooperStatus AVFoundation.AVPlayerLooperStatus:2:18: note: 'AVPlayerLooperStatus' declared here public typealias AVPlayerLooperStatus = AVPlayerLooper.Status ^ /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:43:29: error: use of unresolved identifier 'AVPlayerWrapperState'; did you mean 'AVPlayerLooperStatus'? "STATE_PAUSED": AVPlayerWrapperState.paused.rawValue, ^~~~~~~~~~~~~~~~~~~~ AVPlayerLooperStatus AVFoundation.AVPlayerLooperStatus:2:18: note: 'AVPlayerLooperStatus' declared here public typealias AVPlayerLooperStatus = AVPlayerLooper.Status ^ /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:44:30: error: use of unresolved identifier 'AVPlayerWrapperState'; did you mean 'AVPlayerLooperStatus'? "STATE_STOPPED": AVPlayerWrapperState.idle.rawValue, ^~~~~~~~~~~~~~~~~~~~ AVPlayerLooperStatus AVFoundation.AVPlayerLooperStatus:2:18: note: 'AVPlayerLooperStatus' declared here public typealias AVPlayerLooperStatus = AVPlayerLooper.Status ^ /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:45:32: error: use of unresolved identifier 'AVPlayerWrapperState'; did you mean 'AVPlayerLooperStatus'? "STATE_BUFFERING": AVPlayerWrapperState.loading.rawValue, ^~~~~~~~~~~~~~~~~~~~ AVPlayerLooperStatus AVFoundation.AVPlayerLooperStatus:2:18: note: 'AVPlayerLooperStatus' declared here public typealias AVPlayerLooperStatus = AVPlayerLooper.Status ^ /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:47:48: error: use of unresolved identifier 'PlaybackEndedReason' "TRACK_PLAYBACK_ENDED_REASON_END": PlaybackEndedReason.playedUntilEnd.rawValue, ^~~~~~~~~~~~~~~~~~~ /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:48:51: error: use of unresolved identifier 'PlaybackEndedReason' "TRACK_PLAYBACK_ENDED_REASON_JUMPED": PlaybackEndedReason.jumpedToIndex.rawValue, ^~~~~~~~~~~~~~~~~~~ /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:49:49: error: use of unresolved identifier 'PlaybackEndedReason' "TRACK_PLAYBACK_ENDED_REASON_NEXT": PlaybackEndedReason.skippedToNext.rawValue, ^~~~~~~~~~~~~~~~~~~ /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:50:53: error: use of unresolved identifier 'PlaybackEndedReason' "TRACK_PLAYBACK_ENDED_REASON_PREVIOUS": PlaybackEndedReason.skippedToPrevious.rawValue, ^~~~~~~~~~~~~~~~~~~ /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:51:52: error: use of unresolved identifier 'PlaybackEndedReason' "TRACK_PLAYBACK_ENDED_REASON_STOPPED": PlaybackEndedReason.playerStopped.rawValue, ^~~~~~~~~~~~~~~~~~~ /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Capabilities.swift:17:65: error: use of undeclared type 'RemoteCommand' bookmarkOptions: [String: Any]?) -> RemoteCommand { ^~~~~~~~~~~~~ /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:386:61: error: contextual type 'Any' cannot be used with dictionary literal sendEvent(withName: "playback-track-changed", body: [ ^ /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:401:65: error: contextual type 'Any' cannot be used with dictionary literal sendEvent(withName: "playback-track-changed", body: [ ^ /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift:417:65: error: contextual type 'Any' cannot be used with dictionary literal sendEvent(withName: "playback-track-changed", body: [ ^ /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift:15:36: error: use of undeclared type 'AudioPlayer' static func update(for player: AudioPlayer, with metadata: [String: Any]) { ^~~~~~~~~~~ CompileSwift normal x86_64 /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/SessionCategories.swift (in target: react-native-track-player) cd /ios/Pods /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Capabilities.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/MediaURL.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/PitchAlgorithms.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift -primary-file /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/SessionCategories.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Track.swift -emit-module-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/SessionCategories\~partial.swiftmodule -emit-module-doc-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/SessionCategories\~partial.swiftdoc -serialize-diagnostics-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/SessionCategories.dia -emit-dependencies-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/SessionCategories.d -emit-reference-dependencies-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/SessionCategories.swiftdeps -target x86_64-apple-ios10.0-simulator -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk -I /Build/Products/Debug-iphonesimulator/react-native-track-player -F /Build/Products/Debug-iphonesimulator/react-native-track-player -enable-testing -g -import-underlying-module -module-cache-path /Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 4.2 -enforce-exclusivity=checked -Onone -D DEBUG -D COCOAPODS -serialize-debugging-options -Xcc -working-directory -Xcc /ios/Pods -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file=/ios/Pods/Headers/Public/react_native_track_player/react-native-track-player.modulemap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/swift-overrides.hmap -Xcc -iquote -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-generated-files.hmap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-own-target-headers.hmap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/all-product-headers.yaml -Xcc -iquote -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-project-headers.hmap -Xcc -I/Build/Products/Debug-iphonesimulator/react-native-track-player/include -Xcc -I/ios/Pods/Headers/Private -Xcc -I/ios/Pods/Headers/Private/react-native-track-player -Xcc -I/ios/Pods/Headers/Public -Xcc -I/ios/Pods/Headers/Public/DoubleConversion -Xcc -I/ios/Pods/Headers/Public/React-Core -Xcc -I/ios/Pods/Headers/Public/React-DevSupport -Xcc -I/ios/Pods/Headers/Public/React-RCTActionSheet -Xcc -I/ios/Pods/Headers/Public/React-RCTAnimation -Xcc -I/ios/Pods/Headers/Public/React-RCTBlob -Xcc -I/ios/Pods/Headers/Public/React-RCTImage -Xcc -I/ios/Pods/Headers/Public/React-RCTLinking -Xcc -I/ios/Pods/Headers/Public/React-RCTNetwork -Xcc -I/ios/Pods/Headers/Public/React-RCTSettings -Xcc -I/ios/Pods/Headers/Public/React-RCTText -Xcc -I/ios/Pods/Headers/Public/React-RCTVibration -Xcc -I/ios/Pods/Headers/Public/React-RCTWebSocket -Xcc -I/ios/Pods/Headers/Public/React-cxxreact -Xcc -I/ios/Pods/Headers/Public/React-jsi -Xcc -I/ios/Pods/Headers/Public/React-jsiexecutor -Xcc -I/ios/Pods/Headers/Public/React-jsinspector -Xcc -I/ios/Pods/Headers/Public/glog -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources-normal/x86_64 -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources/x86_64 -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources -Xcc -DPOD_CONFIGURATION_DEBUG=1 -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -module-name react_native_track_player -o /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/SessionCategories.o -index-store-path /Index/DataStore -index-system-modules CompileSwift normal x86_64 /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Track.swift (in target: react-native-track-player) cd /ios/Pods /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Capabilities.swift node_modules/react-native-track-player/ios/RNTrackPlayer/Models/MediaURL.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Utils/Metadata.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/PitchAlgorithms.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/RNTrackPlayer.swift /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/SessionCategories.swift -primary-file /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Track.swift -emit-module-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Track\~partial.swiftmodule -emit-module-doc-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Track\~partial.swiftdoc -serialize-diagnostics-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Track.dia -emit-dependencies-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Track.d -emit-reference-dependencies-path /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Track.swiftdeps -target x86_64-apple-ios10.0-simulator -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk -I /Build/Products/Debug-iphonesimulator/react-native-track-player -F /Build/Products/Debug-iphonesimulator/react-native-track-player -enable-testing -g -import-underlying-module -module-cache-path /Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 4.2 -enforce-exclusivity=checked -Onone -D DEBUG -D COCOAPODS -serialize-debugging-options -Xcc -working-directory -Xcc /ios/Pods -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file=/ios/Pods/Headers/Public/react_native_track_player/react-native-track-player.modulemap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/swift-overrides.hmap -Xcc -iquote -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-generated-files.hmap -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-own-target-headers.hmap -Xcc -IBuild/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/all-product-headers.yaml -Xcc -iquote -Xcc /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/react-native-track-player-project-headers.hmap -Xcc -I/Build/Products/Debug-iphonesimulator/react-native-track-player/include -Xcc -I/ios/Pods/Headers/Private -Xcc -I/ios/Pods/Headers/Private/react-native-track-player -Xcc -I/ios/Pods/Headers/Public -Xcc -I/ios/Pods/Headers/Public/DoubleConversion -Xcc -I/ios/Pods/Headers/Public/React-Core -Xcc -I/ios/Pods/Headers/Public/React-DevSupport -Xcc -I/ios/Pods/Headers/Public/React-RCTActionSheet -Xcc -I/ios/Pods/Headers/Public/React-RCTAnimation -Xcc -I/ios/Pods/Headers/Public/React-RCTBlob -Xcc -I/ios/Pods/Headers/Public/React-RCTImage -Xcc -I/ios/Pods/Headers/Public/React-RCTLinking -Xcc -I/ios/Pods/Headers/Public/React-RCTNetwork -Xcc -I/ios/Pods/Headers/Public/React-RCTSettings -Xcc -I/ios/Pods/Headers/Public/React-RCTText -Xcc -I/ios/Pods/Headers/Public/React-RCTVibration -Xcc -I/ios/Pods/Headers/Public/React-RCTWebSocket -Xcc -I/ios/Pods/Headers/Public/React-cxxreact -Xcc -I/ios/Pods/Headers/Public/React-jsi -Xcc -I/ios/Pods/Headers/Public/React-jsiexecutor -Xcc -I/ios/Pods/Headers/Public/React-jsinspector -Xcc -I/ios/Pods/Headers/Public/glog -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources-normal/x86_64 -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources/x86_64 -Xcc -I/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/DerivedSources -Xcc -DPOD_CONFIGURATION_DEBUG=1 -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -module-name react_native_track_player -o /Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-track-player.build/Objects-normal/x86_64/Track.o -index-store-path /Index/DataStore -index-system-modules /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Track.swift:97:29: error: use of undeclared type 'SourceType' func getSourceType() -> SourceType { ^~~~~~~~~~ /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Track.swift:13:24: error: use of undeclared type 'AudioItem' class Track: NSObject, AudioItem, TimePitching, AssetOptionsProviding { ^~~~~~~~~ /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Track.swift:13:35: error: use of undeclared type 'TimePitching' class Track: NSObject, AudioItem, TimePitching, AssetOptionsProviding { ^~~~~~~~~~~~ /node_modules/react-native-track-player/ios/RNTrackPlayer/Models/Track.swift:13:49: error: use of undeclared type 'AssetOptionsProviding' class Track: NSObject, AudioItem, TimePitching, AssetOptionsProviding { ^~~~~~~~~~~~~~~~~~~~~ ```
alburdette619 commented 4 years ago

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

playback-metadata-received is currently listed in the docs, but according to this and looking into the code it's only defined in JAVA code. Is there any way currently to get an event when HLS streams start playing a new segment?

fcaride commented 4 years ago

My app is getting really slow after one minute using this version, its like when i press play it freezes the main thread. I cant interact with the app until it finish loading the song. Any ideaS?

CapitanRedBeard commented 4 years ago

@dcvz I found a weird behavior with useProgress. When I update the TrackPlayer position with await TrackPlayer.seekTo(position), the hook useProgress only returns the new progress when the TrackPlayer State is playing. In other words if I pause the audio and then seek this hook doesn't update the new progress until I play the audio again.

I believe this is because of this line in the hooks file. We only update on Play or Buffering. I assume this is done because there shouldn't we doing the interval while Pausing. Can we also call that getProgress update call whenever TrackPlayer.seekTo is called?

CapitanRedBeard commented 4 years ago

Another problem with the useProgress hook is it returns 0's for everything after adding a Track and not playing it. So if we just want to load up the track(s) we won't get progress/duration/bufferProgress until we play.

I suggest we call getProgress() in the userProgress hook right before calling useEffect here to first initially get the values

CapitanRedBeard commented 4 years ago

@dcvz After playing around with rc13 some more it seems there are some fundamental issues with getPosition and getDuration on iOS. I'll try and put together a small repro so you can examine what's going on but essentially two huge problems are:

  1. getDuration is not consistent. After setting up the TrackPlayer and calling await TrackPlayer.add(tracks) calling await TrackPlayer.getDuration() after might return 0 or might return the true duration. All we know is that it's wrong when its 0 so the hack right now is to setup an interval and wait until it starts returning a non-zero value. So for this API and for the useProgress hook to work properly we need fix whatever race condition exists here and always return a non-zero duration after we've added tracks. Maybe there is another function we need to await for but there exists some obvious race condition here.

  2. getPosition also is not consistent. After setting up the TrackPlayer and calling await TrackPlayer.add(tracks) and await TrackPlayer.seekTo(newPosition) calling await TrackPlayer.getPosition() may return 0 or may return newPosition. Again there has to be some race condition getting in the way here. I've checked that I'm only calling seekTo in one spot and awaiting that to finish. This one usually never returns the newPosition until the podcasts has started playing even if we do the hack I wrote about here to run TrackPlayer.play(); await TrackPlayer.seekTo(newPosition); TrackPlayer.pause()

Really not sure what's going on here. In the meantime I need to revert back to the v1.x.x for my own app, but after I get that back to working I'll try to put together a small repro to illustrate these bugs.

If you're absolutely not noticing these race conditions then I think the project that we're testing the library in must be getting around the race conditions however I can guarantee they exist in this project and we're going to need to solve them to move forward with the v2

Definitely-Not-Vlad commented 4 years ago

Not to muddy the waters and seem ungrateful for all the wonderful work being done, but can we please get an update on how the release is going and what is and isn't being worked on if anything? I've spent the last week trying to get RC13 up and running to no avail, because the useProgress() hook is broken and returns 0 as @CaptainRedBeard described, along with a handful of other issues.

Again, I do appreciate this package, it's a great piece of work and I'd love to keep using it, however, it seems it's been abandoned or neglected, so could we please get an update?

Also, sorry if this isn't the perfect spot to post this or if there's an answer to my questions in some other random issue, I just couldn't find anything else.

Guichaguri commented 4 years ago

The last publish to npm was done 6 months ago, has there been any progress since then and if so can it please be put into a new RC?

Yes, we'll eventually publish a new version, there are quite a few bug fixes and new features that we've been working on in the last few weeks (you can see the progress in the v2 branch).

There's no up-to-date v2.0.0 documentation available anywhere (please do direct me to it if I'm wrong), could we get something more than the odd comment and/or bullet point in random, scattered issues? It would make sense to me to actively keep the documentation up-to-date in the v2 branch (if that's even what's being used)

There is in the docs folder in the v2 branch. It's not fully updated yet, but most of the new features are already there.

Again, I do appreciate this package, it's a great piece of work and I'd love to keep using it, however, it seems it's been abandoned or neglected, so could we please get an update?

We've been discussing a bit of that on #703

badayounes1478 commented 4 years ago

When i seek to some position , progress position gets 0 and then after some renders it gives the actual position

ovy9086 commented 4 years ago

@Guichaguri can we get a new RC maybe published for V2 ? 🤔

ithustle commented 4 years ago

A contribution: When I use a Slidercomponent to update progress bar, on onValueChangeproperty if I put TrackPlayer.seekTo(value), the state is updated shaking the component because is re-render.

Maybe you should look out this issue.

vbspace commented 4 years ago

@ithustle I came to open an issue for that. Thank you pointing that out. The all Component is re-rendering after calling TrackPlayer.seekTo(value).

@Guichaguri is it possible to tell when are we having the repeat and shuffle options ? I would like to become a contributor.

fernandopascoalbr commented 4 years ago

background controls is not running [ios], someone can help me?

FrankFundel commented 4 years ago

background controls not working and "Ability to use player as a single track player - without the queue functionality" highly requested.

fernandopascoalbr commented 4 years ago

background controls not working and "Ability to use player as a single track player - without the queue functionality" highly requested.

Background controls work only on android

ithustle commented 4 years ago

Did you guys, @fernando-pascoal and @frenkie, activated Background feature on Xcode? It works for me both android and IOS

FrankFundel commented 4 years ago

Yes I enabled Background mode and background processing

ithustle commented 4 years ago

Hum.. weird. Try to reinstall (remove and add again). But make sure you are using 2.0.0-rc13 version

hoseineghbal commented 4 years ago

useProgress is not work and not found in library and show error ...

{"line":56,"column":58,"sourceURL":"http://localhost:8081/src/components/core/media/bottom_player.bundle?platform=ios&dev=true&minify=false&modulesOnly=true&runModule=false&shallow=true"}

cwilby commented 4 years ago

For remote controls (notifications, control bar) to work on iOS and Android, be sure to use the new Capability enum added in v2 and not the old SHOUT_CASE capabilities from v1.

Example (works on my device)

./react/screens/Player.js

await TrackPlayer.updateOptions({
  capabilities: [
    Capability.Play,
    Capability.Pause,
    Capability.Stop,
    Capability.SkipToNext,
    Capability.SkipToPrevious
  ]
});

./service.js

import TrackPlayer, { Event } from "react-native-track-player";

module.exports = async function playerService() {
  TrackPlayer.addEventListener(Event.RemotePlay, () => TrackPlayer.play());
  TrackPlayer.addEventListener(Event.RemotePause, () => TrackPlayer.pause());
  TrackPlayer.addEventListener(Event.RemoteStop, () => TrackPlayer.destroy());
  TrackPlayer.addEventListener(Event.RemoteNext, () => TrackPlayer.skipToNext());
  TrackPlayer.addEventListener(Event.RemotePrevious, () => TrackPlayer.skipToPrevious());
};

./index.js

import { AppRegistry } from "react-native";
import TrackPlayer from "react-native-track-player";

import App from "./App";

AppRegistry.registerComponent("my-app", () => App);
TrackPlayer.registerPlaybackService(() => require("./service"));
FrankFundel commented 4 years ago

@ithustle, @cwilby tried now reinstalling and with the new Enum but still not working.

FrankFundel commented 4 years ago

I figured out now: It works when I refresh the App twice, but after calling stop() or reset() it does not work again.

cwilby commented 4 years ago

Could be a lifecycle issue, I think if you call TrackPlayer.destroy you have to call TrackPlayer.setup and TrackPlayer.updateOptions.

I think I'm running into the same thing, will add more if it happens again.

FrankFundel commented 4 years ago

Even if i don't call stop(), reset() or destory() I have to refresh twice to make background mode work.

ithustle commented 4 years ago

@Guichaguri and @dcvz , why progress.position doesn't work when app goes in background mode? Another thing ... is it supposed Capability.SeekTo make to appears seek component on Media Controls?

ithustle commented 4 years ago

Why reset() change playback-track-changed on Android?

vjhameed commented 4 years ago

Hi

I can't get the notifications to appear on ios 13.3 using iPhone 8 simulator. I have followed the complete guide but it is still not working.

"react-native-track-player": "^2.0.0-rc13"
"react-native": "0.62.2",

Below is my code to setup the player and play the track

async componentDidMount() { await TrackPlayer.setupPlayer().then(() => { // The player is ready to be used });

await TrackPlayer.updateOptions({
  capabilities: [
    Capability.Play,
    Capability.Pause,
    Capability.Stop,
    Capability.SkipToNext,
    Capability.SkipToPrevious,
  ],
});

var track = {
  id: '123456', // Must be a string, required
  url: 'https://audione-media.storage.googleapis.com/1586767768179_mp3', // Load media from the network
  title: 'Avaritia',
  artist: 'deadmau5',
  album: 'while(1<2)',
  genre: 'Progressive House, Electro House',
  date: '2014-05-20T07:00:00+00:00', // RFC 3339
  artwork: 'http://example.com/avaritia.png', // Load artwork from the network
};

TrackPlayer.add(track).then(async function () {
  // The tracks were added

  // State is one of STATE_NONE, STATE_PLAYING, STATE_PAUSED, STATE_STOPPED, STATE_BUFFERING
  let state = await TrackPlayer.getState();
  console.log(state);
  let trackId = await TrackPlayer.getCurrentTrack();
  console.log(trackId);
  // let trackObject = await TrackPlayer.getTrack(trackId);

  // Position, buffered position and duration return values in seconds
  let position = await TrackPlayer.getPosition();
  let buffered = await TrackPlayer.getBufferedPosition();
  let duration = await TrackPlayer.getDuration();

  // TrackPlayer.play();
});

}

I have been going round and round in circles for almost two weeks. Please some help would be really appreciated.

ithustle commented 4 years ago

@vjhameed , try use a real device (iPhone). On simulator doesn’t appear

Sent with GitHawk

VictorKolb commented 4 years ago

Hi! On version rc-13 controls in IOS lock screen disappear after TrackPlayer.skip(trackId). :(

ithustle commented 4 years ago

Hi! For some reason that I unknow, await TrackPlayer.setupPlayer({}) is returning null. And documentation page is not showing

curiousdustin commented 4 years ago

And documentation page is not showing

@Guichaguri is working on moving the documentation to a new domain.

ithustle commented 4 years ago

@Guichaguri is working on moving the documentation to a new domain.

Cool. await TrackPlayer.setupPlayer({}) is not working... play is not working

VictorKolb commented 4 years ago

Hi! On version rc-13 controls in IOS lock screen disappear after TrackPlayer.skip(trackId). :(

Guys, it is known bug or need to create issue to more details?