---
title: "setEndTime(_:forItemWithStoreID:)"
framework: mediaplayer
role: symbol
role_heading: Instance Method
path: "mediaplayer/mpmusicplayerstorequeuedescriptor/setendtime(_:foritemwithstoreid:)"
---

# setEndTime(_:forItemWithStoreID:)

Sets the time the designated store item is to stop playing.

## Declaration

```swift
func setEndTime(_ endTime: TimeInterval, forItemWithStoreID storeID: String)
```

## Parameters

- `endTime`: The doc://com.apple.documentation/documentation/Foundation/TimeInterval describing when the store item stops playing.
- `storeID`: The store identifier associated with the item in the queue that has a changed end time.

## See Also

### Setting start and end times

- [setStartTime(_:forItemWithStoreID:)](mediaplayer/mpmusicplayerstorequeuedescriptor/setstarttime(_:foritemwithstoreid:).md)
