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-19040] :Replace MPMoviePlayerController in Ti.Media.VideoPlayer with AVPlayerViewController #8721

Merged
merged 49 commits into from
Nov 14, 2017
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
282ebef
Merge branch 'master' of https://github.com/appcelerator/titanium_mobile
hansemannn Jul 8, 2015
8673080
Merge branch 'master' of https://github.com/appcelerator/titanium_mobile
hansemannn Jul 10, 2015
746f1c7
[TIMOB-19040] MPMoviePlayer deprecation 1
hansemannn Jul 13, 2015
d8e8a32
[TIMOB-19040] MPMoviePlayer deprecation 1
hansemannn Jul 30, 2015
6f35822
Merge branch 'master' of https://github.com/appcelerator/titanium_mob…
hansemannn Jul 30, 2015
923cb51
[TIMOB-19040] MPMoviePlayer deprecation 2
hansemannn Aug 17, 2015
c48fd4e
Merge master
hansemannn Aug 22, 2015
d0bec83
Merge branch 'master' of https://github.com/appcelerator/titanium_mob…
hansemannn Aug 22, 2015
49e9210
[TIMOB-19040] MPMoviePlayer deprecation 3
hansemannn Aug 24, 2015
ae29a97
Restore KitchenSink app.js
hansemannn Sep 3, 2015
d5e62d6
[TIMOB-19040] MPMoviePlayer deprecation 4
hansemannn Sep 3, 2015
70d2990
[TIMOB-19040] MPMoviePlayer deprecation 4
hansemannn Sep 3, 2015
5ad6fa9
Update events / observer
hansemannn Sep 21, 2015
f5589c4
Support iOS9 PiP, resizing, play, pause & stop
hansemannn Sep 23, 2015
e5651d9
Remove deprecated methods, support autoplay
hansemannn Sep 23, 2015
f2a7575
Improve iOS8 backward compatibility
hansemannn Sep 24, 2015
e2d934e
Add another sample video to KitchenSink
hansemannn Sep 24, 2015
1ca221b
Re-support thumbnail generation
hansemannn Sep 24, 2015
b2ccd83
Re-support initialPlaybackTime, fullscreen mode
hansemannn Sep 25, 2015
9dc5fec
[TIMOB-19040] Add more functionality, adjust style
hansemannn Aug 7, 2016
bff3571
Merge branch 'master' of github.com:appcelerator/titanium_mobile into…
hansemannn Aug 8, 2016
5ad1550
Merge branch 'master' of github.com:appcelerator/titanium_mobile into…
hansemannn Dec 12, 2016
b420867
Merge branch 'PR-8194' into TIMOB-19040
vijaysingh-axway Dec 21, 2016
e18eb16
[TIMOB-19040]:iOS9: Replace MPMoviePlayerController in
vijaysingh-axway Dec 21, 2016
28503a8
[TIMOB-19040]:added showSontrols property added
vijaysingh-axway Dec 22, 2016
0539dc9
overlayview addition property exposed.
vijaysingh-axway Dec 22, 2016
1010932
[TIMOB-19040]: iOS Overlayview added and deprecated properties removed.
vijaysingh-axway Dec 27, 2016
e4375e0
[TIMOB-19040]: Deprecated properties removed.
vijaysingh-axway Dec 27, 2016
d5075a2
[TIMOB-19040]: player status property added
vijaysingh-axway Dec 27, 2016
89085e8
[TIMOB-19040]: Unnecesssary properties removed
vijaysingh-axway Dec 27, 2016
fd063a5
[TIMOB-19040]: Notification configured again as url changes
vijaysingh-axway Dec 28, 2016
942c9ef
[TIMOB-19040]: Doc updated
vijaysingh-axway Dec 30, 2016
c0dff04
Merge branch 'master' into TIMOB-19040
vijaysingh-axway Oct 31, 2017
5e563f3
Update VideoPlayer.yml
hansemannn Nov 1, 2017
d348213
Update MediaModule.m
hansemannn Nov 1, 2017
8212744
[TIMOB-19040] : audiosessionmode method removed
vijaysingh-axway Nov 2, 2017
1e3809d
Merge branch 'master' into TIMOB-19040
hansemannn Nov 2, 2017
7716bbc
Merge branch 'master' into TIMOB-19040
hansemannn Nov 7, 2017
cf93d99
Merge branch 'master' into TIMOB-19040
vijaysingh-axway Nov 8, 2017
82f6805
[TIMOB-19040] : Fix setInitialPlaybackTime issue
vijaysingh-axway Nov 8, 2017
5fd0bd8
[TIMOB-19040] : linting issue fixed
vijaysingh-axway Nov 8, 2017
f5e9068
[TIMOB-19040] : demos/KitchenSink/Resources/another.mp4
vijaysingh-axway Nov 8, 2017
a8a0e18
[TIMOB-19040] : Doc updated
vijaysingh-axway Nov 9, 2017
446f703
[TIMOB-19040] : requestThumbnailImagesAtTimes supported
vijaysingh-axway Nov 13, 2017
5554f12
Merge branch 'master' into TIMOB-19040
vijaysingh-axway Nov 13, 2017
3ea12ad
[TIMOB-19040] : Doc updated
vijaysingh-axway Nov 13, 2017
30ba65f
[TIMOB-19040] : Updated docs
vijaysingh-axway Nov 14, 2017
9f1795a
[TIMOB-19040] : Special character removed from doc
vijaysingh-axway Nov 14, 2017
21a2c7e
[TIMOB-19040] : Unit tests added
vijaysingh-axway Nov 14, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
91 changes: 91 additions & 0 deletions apidoc/Titanium/Media/Media.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,10 @@ properties:
type: Number
permission: read-only
- name: VIDEO_CONTROL_DEFAULT
deprecated:
since: '7.0.0'
notes: This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are single quotes ok in the docs? We usually use ". Please validate the docs locally again. cc @jawa9000

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very few places single quotes are there. I updated to ".

