@maccesar/titools 4.4.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +10 -13
  2. package/package.json +1 -1
  3. package/skills/purgetss/SKILL.md +4 -9
  4. package/skills/ti-api/references/api-core.md +24 -69
  5. package/skills/ti-api/references/api-data-network.md +18 -63
  6. package/skills/ti-api/references/api-media.md +225 -107
  7. package/skills/ti-api/references/api-modules-coremotion-urlsession.md +6 -20
  8. package/skills/ti-api/references/api-modules-map.md +45 -58
  9. package/skills/ti-api/references/api-modules-nfc.md +23 -56
  10. package/skills/ti-api/references/api-modules-social-misc.md +23 -3
  11. package/skills/ti-api/references/api-ui-android.md +16 -37
  12. package/skills/ti-api/references/api-ui-extras.md +106 -87
  13. package/skills/ti-api/references/api-ui-lists.md +103 -57
  14. package/skills/ti-api/references/api-ui-text-input.md +13 -39
  15. package/skills/ti-api/references/api-ui-windows-navigation.md +95 -93
  16. package/skills/ti-api/references/api-xml-global.md +25 -60
  17. package/skills/ti-expert/SKILL.md +8 -11
  18. package/skills/ti-expert/references/adaptive-layouts.md +15 -43
  19. package/skills/ti-expert/references/alloy-builtins.md +1 -4
  20. package/skills/ti-expert/references/alloy-structure.md +4 -12
  21. package/skills/ti-expert/references/anti-patterns.md +16 -45
  22. package/skills/ti-expert/references/code-conventions.md +2 -6
  23. package/skills/ti-expert/references/controller-patterns.md +1 -3
  24. package/skills/ti-expert/references/examples.md +3 -10
  25. package/skills/ti-expert/references/feedback-migration.md +17 -39
  26. package/skills/ti-expert/references/feedback-surfaces.md +19 -48
  27. package/skills/ti-expert/references/feedback-widget-contracts.md +31 -69
  28. package/skills/ti-expert/references/file-type-association.md +265 -0
  29. package/skills/ti-expert/references/migration-patterns.md +8 -18
  30. package/skills/ti-expert/references/sharing.md +227 -0
  31. package/skills/ti-expert/references/theming.md +20 -45
  32. package/skills/ti-guides/SKILL.md +5 -1
  33. package/skills/ti-guides/references/coding-best-practices.md +1 -2
  34. package/skills/ti-guides/references/compatibility-matrix.md +89 -0
  35. package/skills/ti-guides/references/resources.md +7 -1
  36. package/skills/ti-guides/references/sdk-release-notes.md +75 -0
  37. package/skills/ti-guides/references/style-and-conventions.md +1 -2
  38. package/skills/ti-howtos/references/debugging-profiling.md +1 -2
  39. package/skills/ti-howtos/references/location-and-maps.md +1 -2
  40. package/skills/ti-howtos/references/using-modules.md +1 -2
  41. package/skills/ti-howtos/references/web-content-integration.md +1 -2
  42. package/skills/ti-howtos/references/webpack-build-pipeline.md +1 -2
  43. package/skills/ti-ui/references/listviews-and-performance.md +5 -10
  44. package/skills/ti-ui/references/orientation.md +1 -2
  45. package/skills/ti-ui/references/scrolling-views.md +7 -1
@@ -21,17 +21,7 @@
21
21
  > Platforms: both
22
22
  > Type: module
23
23
 
24
- The Media module is used to access the device's media-related functionality, such
25
- as using the device's camera and photo gallery, playing media files, or recording
26
- audio or video.
27
- For examples of using the Media APIs, refer to the
28
- [Working with Media APIs guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Working_with_Media_APIs/)
29
- in addition to the other media submodule API documentation.
30
- **Note**: Some third party Android camera apps may choose to ignore video recording quality
31
- settings. If you wish to specifically set the video quality, don't assume
32
- `EXTRA_VIDEO_QUALITY` intent will be respected by the camera app and use Titanium's built-in
33
- camera window which can be used to assign the `overlay` property when calling the
34
- `showCamera()` method.
24
+ The Media module is used to access the device's media-related functionality, such as using the device's camera and photo gallery, playing media files, or recording audio or video. For examples of using the Media APIs, refer to the [Working with Media APIs guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Working_with_Media_APIs/) in addition to the other media submodule API documentation. **Note**: Some third party Android camera apps may choose to ignore video recording quality settings. If you wish to specifically set the video quality, don't assume `EXTRA_VIDEO_QUALITY` intent will be respected by the camera app and use Titanium's built-in camera window which can be used to assign the `overlay` property when calling the `showCamera()` method.
35
25
 
