capacitor-plugin-playlist
capacitor-plugin-playlist copied to clipboard
Fatal error whenever I try to add an Item
I installed the plugin for ios and doing this call
Capacitor.Plugins.Playlist.addItem( { trackId: 1, assetUrl: "my-asset.mp3", albumArt: "my-album-art.jpg" } )
or this one
Capacitor.Plugins.Playlist.addItem( { item: { trackId: 1, assetUrl: "my-asset.mp3", albumArt: "my-album-art.jpg" } })
raises a fatal error on Xcode in the file CapacitorPluginPlaylist/Plugin.swift
line 43
@objc func addItem(_ call: CAPPluginCall) {
let trackInfo = call.getObject("item")
let track = AudioTrack.initWithDictionary(trackInfo)
audioPlayerImpl.addItem(track!) - Thread 12: Fatal error: Unexpectedly found nil while unwrapping an Optional value
call.resolve();
}
This is my package.json
dependencies
"dependencies": {
"@capacitor-community/facebook-login": "^5.0.0",
"@capacitor-firebase/analytics": "5.2.0",
"@capacitor-firebase/authentication": "5.2.0",
"@capacitor-firebase/messaging": "5.2.0",
"@capacitor-firebase/remote-config": "^5.2.0",
"@capacitor/android": "^5.0.0",
"@capacitor/app": "^5.0.0",
"@capacitor/assets": "^2.0.4",
"@capacitor/camera": "^5.0.0",
"@capacitor/clipboard": "^5.0.0",
"@capacitor/core": "^5.0.0",
"@capacitor/device": "^5.0.0",
"@capacitor/ios": "^5.0.0",
"@capacitor/push-notifications": "^5.0.0",
"@capacitor/share": "^5.0.0",
"@capacitor/splash-screen": "^5.0.0",
"@capawesome/capacitor-badge": "^5.0.0",
"@revenuecat/purchases-capacitor": "^7.0.0",
"capacitor-native-settings": "^5.0.0",
"capacitor-plugin-app-tracking-transparency": "^2.0.4",
"capacitor-plugin-playlist": "^0.4.0",
"capacitor-rate-app": "^4.0.3",
"firebase": "^9.18.0",
"sharp": "^0.32.0"
},