adding player although not working, tryting to get it more realtime with updates and updating on chagne of messages and friends

This commit is contained in:
talksik
2021-12-21 18:21:19 -08:00
parent 909cedf1a1
commit 9d673a8f67
2 changed files with 8 additions and 3 deletions
@@ -243,6 +243,8 @@ extension AuthSessionStore {
self.friendMessagesDict[returnedUser!.id!] = []
}
self.objectWillChange.send()
print("added this user to the array of users for user's circle\(returnedUser)")
}
}
@@ -305,6 +307,8 @@ extension AuthSessionStore {
} else {
self.friendMessagesDict[currMessage!.senderId]?.append(currMessage!)
}
self.objectWillChange.send()
}
return currMessage
} catch {
@@ -133,11 +133,12 @@ struct CircleGridView: View {
// start playing if there are messages to listen to
if AVPlayerItems.count > 0 {
print("have message urls that we will start listening to")
print("have message urls that we will start listening to\(AVPlayerItems)")
AVQueuePlayer(items: AVPlayerItems)
let queuePlayer = AVQueuePlayer(items: AVPlayerItems)
queuePlayer.play()
player.play()
// update the listencount and firstlistentimestamp of those messages in firestore
}