summary: Constant for default video controls.
description: |
Used in conjunction with the
Expand All @@ -1184,6 +1188,10 @@ properties:
type: Number
permission: read-only
- name: VIDEO_CONTROL_EMBEDDED
deprecated:
since: '7.0.0'
notes: This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Constant for video controls for an embedded view.
description: |
Used in conjunction with the
Expand All @@ -1196,6 +1204,10 @@ properties:
permission: read-only
platforms: [android, iphone, ipad]
- name: VIDEO_CONTROL_FULLSCREEN
deprecated:
since: '7.0.0'
notes: This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Constant for fullscreen video controls.
description: |
Used in conjunction with the
Expand Down Expand Up @@ -1265,17 +1277,30 @@ properties:
type: Number
permission: read-only
platforms: [android, iphone, ipad]
- name: VIDEO_LOAD_STATE_FAILED
summary: Indicates that the player can no longer play AVPlayerItem instances because of an error.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Titanium users have no idea what a AVPlayerItem is. Use "media items" instead.

type: Number
permission: read-only
platforms: [iphone, ipad]
- name: VIDEO_LOAD_STATE_PLAYABLE
summary: Current media is playable.
type: Number
permission: read-only
platforms: [android, iphone, ipad]
- name: VIDEO_LOAD_STATE_PLAYTHROUGH_OK
deprecated:
since: '7.0.0'
notes: This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Playback will be automatically started in this state when `autoplay` is true.
type: Number
permission: read-only
platforms: [android, iphone, ipad]
- name: VIDEO_LOAD_STATE_STALLED
deprecated:
since: '7.0.0'
notes: This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Playback will be automatically paused in this state, if started.
type: Number
permission: read-only
Expand All @@ -1286,16 +1311,28 @@ properties:
permission: read-only
platforms: [android, iphone, ipad]
- name: VIDEO_MEDIA_TYPE_AUDIO
deprecated:
since: '7.0.0'
notes: This property has been removed in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: A audio type of media in the movie returned by <Titanium.Media.VideoPlayer> `mediaTypes` property.
type: Number
permission: read-only
platforms: [iphone, ipad]
- name: VIDEO_MEDIA_TYPE_NONE
deprecated:
since: '7.0.0'
notes: This property has been removed in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: An unknown type of media in the movie returned by <Titanium.Media.VideoPlayer> `mediaTypes` property.
type: Number
permission: read-only
platforms: [iphone, ipad]
- name: VIDEO_MEDIA_TYPE_VIDEO
deprecated:
since: '7.0.0'
notes: This property has been removed in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: A video type of media in the movie returned by <Titanium.Media.VideoPlayer> `mediaTypes` property.
type: Number
permission: read-only
Expand Down Expand Up @@ -1331,18 +1368,30 @@ properties:
permission: read-only
platforms: [android, iphone, ipad]
- name: VIDEO_REPEAT_MODE_NONE
deprecated:
since: '7.0.0'
notes: This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Constant for disabling repeat on video playback.
type: Number
permission: read-only
platforms: [android, iphone, ipad]
since: {android: "6.2.0", iphone: "0.9.0", ipad: "0.9.0"}
- name: VIDEO_REPEAT_MODE_ONE
deprecated:
since: '7.0.0'
notes: This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Constant for repeating one video (i.e., the one video will repeat constantly) during playback.
type: Number
permission: read-only
platforms: [android, iphone, ipad]
since: {android: "6.2.0", iphone: "0.9.0", ipad: "0.9.0"}
- name: VIDEO_SCALING_ASPECT_FILL
deprecated:
since: '7.0.0'
notes: This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Scale video to fill the screen, clipping edges if necessary.
description: |
Video is scaled until the video fills the entire screen. Content at the edges
Expand All @@ -1352,6 +1401,10 @@ properties:
permission: read-only
platforms: [android, iphone, ipad]
- name: VIDEO_SCALING_ASPECT_FIT
deprecated:
since: '7.0.0'
notes: This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Scale video to fit the screen, letterboxing if necessary.
description: |
Video is scaled until the larger dimension fits on the screen exactly. In the
Expand All @@ -1361,30 +1414,68 @@ properties:
permission: read-only

