Skip to content

Commit

Permalink
refactor(file-picker): default value for skipTranscoding is now `tr…
Browse files Browse the repository at this point in the history
…ue` (#152)
  • Loading branch information
robingenz authored Feb 28, 2024
1 parent f102470 commit 3b50f3f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/stupid-clouds-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@capawesome/capacitor-file-picker': major
---

refactor(ios): default value for `skipTranscoding` is now `true`
4 changes: 4 additions & 0 deletions packages/file-picker/BREAKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ The `multiple` property has been replaced by a new `limit` property in the `Pick

The `File` interface has been replaced by the `PickedFile` interface.

### `skipTranscoding` property

The default value of the `skipTranscoding` property has been changed to `true`.

## Version 5.x.x

### Capacitor 5
Expand Down
6 changes: 3 additions & 3 deletions packages/file-picker/ios/Plugin/FilePickerPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class FilePickerPlugin: CAPPlugin {
savedCall = call

let limit = call.getInt("limit", 0)
let skipTranscoding = call.getBool("skipTranscoding", false)
let skipTranscoding = call.getBool("skipTranscoding", true)
let ordered = call.getBool("ordered", false)

implementation?.openImagePicker(limit: limit, skipTranscoding: skipTranscoding, ordered: ordered)
Expand All @@ -74,7 +74,7 @@ public class FilePickerPlugin: CAPPlugin {
savedCall = call

let limit = call.getInt("limit", 0)
let skipTranscoding = call.getBool("skipTranscoding", false)
let skipTranscoding = call.getBool("skipTranscoding", true)
let ordered = call.getBool("ordered", false)

implementation?.openMediaPicker(limit: limit, skipTranscoding: skipTranscoding, ordered: ordered)
Expand All @@ -84,7 +84,7 @@ public class FilePickerPlugin: CAPPlugin {
savedCall = call

let limit = call.getInt("limit", 0)
let skipTranscoding = call.getBool("skipTranscoding", false)
let skipTranscoding = call.getBool("skipTranscoding", true)
let ordered = call.getBool("ordered", false)

implementation?.openVideoPicker(limit: limit, skipTranscoding: skipTranscoding, ordered: ordered)
Expand Down
2 changes: 1 addition & 1 deletion packages/file-picker/src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export interface PickMediaOptions {
*
* Only available on iOS.
*
* @default false
* @default true
* @see https://developer.apple.com/documentation/photokit/phpickerconfiguration/assetrepresentationmode/current
*/
skipTranscoding?: boolean;
Expand Down

0 comments on commit 3b50f3f

Please sign in to comment.