Skip to content

Commit

Permalink
Merge pull request #6217 from vishalduggal/timob-17805
Browse files Browse the repository at this point in the history
[TIMOB-17805][TIMOB-17806] Popover and Media Module refactor
  • Loading branch information
pec1985 committed Oct 14, 2014
2 parents aa05c26 + 5a21b15 commit 01803f9
Show file tree
Hide file tree
Showing 15 changed files with 2,277 additions and 1,958 deletions.
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 @@ -35,8 +35,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 @@ -47,8 +49,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 @@ -100,10 +104,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 @@ -129,6 +139,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 @@ -147,12 +160,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

0 comments on commit 01803f9

Please sign in to comment.