- name: VIDEO_SCALING_MODE_FILL
deprecated:
since: '7.0.0'
notes: This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Video is scaled until both dimensions fit the screen exactly, stretching if necessary.
description: |
The aspect ratio of the video is not preserved.
type: Number
permission: read-only
platforms: [android, iphone, ipad]
- name: VIDEO_SCALING_NONE
deprecated:
since: '7.0.0'
notes: This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Video scaling is disabled.
type: Number
permission: read-only
- name: VIDEO_SCALING_RESIZE
summary: Specifies that the video should be stretched to fill the layer’s bounds.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That probably fails validation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

type: String
permission: read-only
platforms: [iphone, ipad]VIDEO_MEDIA_TYPE_NONE
since: '7.0.0'
- name: VIDEO_SCALING_RESIZE_ASPECT
summary: Specifies that the player should preserve the video’s aspect ratio and fit the video within the layer’s bounds.
type: String
permission: read-only
platforms: [iphone, ipad]
since: '7.0.0'
- name: VIDEO_SCALING_RESIZE_ASPECT_FILL
summary: Specifies that the player should preserve the video’s aspect ratio and fill the layer’s bounds.
type: String
permission: read-only
platforms: [iphone, ipad]
since: '7.0.0'

- name: VIDEO_SOURCE_TYPE_FILE
deprecated:
since: '7.0.0'
notes: This property has been removed in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Video source type is a file.
description: Related to the `sourceType` property of <Titanium.Media.VideoPlayer>.
type: Number
permission: read-only
platforms: [iphone, ipad]
- name: VIDEO_SOURCE_TYPE_STREAMING
deprecated:
since: '7.0.0'
notes: This property has been removed in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Video source type is a remote stream.
description: Related to the `sourceType` property of <Titanium.Media.VideoPlayer>
type: Number
permission: read-only
platforms: [iphone, ipad]
- name: VIDEO_SOURCE_TYPE_UNKNOWN
deprecated:
since: '7.0.0'
notes: This property has been removed in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Video source type is unknown.
description: Related to the `sourceType` property of <Titanium.Media.VideoPlayer>
type: Number
Expand Down
86 changes: 84 additions & 2 deletions apidoc/Titanium/Media/VideoPlayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ events:
platforms: [android]

- name: fullscreen
deprecated:
since: '7.0.0'
notes: This event has been removed in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Fired when a movie changes to or from fullscreen view.
description: |
On iOS, this event is fired at the beginning of the transition to
Expand Down Expand Up @@ -374,6 +378,10 @@ events:
constants: Titanium.Media.VIDEO_PLAYBACK_STATE_*

- name: mediatypesavailable
deprecated:
since: '7.0.0'
notes: This event has been removed in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Fired when the media types in the current movie are determined.
platforms: [iphone, ipad]
properties:
Expand Down Expand Up @@ -432,6 +440,10 @@ events:
summary: New `sourceType` value.

