<!--
{
  "availability" : [
    "ProVideo Encoder Extensions: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "professional_video_applications",
  "identifier" : "/documentation/professional_video_applications/CompressorExtensionEncoder/cancel(forPause:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Professional Video Applications"
    ],
    "preciseIdentifier" : "c:objc(pl)CompressorExtensionEncoder(im)cancelForPause:"
  },
  "title" : "cancel(forPause:)"
}
-->

# cancel(forPause:)

Pauses or cancels an encoding job.

```
func cancel(forPause: Bool) -> [AnyHashable : Any]!
```

## Parameters

`forPause`

When set to true, pauses an encoding job. When set to false, cancels the job.

## Return Value

`nil` if the extension does not support resuming a job where it left off. Otherwise, it returns a dictionary with attributes defining the extension’s paused state.

## Discussion

Implement this method to pause or cancel an encoding job when the Compressor app requests to do so. If the extension supports resuming from a paused state, return the extension’s current state to the Compressor app. If the extension returns `nil`, an encoding job starts from the beginning when it resumes at a later point.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)