Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-17805][TIMOB-17806] (3_4_X) Popover and Media Module refactor #6219

Merged
merged 12 commits into from
Oct 14, 2014
247 changes: 245 additions & 2 deletions apidoc/Titanium/Media/Media.yml

Large diffs are not rendered by default.

21 changes: 20 additions & 1 deletion apidoc/Titanium/UI/iPad/Popover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ description: |
property for more information.

![popover](http://img.skitch.com/20100406-pmssjk1a3a65s6ui8qnbqi59c4.png)
extends: Titanium.UI.View
extends: Titanium.Proxy
since: "1.2"
excludes: {
events: [longclick],
Expand All @@ -38,8 +38,10 @@ events:

methods:
- name: add
summary: Adds a child to the popover.
deprecated:
since: "3.2.0"
removed: "3.4.1"
notes: Use the <Titanium.UI.iPad.Popover.contentView> property to modify the content of the popover.

- name: hide
Expand All @@ -50,8 +52,10 @@ methods:
type: PopoverParams

- name: remove
summary: Removes a child from the popover.
deprecated:
since: "3.2.0"
removed: "3.4.1"
notes: Use the <Titanium.UI.iPad.Popover.contentView> property to modify the content of the popover.

- name: show
Expand Down Expand Up @@ -103,10 +107,16 @@ properties:

- name: height
summary: Height of the popover.
deprecated:
since: "3.4.1"
notes: This property is deprecated. Set the height on the [contentView](Titanium.UI.iPad.Popover.contentView) property instead.
type: [Number, String]

- name: leftNavButton
summary: Left button in the navigation area of the popover.
deprecated:
since: "3.4.1"
notes: This property is no loner supported.
description: |
Ignored when [contentView](Titanium.UI.iPad.Popover.contentView) is set.

Expand All @@ -132,6 +142,9 @@ properties:

- name: rightNavButton
summary: Right button in the navigation area of the popover.
deprecated:
since: "3.4.1"
notes: This property is no loner supported.
description: |
Ignored when [contentView](Titanium.UI.iPad.Popover.contentView) is set.

Expand All @@ -150,12 +163,18 @@ properties:

- name: title
summary: Title of the navigation area of the popover.
deprecated:
since: "3.4.1"
notes: This property is no loner supported.
description: |
Ignored when [contentView](Titanium.UI.iPad.Popover.contentView) is set.
type: String

- name: width
summary: Width of the popover.
deprecated:
since: "3.4.1"
notes: This property is deprecated. Set the width on the [contentView](Titanium.UI.iPad.Popover.contentView) property instead.
type: [Number, String]

examples:
Expand Down
74 changes: 45 additions & 29 deletions iphone/Classes/MediaModule.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved.
* Copyright (c) 2009-2014 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
Expand All @@ -16,9 +16,10 @@
@interface MediaModule : TiModule
<
UINavigationControllerDelegate,
UIImagePickerControllerDelegate,
UIImagePickerControllerDelegate,
MPMediaPickerControllerDelegate,
UIPopoverControllerDelegate,
UIPopoverPresentationControllerDelegate,
UIVideoEditorControllerDelegate
> {
@private
Expand Down Expand Up @@ -48,23 +49,20 @@
KrollCallback *editorErrorCallback;
KrollCallback *editorCancelCallback;
UIPopoverArrowDirection arrowDirection;
UIInterfaceOrientation oldOrientation;
UIInterfaceOrientation newOrientation;
BOOL isPresenting;
BOOL isPopoverSpecified;
}

+(NSDictionary*)itemProperties;
+(NSDictionary*)filterableItemProperties;

@property(nonatomic,readwrite,retain) UIView *popoverView;
@property(nonatomic,readonly) CGFloat volume;
@property(nonatomic,readonly) CGFloat peakMicrophonePower;
@property(nonatomic,readonly) CGFloat averageMicrophonePower;
@property(nonatomic,readonly) NSInteger audioLineType;
@property(nonatomic,readonly) BOOL audioPlaying;
@property(nonatomic,readonly) BOOL isCameraSupported;
@property(nonatomic,readwrite,retain) id popoverView;
@property(nonatomic,readonly) NSNumber* volume;
@property(nonatomic,readonly) NSNumber* peakMicrophonePower;
@property(nonatomic,readonly) NSNumber* averageMicrophonePower;
@property(nonatomic,readonly) NSDictionary* currentRoute;
@property(nonatomic,readonly) NSNumber* audioPlaying;
@property(nonatomic,readonly) NSNumber* isCameraSupported;
@property(nonatomic, assign) NSNumber* audioSessionMode;
@property(nonatomic, assign) NSString* audioSessionCategory;
@property(nonatomic,readonly) TiMediaMusicPlayer* systemMusicPlayer;
@property(nonatomic,readonly) TiMediaMusicPlayer* appMusicPlayer;

Expand All @@ -88,7 +86,7 @@
@property(nonatomic,readonly) NSNumber* QUALITY_MEDIUM;
@property(nonatomic,readonly) NSNumber* QUALITY_LOW;
@property(nonatomic,readonly) NSNumber* QUALITY_640x480;

@property(nonatomic,readonly) NSArray* availableCameraMediaTypes;
@property(nonatomic,readonly) NSArray* availablePhotoMediaTypes;
@property(nonatomic,readonly) NSArray* availablePhotoGalleryMediaTypes;
Expand All @@ -104,17 +102,6 @@
@property(nonatomic,readonly) NSString* MEDIA_TYPE_VIDEO;
@property(nonatomic,readonly) NSString* MEDIA_TYPE_PHOTO;

@property(nonatomic,readonly) NSNumber* AUDIO_HEADSET_INOUT;
@property(nonatomic,readonly) NSNumber* AUDIO_RECEIVER_AND_MIC;
@property(nonatomic,readonly) NSNumber* AUDIO_HEADPHONES_AND_MIC;
@property(nonatomic,readonly) NSNumber* AUDIO_LINEOUT;
@property(nonatomic,readonly) NSNumber* AUDIO_HEADPHONES;
@property(nonatomic,readonly) NSNumber* AUDIO_SPEAKER;
@property(nonatomic,readonly) NSNumber* AUDIO_MICROPHONE;
@property(nonatomic,readonly) NSNumber* AUDIO_MUTED;
@property(nonatomic,readonly) NSNumber* AUDIO_UNAVAILABLE;
@property(nonatomic,readonly) NSNumber* AUDIO_UNKNOWN;

@property(nonatomic,readonly) NSNumber* AUDIO_FORMAT_LINEAR_PCM;
@property(nonatomic,readonly) NSNumber* AUDIO_FORMAT_ULAW;
@property(nonatomic,readonly) NSNumber* AUDIO_FORMAT_ALAW;
Expand All @@ -139,6 +126,12 @@
@property(nonatomic,readonly) NSNumber* AUDIO_SESSION_MODE_RECORD;
@property(nonatomic,readonly) NSNumber* AUDIO_SESSION_MODE_PLAY_AND_RECORD;

@property(nonatomic,readonly) NSString* AUDIO_SESSION_CATEGORY_AMBIENT;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_CATEGORY_SOLO_AMBIENT;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_CATEGORY_PLAYBACK;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_CATEGORY_RECORD;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_CATEGORY_PLAY_AND_RECORD;

@property(nonatomic,readonly) NSNumber* AUDIO_SESSION_OVERRIDE_ROUTE_NONE;
@property(nonatomic,readonly) NSNumber* AUDIO_SESSION_OVERRIDE_ROUTE_SPEAKER;

Expand Down Expand Up @@ -176,8 +169,6 @@



#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_2

// NOTE: these are introduced in 3.2
@property(nonatomic,readonly) NSNumber* VIDEO_CONTROL_NONE; // No controls
@property(nonatomic,readonly) NSNumber* VIDEO_CONTROL_EMBEDDED; // Controls for an embedded view
Expand Down Expand Up @@ -213,8 +204,33 @@
@property(nonatomic,readonly) NSNumber* VIDEO_FINISH_REASON_PLAYBACK_ERROR;
@property(nonatomic,readonly) NSNumber* VIDEO_FINISH_REASON_USER_EXITED;

#endif

@property(nonatomic,readonly) NSString* AUDIO_SESSION_PORT_LINEIN;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_PORT_BUILTINMIC;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_PORT_HEADSETMIC;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_PORT_LINEOUT;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_PORT_HEADPHONES;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_PORT_BLUETOOTHA2DP;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_PORT_BUILTINRECEIVER;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_PORT_BUILTINSPEAKER;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_PORT_HDMI;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_PORT_AIRPLAY;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_PORT_BLUETOOTHLE;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_PORT_BLUETOOTHHFP;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_PORT_USBAUDIO;
@property(nonatomic,readonly) NSString* AUDIO_SESSION_PORT_CARAUDIO;

//Deprecated Properties
@property(nonatomic,readonly) NSNumber* AUDIO_HEADSET_INOUT;
@property(nonatomic,readonly) NSNumber* AUDIO_RECEIVER_AND_MIC;
@property(nonatomic,readonly) NSNumber* AUDIO_HEADPHONES_AND_MIC;
@property(nonatomic,readonly) NSNumber* AUDIO_LINEOUT;
@property(nonatomic,readonly) NSNumber* AUDIO_HEADPHONES;
@property(nonatomic,readonly) NSNumber* AUDIO_SPEAKER;
@property(nonatomic,readonly) NSNumber* AUDIO_MICROPHONE;
@property(nonatomic,readonly) NSNumber* AUDIO_MUTED;
@property(nonatomic,readonly) NSNumber* AUDIO_UNAVAILABLE;
@property(nonatomic,readonly) NSNumber* AUDIO_UNKNOWN;
@property(nonatomic,readonly) NSNumber* audioLineType;

@end

Expand Down