- name: sourcechange
deprecated:
since: '7.0.0'
notes: This event has been removed in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: |
Fired when the [sourceType](Titanium.Media.VideoPlayer.sourceType) property
changes.
Expand Down Expand Up @@ -536,6 +548,9 @@ properties:
default: true

- name: backgroundView
deprecated:
since: "7.0.0"
notes: Use <Titanium.Media.VideoPlayer.overlayView> instead.
summary: Sets the background view for customization which is always displayed behind movie content.
description: |
To create a background behind the movie content on iOS, you can specify a
Expand Down Expand Up @@ -601,6 +616,10 @@ properties:
type: Number

- name: fullscreen
deprecated:
since: '7.0.0'
notes: This method has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: |
Determines if the movie is presented in the entire screen (obscuring all other application content).
description: |
Expand All @@ -625,6 +644,9 @@ properties:
type: Number

- name: loadState
deprecated:
since: "7.0.0"
notes: On iOS, use <Titanium.Media.VideoPlayer.moviePlayerStatus> instead.
summary: Returns the network load state of the movie player.
type: Number
permission: read-only
Expand All @@ -636,6 +658,10 @@ properties:
permission: write-only

- name: mediaControlStyle
deprecated:
since: '7.0.0'
notes: On iOS, use <Titanium.Media.VideoPlayer.showsControls> instead.
removed: '7.0.0'
summary: The style of the playback controls.
description: |
Mobile web only supports <Titanium.Media.VIDEO_CONTROL_NONE> and
Expand Down Expand Up @@ -674,6 +700,12 @@ properties:
ios:
max: "3.1"

- name: moviePlayerStatus
summary: Returns the status of the movie player.
type: Number
permission: read-only
platforms: [iphone, ipad]

- name: naturalSize
summary: Returns the natural size of the movie.
description: |
Expand All @@ -685,6 +717,37 @@ properties:
platforms: [iphone, ipad]
type: MovieSize

- name: overlayView
summary: Use the overlay view to add additional custom views between the video content and the controls.
description: |
Note that the overlay view must be sized explicitly: percentage sizes do not work properly.

The following code sample creates a video player with a background image:

var videoPlayer = Ti.Media.createVideoPlayer({
height : 300,
width : 300,
overlayView : Ti.UI.createView({
backgroundImage: 'videoPlayerBG.png
width : 300,
height : 300
}),
borderRadius : 20,
borderWidth : 2,
borderColor : 'blue',
});
platforms: [iphone, ipad]
type: Titanium.UI.View

- name: pictureInPictureEnabled
summary: Whether or not the receiver allows Picture in Picture playback
platforms: [iphone, ipad]
type: Boolean
default: true
osver:
ios:
max: "9.0"

- name: playableDuration
summary: |
Currently playable duration of the movie, in milliseconds, for progressively
Expand All @@ -709,8 +772,13 @@ properties:
permission: read-only

- name: repeatMode
summary: Determines how the movie player repeats when reaching the end of playback.
deprecated:
since: '7.0.0'
notes: This method has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: Determines how the movie player repeats when reaching the end of playback.
platforms: [android, iphone, ipad]

type: Number
constants: Titanium.Media.VIDEO_REPEAT_MODE_*
default: Titanium.Media.VIDEO_REPEAT_MODE_NONE
Expand All @@ -725,8 +793,22 @@ properties:
constants: Titanium.Media.VIDEO_SCALING_*
default: <Titanium.Media.VIDEO_SCALING_ASPECT_FIT>

- name: showsControls
summary: Whether or not the receiver shows playback controls. Default is YES.
description: |
Clients can set this property to NO when they don't want to have any playback controls on top of
the visual content (e.g. for a game splash screen). This property should not be used to temporarily
change the visibility of the playback controls since it will create or destroy UI elements.
platforms: [iphone, ipad]
type: Boolean
default: true

- name: sourceType
summary: The playback type of the movie.
deprecated:
since: '7.0.0'
notes: This method has been removed in Titanium SDK 7.0.0 as of the official deprecation by Apple.
removed: '7.0.0'
summary: The playback type of the movie.
description: |
Specifying a playback type before playing the movie can result in faster load times.

Expand Down