36
26
  ### Properties (unique: 28/178)
37
27
  | Property | Type | Default | Platform | Description |
@@ -170,75 +160,227 @@ camera window which can be used to assign the `overlay` property when calling th
170
160
 
171
161
  ### Related Types
172
162
 
163
+ > **Warning:** `success` receives a different shape depending on `allowMultiple`. With a single selection it is a `CameraMediaItemType` and the blob is on `e.media`. With `allowMultiple: true` it is a `CameraMediaMultipleItemsType` and there is no `e.media` at all — the blobs live under `e.images`, `e.videos` and `e.livePhotos`, each entry itself a `CameraMediaItemType`.
164
+
165
+ #### CameraMediaItemType
166
+ > A media object from the camera or photo gallery.
167
+
168
+ | Property | Type | Platform | Description |
169
+ |----------|------|----------|-------------|
170
+ | success | Boolean | both | Indicates if the operation succeeded. Returns `true`. |
171
+ | error | String | both | Error message, if any returned. |
172
+ | code | Number | both | Error code. Returns 0. |
173
+ | media | Ti.Blob | both | The media object, as a [Blob](Titanium.Blob). |
174
+ | path | String | android | The path of the image when returning data from the gallery. |
175
+ | mediaType | String | both | The type of media, either `MEDIA_TYPE_PHOTO`, `MEDIA_TYPE_LIVEPHOTO` or `MEDIA_… |
176
+ | cropRect | Dimension | both | Simple object defining the user's selected crop rectangle, or `null` if the use… |
177
+ | previewRect | Size | android | Simple object defining the preview image size. This will be undefined when cust… |
178
+ | livePhoto | Ti.UI.iOS.LivePhoto | both | The live photo object, as a <Titanium.UI.iOS.LivePhoto> and `undefined` if no l… |
179
+
180
+ #### CameraMediaMultipleItemsType
181
+ > A media object from photo gallery when <Titanium.Media.allowMultiple> is `true`.
182
+
183
+ | Property | Type | Platform | Description |
184
+ |----------|------|----------|-------------|
185
+ | success | Boolean | both | Indicates if the operation succeeded. Returns `true`. |
186
+ | error | String | both | Error message, if any returned. |
187
+ | code | Number | both | Error code. Returns 0. |
188
+ | images | Array<CameraMediaItemType> | both | The list of selected images. |
189
+ | livePhotos | Array<Titanium.UI.iOS.LivePhoto> | ios | The list of selected live photo objects. |
190
+ | videos | Array<CameraMediaItemType> | both | The list of selected videos. |
191
+
192
+ #### CameraOpen
193
+ > Parameters of the open callback
194
+
195
+ | Property | Type | Platform | Description |
196
+ |----------|------|----------|-------------|
197
+ | width | Number | android | Width of the preview camera image |
198
+ | height | Number | android | Height of the preview camera image |
199
+
173
200
  #### CameraOptionsType
174
201
  > Simple object for specifying options to [showCamera](Titanium.Media.showCamera).
175
202
 
176
- | Property | Type | Description |
177
- |----------|------|-------------|
178
- | success | Callback<CameraMediaItemType> | Function to call when the camera is closed after a successful capture/selection. |
179
- | open | Callback<CameraOpen> | Function to call when the camera is shown |
180
- | error | Callback<FailureResponse> | Function to call upon receiving an error. |
181
- | cancel | Callback<FailureResponse> | Function to call if the user presses the cancel button. |
182
- | recording | Callback<CameraRecordingCallback> | Function to call during recording. Returns size and duration. |
183
- | androidback | Callback<FailureResponse> | Function to call if the user presses the back button. |
184
- | autohide | Boolean | Specifies if the camera should be hidden automatically after the media capture … |
185
- | animated | Boolean | Specifies if the dialog should be animated upon showing and hiding. |
186
- | saveToPhotoGallery | Boolean | Specifies if the media should be saved to the photo gallery upon successful cap… |
187
- | allowEditing | Boolean | Specifies if the media should be editable after capture/selection. |
188
- | zoomEnabled | Boolean | Specifies if pinch to zoom is enabled or not. |
189
- | targetImageWidth | Number | Maximum width of the saved image. Depending on your phone and your value this m… |
190
- | targetImageHeight | Number | Maximum height of the saved image. Depending on your phone and your value this … |
191
- | mediaTypes | Array<String> | Array of media type constants to allow. Note: If you want to select live photos… |
192
- | videoMaximumDuration | Number | Maximum duration (in milliseconds) to allow video capture before completing. |
193
- | videoQuality | Number | Constant to indicate the video quality during capture. |
194
- | whichCamera | Number | Opens the camera with the specified camera direction. |
195
- | showControls | Boolean | Indicates if the built-in camera controls should be displayed. |
196
- | overlay | Ti.UI.View | View to added as an overlay to the camera UI (on top). |
197
- | transform | Ti.UI.Matrix2D | Transformation matrix to apply to the camera or photogallery view. |
198
- | inPopOver | Boolean | Show the camera in a popover. |
199
- | popoverView | Ti.UI.View | View to position the camera or photo gallery popover on top of. |
200
- | arrowDirection | Number | Controls the type of arrow and position of the popover. |
201
- | autorotate | Boolean | Determines if the camera preview should rotate or not. |
203
+ | Property | Type | Platform | Description |
204
+ |----------|------|----------|-------------|
205
+ | success | Callback<CameraMediaItemType> | both | Function to call when the camera is closed after a successful capture/selection. |
206
+ | open | Callback<CameraOpen> | android | Function to call when the camera is shown |
207
+ | error | Callback<FailureResponse> | both | Function to call upon receiving an error. |
208
+ | cancel | Callback<FailureResponse> | both | Function to call if the user presses the cancel button. |
209
+ | recording | Callback<CameraRecordingCallback> | android | Function to call during recording. Returns size and duration. |
210
+ | androidback | Callback<FailureResponse> | android | Function to call if the user presses the back button. |
211
+ | autohide | Boolean | both | Specifies if the camera should be hidden automatically after the media capture … |
212
+ | animated | Boolean | ios | Specifies if the dialog should be animated upon showing and hiding. |
213
+ | saveToPhotoGallery | Boolean | both | Specifies if the media should be saved to the photo gallery upon successful cap… |
214
+ | allowEditing | Boolean | ios | Specifies if the media should be editable after capture/selection. |
215
+ | zoomEnabled | Boolean | android | Specifies if pinch to zoom is enabled or not. |
216
+ | targetImageWidth | Number | android | Maximum width of the saved image. Depending on your phone and your value this m… |
217
+ | targetImageHeight | Number | android | Maximum height of the saved image. Depending on your phone and your value this … |
218
+ | mediaTypes | Array<String> | both | Array of media type constants to allow. Note: If you want to select live photos… |
219
+ | videoMaximumDuration | Number | both | Maximum duration (in milliseconds) to allow video capture before completing. |
220
+ | videoQuality | Number | both | Constant to indicate the video quality during capture. |
221
+ | whichCamera | Number | android | Opens the camera with the specified camera direction. |
222
+ | showControls | Boolean | ios | Indicates if the built-in camera controls should be displayed. |
223
+ | overlay | Ti.UI.View | both | View to added as an overlay to the camera UI (on top). |
224
+ | transform | Ti.UI.Matrix2D | ios | Transformation matrix to apply to the camera or photogallery view. |
225
+ | inPopOver | Boolean | ios | Show the camera in a popover. |
226
+ | popoverView | Ti.UI.View | ios | View to position the camera or photo gallery popover on top of. |
227
+ | arrowDirection | Number | ios | Controls the type of arrow and position of the popover. |
228
+ | autorotate | Boolean | ios | Determines if the camera preview should rotate or not. |
229
+
230
+ #### CameraRecordingCallback
231
+ > Infos about the current video recording
232
+
233
+ | Property | Type | Platform | Description |
234
+ |----------|------|----------|-------------|
235
+ | duration | Number | both | Length in milliseconds |
236
+ | size | Number | both | Size of the video in bytes |
237
+
238
+ #### FailureResponse
239
+ > Properties used in any event or callback which needs to report a failure.
240
+
241
+ | Property | Type | Platform | Description |
242
+ |----------|------|----------|-------------|
243
+ | success | Boolean | both | Indicates if the operation succeeded. Returns `false`. |
244
+ | error | String | both | Error message, if any returned. |
245
+ | code | Number | both | Error code. Returns a non-zero value. |
246
+
247
+ #### MediaAuthorizationResponse
248
+ > Argument passed to the callback when a request finishes successfully or erroneously.
249
+
250
+ | Property | Type | Platform | Description |
251
+ |----------|------|----------|-------------|
252
+ | success | Boolean | both | Indicates if the operation succeeded. |
253
+ | error | String | both | Error message, if any returned. |
254
+ | code | Number | both | Error code. Returns 0 if `success` is `true`. |
255
+
256
+ #### MediaQueryInfoType
257
+ > A full query descriptor for a filtering predicate.
258
+
259
+ | Property | Type | Platform | Description |
260
+ |----------|------|----------|-------------|
261
+ | value | Number \| String \| Boolean | ios | The value for the given predicate. See the descriptions in <MediaQueryType> for… |
262
+ | exact | Boolean | ios | Whether or not the predicate is for an exact match. The default is `true`. |
202
263
 
203
264
  #### MediaQueryType
204
265
  > A specifier for a media library query. By default, filters perform an exact match.
205
266
 
206
- | Property | Type | Description |
207
- |----------|------|-------------|
208
- | grouping | Number | A constant that specifies the ordering of the result array. |
209
- | mediaType | MediaQueryInfoType \| Number | The media type to filter on. |
210
- | title | MediaQueryInfoType \| String | The title to filter on. Value should be a String. |
211
- | albumTitle | MediaQueryInfoType \| String | The album title to filter on. Value should be a String. |
212
- | artist | MediaQueryInfoType \| String | The artist to filter on. Value should be a String. |
213
- | albumArtist | MediaQueryInfoType \| String | The album artist to filter on. Value should be a String. |
214
- | genre | MediaQueryInfoType \| String | The genre to filter on. Value should be a String. |
215
- | composer | MediaQueryInfoType \| String | The composer to filter on. Value should be a String. |
216
- | isCompilation | MediaQueryInfoType \| Boolean | Filter by whether or not the item is a compilation. The value should be a Boole… |
217
- | playCount | MediaQueryInfoType \| Number | The play count to filter on. Value should be a Number. |
218
- | persistentID | MediaQueryInfoType \| Number | The persistent ID to filter on. Value should be a Number. |
219
- | albumPersistentID | MediaQueryInfoType \| Number | The album persistent ID to filter on. Value should be a Number. |
220
- | albumArtistPersistentID | MediaQueryInfoType \| Number | The album artist persistent ID to filter on. Value should be a Number. |
221
- | genrePersistentID | MediaQueryInfoType \| Number | The genre persistent ID to filter on. Value should be a Number. |
222
- | composerPersistentID | MediaQueryInfoType \| Number | The composer persistent ID to filter on. Value should be a Number. |
223
- | isCloudItem | MediaQueryInfoType \| Boolean | Filter by whether or not the item is a cloud item. Value should be a Boolean. |
224
- | hasProtectedAsset | MediaQueryInfoType \| Boolean | Filter by whether or not the item is a protected asset. Value should be a Boole… |
225
- | podcastTitle | MediaQueryInfoType \| String | The podcast title to filter on. Value should be a String. |
226
- | podcastPersistentID | MediaQueryInfoType \| Number | The podcast persistent ID to filter on. Value should be a Number. |
267
+ | Property | Type | Platform | Description |
268
+ |----------|------|----------|-------------|
269
+ | grouping | Number | ios | A constant that specifies the ordering of the result array. |
270
+ | mediaType | MediaQueryInfoType \| Number | ios | The media type to filter on. |
271
+ | title | MediaQueryInfoType \| String | ios | The title to filter on. Value should be a String. |
272
+ | albumTitle | MediaQueryInfoType \| String | ios | The album title to filter on. Value should be a String. |
273
+ | artist | MediaQueryInfoType \| String | ios | The artist to filter on. Value should be a String. |
274
+ | albumArtist | MediaQueryInfoType \| String | ios | The album artist to filter on. Value should be a String. |
275
+ | genre | MediaQueryInfoType \| String | ios | The genre to filter on. Value should be a String. |
276
+ | composer | MediaQueryInfoType \| String | ios | The composer to filter on. Value should be a String. |
277
+ | isCompilation | MediaQueryInfoType \| Boolean | ios | Filter by whether or not the item is a compilation. The value should be a Boole… |
278
+ | playCount | MediaQueryInfoType \| Number | ios | The play count to filter on. Value should be a Number. |
279
+ | persistentID | MediaQueryInfoType \| Number | ios | The persistent ID to filter on. Value should be a Number. |
280
+ | albumPersistentID | MediaQueryInfoType \| Number | ios | The album persistent ID to filter on. Value should be a Number. |
281
+ | albumArtistPersistentID | MediaQueryInfoType \| Number | ios | The album artist persistent ID to filter on. Value should be a Number. |
282
+ | genrePersistentID | MediaQueryInfoType \| Number | ios | The genre persistent ID to filter on. Value should be a Number. |
283
+ | composerPersistentID | MediaQueryInfoType \| Number | ios | The composer persistent ID to filter on. Value should be a Number. |
284
+ | isCloudItem | MediaQueryInfoType \| Boolean | ios | Filter by whether or not the item is a cloud item. Value should be a Boolean. |
285
+ | hasProtectedAsset | MediaQueryInfoType \| Boolean | ios | Filter by whether or not the item is a protected asset. Value should be a Boole… |
286
+ | podcastTitle | MediaQueryInfoType \| String | ios | The podcast title to filter on. Value should be a String. |
287
+ | podcastPersistentID | MediaQueryInfoType \| Number | ios | The podcast persistent ID to filter on. Value should be a Number. |
227
288
 
228
289
  #### MusicLibraryOptionsType
229
290
  > Simple object for specifying options to [openMusicLibrary](Titanium.Media.openMusicLibrary).
230
291
 
231
- | Property | Type | Description |
232
- |----------|------|-------------|
233
- | success | Callback<MusicLibraryResponseType> | Function to call when the music library selection is made. |
234
- | error | Callback<FailureResponse> | Function to call upon receiving an error. |
235
- | cancel | Callback<FailureResponse> | Function to call if the user presses the cancel button. |
236
- | autohide | Boolean | Specifies that the library should be hidden automatically after media selection… |
237
- | animated | Boolean | Boolean if the dialog should be animated when showing and hiding. |
238
- | mediaTypes | Number \| Array<Number> | An array of media type constants defining selectable media. |
239
- | allowMultipleSelections | Boolean | Set to `true` to allow the user to select multiple items from the library. |
240
-
241
- *Plus 2 more types: *
292
+ | Property | Type | Platform | Description |
293
+ |----------|------|----------|-------------|
294
+ | success | Callback<MusicLibraryResponseType> | ios | Function to call when the music library selection is made. |
295
+ | error | Callback<FailureResponse> | ios | Function to call upon receiving an error. |
296
+ | cancel | Callback<FailureResponse> | ios | Function to call if the user presses the cancel button. |
297
+ | autohide | Boolean | ios | Specifies that the library should be hidden automatically after media selection… |
298
+ | animated | Boolean | ios | Boolean if the dialog should be animated when showing and hiding. |
299
+ | mediaTypes | Number \| Array<Number> | ios | An array of media type constants defining selectable media. |
300
+ | allowMultipleSelections | Boolean | ios | Set to `true` to allow the user to select multiple items from the library. |
301
+
302
+ #### MusicLibraryResponseType
303
+ > Simple object passed to the [openMusicLibrary](Titanium.Media.openMusicLibrary) `success` callback function.
304
+
305
+ | Property | Type | Platform | Description |
306
+ |----------|------|----------|-------------|
307
+ | representative | Ti.Media.Item | both | A single representative of the selected items. |
308
+ | items | Array<Titanium.Media.Item> | both | A list of all the items chosen by the user. |
309
+ | types | Number | both | Media types in this collection, represented as the bitwise OR of the media type… |
310
+
311
+ #### PhotoGalleryOptionsType
312
+ > Simple object for specifying options to [openPhotoGallery](Titanium.Media.openPhotoGallery).
313
+
314
+ | Property | Type | Platform | Description |
315
+ |----------|------|----------|-------------|
316
+ | success | Callback<CameraMediaItemType> \| Callback<CameraMediaMultipleItemsType> | both | Function to call when the photo gallery is closed after a successful selection. |
317
+ | error | Callback<FailureResponse> | both | Function to call upon receiving an error. |
318
+ | cancel | Callback<FailureResponse> | both | Function to call if the user presses the cancel button. |
319
+ | autohide | Boolean | ios | Specifies if the photo gallery should be hidden automatically after the media s… |
320
+ | animated | Boolean | ios | Specifies if the dialog should be animated upon showing and hiding. |
321
+ | allowEditing | Boolean | ios | Specifies if the media should be editable after capture/selection. |
322
+ | mediaTypes | Array<String> | both | Array of media type constants to allow. Live photos is only supported on the iO… |
323
+ | popoverView | Ti.UI.View | ios | View to position the photo gallery popover on top of. |
324
+ | arrowDirection | Number | ios | Controls the type of arrow and position of the popover. |
325
+ | allowMultiple | Boolean | both | Specifies if the user should be able to select multiple photos. |
326
+ | maxImages | Boolean | android | Specifies the number of images a user can select at maximum. |
327
+ | pathOnly | Boolean | android | Do not include the blob in the result |
328
+ | selectionLimit | Boolean | ios | Specifies number of media item that can be selected. |
329
+ | allowTranscoding | Boolean | ios | Specifies if the video should be transcoded (using highest quality preset) . If… |
330
+
331
+ #### PreviewImageError
332
+ > The parameter passed to the `error` callback of <PreviewImageOptions>.
333
+
334
+ | Property | Type | Platform | Description |
335
+ |----------|------|----------|-------------|
336
+ | success | Boolean | android | Indicates if the operation succeeded. Returns `false`. |
337
+ | error | String | android | Error message, if any returned. |
338
+ | code | Number | android | Error code, if applicable. |
339
+ | message | String | android | Description of the error. |
340
+
341
+ #### PreviewImageOptions
342
+ > Options passed to <Titanium.Media.previewImage>.
343
+
344
+ | Property | Type | Platform | Description |
345
+ |----------|------|----------|-------------|
346
+ | image | Ti.Blob | android | The image to preview. Must be a blob based on a file, such as from <Titanium.Fi… |
347
+ | success | Callback<SuccessResponse> | android | Function to be called back if the preview succeeds. No info is passed. |
348
+ | error | Callback<PreviewImageError> | android | Function called back if the preview fails. Check the `message` property of pass… |
349
+
350
+ #### RouteDescription
351
+ > An Object describing the current audio route.
352
+
353
+ | Property | Type | Platform | Description |
354
+ |----------|------|----------|-------------|
355
+ | inputs | Array<String> | ios | An Array of current input ports for the session. See the `AUDIO_SESSION_PORT` c… |
356
+ | outputs | Array<String> | ios | An Array of current output ports for the session. See the `AUDIO_SESSION_PORT` … |
357
+
358
+ #### ScreenshotResult
359
+ > The parameter passed to the <Titanium.Media.takeScreenshot> callback.
360
+
361
+ | Property | Type | Platform | Description |
362
+ |----------|------|----------|-------------|
363
+ | media | Ti.Blob | both | The screenshot image. |
364
+
365
+ #### SuccessResponse
366
+ > Properties used in any event or callback which needs to report a success.
367
+
368
+ | Property | Type | Platform | Description |
369
+ |----------|------|----------|-------------|
370
+ | success | Boolean | both | Indicates if the operation succeeded. Returns `true`. |
371
+ | error | String | both | Error message, if any returned. |
372
+ | code | Number | both | Error code. Returns 0. |
373
+
374
+ #### RequestCameraAccessResult
375
+ > Same shape as [MediaAuthorizationResponse](#mediaauthorizationresponse): `success`, `error`, `code`.
376
+
377
+ #### RequestMusicLibraryAccessResult
378
+ > Same shape as [MediaAuthorizationResponse](#mediaauthorizationresponse): `success`, `error`, `code`.
379
+
380
+ #### RequestPhotoGalleryAccessResult
381
+ > Same shape as [MediaAuthorizationResponse](#mediaauthorizationresponse): `success`, `error`, `code`.
382
+
383
+ Also referenced by this API, documented elsewhere: `Dictionary`.
242
384
 
243
385
  ---
244
386
 
@@ -263,16 +405,9 @@ camera window which can be used to assign the `overlay` property when calling th
263
405
  > Extends Ti.Proxy
264
406
  > Platforms: both
265
407
 
266
- On Android, when you are done playing a given audio file, you must call the
267
- [release](Titanium.Media.AudioPlayer.release) method to stop buffering audio data and
268
- release associated system resources. Since 7.5.0, this method is available on iOS as well
269
- and will release all audio-player related resources. After this method has been called,
270
- the object should not be accessed anymore.
408
+ On Android, when you are done playing a given audio file, you must call the [release](Titanium.Media.AudioPlayer.release) method to stop buffering audio data and release associated system resources. Since 7.5.0, this method is available on iOS as well and will release all audio-player related resources. After this method has been called, the object should not be accessed anymore.
271
409
 
272
- On iOS, you can control how the audio stream interacts with other system sounds
273
- by setting <Titanium.Media.audioSessionCategory>. Since Titanium 7.5.0, this API
274
- uses the [AVPlayer API](https://developer.apple.com/documentation/avfoundation/avplayer) for a more modern
275
- and performant audio playback.
410
+ On iOS, you can control how the audio stream interacts with other system sounds by setting <Titanium.Media.audioSessionCategory>. Since Titanium 7.5.0, this API uses the [AVPlayer API](https://developer.apple.com/documentation/avfoundation/avplayer) for a more modern and performant audio playback.
276
411
 
277
412
  Use the <Titanium.Media.createAudioPlayer> method to create an audio player.
278
413
 
@@ -343,13 +478,9 @@ Use the <Titanium.Media.createAudioPlayer> method to create an audio player.
343
478
 
344
479
  Use the <Titanium.Media.createAudioRecorder> method to create an audio recorder.
345
480
 
346
- Ensure to request the permissions for audio-recording before starting a new record-session.
347
- This can be done by using <Titanium.Media.hasAudioRecorderPermissions> to check whether
348
- audio-permissions are granted and <Titanium.Media.requestAudioRecorderPermissions> to
349
- request audio-permissions.
481
+ Ensure to request the permissions for audio-recording before starting a new record-session. This can be done by using <Titanium.Media.hasAudioRecorderPermissions> to check whether audio-permissions are granted and <Titanium.Media.requestAudioRecorderPermissions> to request audio-permissions.
350
482
 
351
- **Android Platform Note**: On Android, you also need to include the following permission
352
- into the `<android>` section of the tiapp.xml:
483
+ **Android Platform Note**: On Android, you also need to include the following permission into the `<android>` section of the tiapp.xml:
353
484
 
354
485
 
355
486
  ### Properties (unique: 5/8)
@@ -378,13 +509,9 @@ into the `<android>` section of the tiapp.xml:
378
509
  > Extends Ti.Proxy
379
510
  > Platforms: ios
380
511
 
381
- This is a read-only object that describes a single media item, not a playlist.
382
- Titanium does not support access to playlists.
512
+ This is a read-only object that describes a single media item, not a playlist. Titanium does not support access to playlists.
383
513
 
384
- `Item` objects cannot be created explicitly. The
385
- [openMusicLibrary](Titanium.Media.openMusicLibrary) returns `Item` objects in its
386
- `success` callback function, while [queryMusicLibrary](Titanium.Media.queryMusicLibrary)
387
- returns an array of `Item` objects.
514
+ `Item` objects cannot be created explicitly. The [openMusicLibrary](Titanium.Media.openMusicLibrary) returns `Item` objects in its `success` callback function, while [queryMusicLibrary](Titanium.Media.queryMusicLibrary) returns an array of `Item` objects.
388
515
 
389
516
  ### Properties (unique: 36/38)
390
517
  | Property | Type | Default | Platform | Description |
@@ -477,14 +604,11 @@ To retrieve an instance of a MusicPlayer object, use either the
477
604
  > Extends Ti.Proxy
478
605
  > Platforms: both
479
606
 
480
- The `Sound` object loads the entire media resource in memory before playing. If you need to
481
- support streaming, use the [AudioPlayer](Titanium.Media.AudioPlayer) API.
607
+ The `Sound` object loads the entire media resource in memory before playing. If you need to support streaming, use the [AudioPlayer](Titanium.Media.AudioPlayer) API.
482
608
 
483
- You can control how the sound interacts with other system sounds
484
- by setting <Titanium.Media.audioSessionCategory>.
609
+ You can control how the sound interacts with other system sounds by setting <Titanium.Media.audioSessionCategory>.
485
610
 
486
- Use the <Titanium.Media.createSound> method to create a `Sound` object. You can play audio
487
- in any format supported by the target platform(s), as described in the following documents:
611
+ Use the <Titanium.Media.createSound> method to create a `Sound` object. You can play audio in any format supported by the target platform(s), as described in the following documents:
488
612
 
489
613
  * [Android](https://developer.android.com/guide/topics/media/media-formats#core)
490
614
  * [iOS](https://developer.apple.com/audio/)
@@ -538,10 +662,9 @@ in any format supported by the target platform(s), as described in the following
538
662
  > Extends Ti.Proxy
539
663
  > Platforms: ios
540
664
 
541
- You can use this module to provide audible system alerts.
665
+ You can use this module to provide audible system alerts.
542
666
 
543
- You can use it to play short (30 seconds or shorter) sounds. The interface does not provide level, positioning,
544
- looping, or timing control, and does not support simultaneous playback: You can play only one sound at a time.
667
+ You can use it to play short (30 seconds or shorter) sounds. The interface does not provide level, positioning, looping, or timing control, and does not support simultaneous playback: You can play only one sound at a time.
545
668
 
546
669
  This module differs from the Sound module because it honors the ringtone volume, not the Music volume.
547
670
 
@@ -568,20 +691,15 @@ Know more about [System Sound Services](https://developer.apple.com/reference/au
568
691
  > Extends Ti.UI.View
569
692
  > Platforms: both
570
693
 
571
- The video player is a native view that can be used to play videos, either stored
572
- locally or streamed from a web server. The player can occupy the full screen, or can
573
- be used as a view that can be added to other views.
694
+ The video player is a native view that can be used to play videos, either stored locally or streamed from a web server. The player can occupy the full screen, or can be used as a view that can be added to other views.
574
695
 
575
696
  Use the <Titanium.Media.createVideoPlayer> method to create a video player.
576
697
 
577
- All platforms support specifying the video content as a URL, either to a local file or
578
- a remote stream. This is done by setting the [url](Titanium.Media.VideoPlayer.url) property.
698
+ All platforms support specifying the video content as a URL, either to a local file or a remote stream. This is done by setting the [url](Titanium.Media.VideoPlayer.url) property.
579
699
 
580
700
  ### iOS Implementation Notes
581
701
 
582
- On iOS, video content can also be specified as a [Blob](Titanium.Blob) or
583
- [File](Titanium.Filesystem.File) object using the
584
- [media](Titanium.Media.VideoPlayer.media) property.
702
+ On iOS, video content can also be specified as a [Blob](Titanium.Blob) or [File](Titanium.Filesystem.File) object using the [media](Titanium.Media.VideoPlayer.media) property.
585
703
 
586
704
 
587
705
  *(See full overview in titanium-docs)*
@@ -24,19 +24,14 @@
24
24
  > Platforms: ios
25
25
  > Type: module
26
26
 
27
- The Core Motion module provides access to Apple's CoreMotion APIs. The Core Motion module provides support
28
- for monitoring various hardware sensors on iOS devices, such as the accelerometer, gyroscope, and
29
- magnetometer. The Core Motion module allows you to access the metrics provided by these sensors.
27
+ The Core Motion module provides access to Apple's CoreMotion APIs. The Core Motion module provides support for monitoring various hardware sensors on iOS devices, such as the accelerometer, gyroscope, and magnetometer. The Core Motion module allows you to access the metrics provided by these sensors.
30
28
 
31
- For instruction and examples of using the Core Motion Module, see the
32
- [Core Motion Module guide]().
29
+ For instruction and examples of using the Core Motion Module, see the [Core Motion Module guide]().
33
30
 
34
31
 
35
32
  ### Requirements
36
33
 
37
- This module only works with devices running iOS 7 and later. Not all devices have the same hardware sensors,
38
- so all features may not be available for all devices. Be sure to use the API to check the device
39
- for the existence of a feature.
34
+ This module only works with devices running iOS 7 and later. Not all devices have the same hardware sensors, so all features may not be available for all devices. Be sure to use the API to check the device for the existence of a feature.
40
35
 
41
36
  You can only test the Core Motion module on a device. The Core Motion API cannot be tested on the iOS
42
37
 
@@ -313,8 +308,7 @@ You can only test the Core Motion module on a device. The Core Motion API cannot
313
308
 
314
309
  These APIs are supported on iOS 7 and later.
315
310
 
316
- The URL session module (`com.appcelerator.urlSession`) provides the application the ability to
317
- download large content via HTTP while the application is in the background. With this module, you can
311
+ The URL session module (`com.appcelerator.urlSession`) provides the application the ability to download large content via HTTP while the application is in the background. With this module, you can
318
312
 
319
313
  1. Create a URL session and a background download task.
320
314
  2. Monitor events to check the progress of the download and session.
@@ -353,10 +347,7 @@ URL session events are monitored through the following iOS application-level eve
353
347
 
354
348
  These APIs are supported on iOS 7 and later.
355
349
 
356
- The NSURLSession class and related classes provide an API for downloading content.
357
- This API provides a rich set of delegate methods for supporting authentication and gives
358
- your app the ability to perform background downloads when your app is not running or, in iOS,
359
- while your app is suspended.
350
+ The NSURLSession class and related classes provide an API for downloading content. This API provides a rich set of delegate methods for supporting authentication and gives your app the ability to perform background downloads when your app is not running or, in iOS, while your app is suspended.
360
351
 
361
352
  [iOS Background Services guide]().
362
353
 
@@ -407,12 +398,7 @@ while your app is suspended.
407
398
 
408
399
  These APIs are supported on iOS 7 and later.
409
400
 
410
- An NSURLSessionConfiguration object defines the behavior and policies to use
411
- when uploading and downloading data using an URLSession object. When uploading
412
- or downloading data, creating a configuration object is always the first step
413
- you must take. You use this object to configure the timeout values, caching
414
- policies, connection requirements, and other types of information that you
415
- intend to use with your URLSession object.
401
+ An NSURLSessionConfiguration object defines the behavior and policies to use when uploading and downloading data using an URLSession object. When uploading or downloading data, creating a configuration object is always the first step you must take. You use this object to configure the timeout values, caching policies, connection requirements, and other types of information that you intend to use with your URLSession object.
416
402
 
417
403
  [iOS Background Services guide]().
418
404