113 Commits

Author SHA1 Message Date
Garrett Moon
645aa6f24b [ASDisplayNode] Renamed range update callbacks (#2130)
* Renamed range update callbacks

We finally settled on

didEnter/ExitDisplayState
didEnter/ExitPreloadState
didEnter/ExitVisibleState

This change is meant to unify the range update methods to relate to each
other and hopefully be a bit more self explanatory.

* Guarantee interface callbacks happen on main.

* move fetchData / clearFetchedData to default implementations

* Move deprecated methods to new deprecated category

* Don't bring in cocoapod change.

* Nits

* Capetalize
2016-08-26 20:18:38 -07:00
Maximilian Szengel
43370fe6ff Expose AVPlayerLayer on ASVideoNode (#2028)
The playerLayer is needed for picture in picture support on the iPad (AVPictureInPictureController).
2016-08-13 17:28:19 -07:00
Flo
39cb188b9e [ASVideoNode] Improve playerStatus behaviour and image generation (#2024)
* [ASVideoNode] Use the videoComposition when generating images.

* [ASVideoNode] Improve playerState behaviour.

* [ASVideoNode] Use KVO on _player.rate to determine the playerState.
2016-08-12 12:06:02 -07:00
David Rodrigues
70574243f7 Prevent API misuse at compile time (#2035)
Using Objective-C attributes, in this case `unavailable`, we can hide
unsupported APIs at compile time instead of detecting and warn about it
at runtime with a set of asserts.
2016-08-04 19:00:46 -07:00
Levi McCallum
0c70bca2bd [ASVideoNode] Fix conditional that prevented local asset loading (#1962)
* Fix conditional that prevented local asset loading

* Allow setting new asset to clear previously set URL
2016-07-21 10:39:31 -07:00
Max Gu
1d4620edce Adding documentation for assetURL in ASVideoNode, and adding a mutex lock for assetURL setter (#1961)
* Adding comment in ASVideoNode.h for the assetURL property

* Adding a mutexlock in setAssetURL in ASVideoNode
2016-07-20 18:40:49 -07:00
Max Gu
6bd287086c Addressing Adlai's comment 2016-07-20 17:33:34 -07:00
Max Gu
b8ad8d6cc0 Combine 2 if statements into 1 2016-07-20 17:09:23 -07:00
Max Gu
76303f3799 Setting the internal asset to the player item's asest 2016-07-20 17:03:57 -07:00
Max Gu
b04aa2e2bc Removing some unused method 2016-07-20 16:07:17 -07:00
Max Gu
f6eaa43315 Adding the new ASVideoNode API that allows for video player item construction with URL 2016-07-20 16:01:14 -07:00
Max Gu
44a80672cb Adding track to the requestedKeys to be loaded asynchronously so that it doesn't block the main thread 2016-07-19 20:25:32 -07:00
Max Gu
a4555869de Re-enabling HLS video constructed from URL
Apple claims in the AVFoundationProgramming Guide that HLS videos can be constructed only through URL, but later with iOS 4.3 release notes it claimed to bring updates to how the HLS videos should be initialized, which works with asset too. I’ve tested with both, and it looks like initializing with asset is buggy.
2016-07-19 15:57:22 -07:00
appleguy
74bf376b2f [ASDisplayNode] Rename _propertyLock to __instanceLock__ to avoid subclass naming collisions. (#1941) 2016-07-16 15:32:13 -07:00
Flo
2e65339f33 [ASVideoNode, ASVideoPlayerNode] Add video composition and audio mix capabilities (#1800)
* [ASVideoNode] Add delegate method called when the currentItem is set.

* [ASVideoNode] Add videoComposition and audioMix properties to the ASVideoNode.

* [ASVideoPlayerNode] Add new initialiser with videoComposition and audioMix, and forward new delegate method.

* [ASVideoPlayerNode] Forward missing ASVideoNodeDelegate methods.
2016-07-10 11:32:21 -07:00
Hannah Troisi
f39c2ce7e3 [ASTextNode, ASImageNode, ASVideoNode] Use ASDisplayNode base class lock for subclass property synchronization (#1877)
* [ASTextNode, ASVideoNode] Use ASDisplayNode base class lock for subclass property synchronization

* fix headers to match master

* address @appleguy, @maicki comments

* import header

* Swap lock in ASNetworkImageNode as well

* remove invalid comment

* more cleanup of locks
2016-07-09 22:08:34 -07:00
appleguy
3b2af7eb6d [Build] Remove Unused Imports across all of AsyncDisplayKit. This uses a feature of AppCode. (#1875)
Details on the tool are here: https://www.jetbrains.com/help/idea/2016.1/optimizing-imports.html
2016-07-09 17:20:59 -07:00
Scott Goodson
f0ff9c108d Merge branch 'master' of git://github.com/kielgillard/AsyncDisplayKit into kielgillard-master 2016-07-09 15:44:31 -07:00
Kiel Gillard
6a15ab6130 * Tidy the header imports, forward declaring classes and protocols where appropriate to avoid import cycles and using the framework/system header notation for imports occuring in .h files.
* Perhaps controversially, decomposing ASRangeControllerUpdateRangeProtocol+Beta.h such that the categories on various classes are defined in the classes themselves since that's where the implementation of those categories is provided.
* Updating unit tests and import other headers the tests took for granted. The tests could probably import the umbrella header and not have to worry about this.
* Updating the "Life without Cocoapods" sample to build and run dependent on ASDK as a static library.
* Added a "Life With Frameworks" sample app to build and run dependent on ASDK as a framework, proving the framework targets work.
2016-07-07 15:12:19 +10:00
Gareth Reese
b9b002354a [ASVideoNode] Only seek to beginning when auto repeating 2016-07-05 13:27:53 +01:00
Adlai Holler
f4ccb93969 Merge pull request #1788 from gazreese/ASVideoNode-overwrittenplaceholder
[ASVideoNode] issue #1782 Placeholder images are replaced by blanks during loading
2016-07-02 08:30:38 -07:00
Gareth Reese
1d356242fd [ASVideoNode] Ensure that observer methods don't observer all other ASVideoNode objects 2016-06-28 15:41:26 +01:00
Gareth Reese
9349abb737 Merge branch 'master' of https://github.com/facebook/AsyncDisplayKit into ASVideoNode-overwrittenplaceholder 2016-06-24 11:39:12 +01:00
Gareth Reese
3fee0810d5 [ASVideoNode] Ensure that both ASVideoNode and ASNetworkImageNode delegate methods are called for ASVideoNode observers 2016-06-21 11:36:54 +01:00
Gareth Reese
062bcf3631 [ASVideoNode] issue #1782 Placeholder images are replaced by a blank placeholder. Now checks the .URL property of the parent class as well as the .image to ensure that new placeholders aren't generated. 2016-06-21 07:51:58 +01:00
Hannah Troisi
c857e809f4 Clean up header comments (for consistent Facebook licensing info) (#1741)
[Licensing] Clean up header comments (for consistent Facebook licensing info)
2016-06-11 23:31:39 -07:00
appleguy
a7128cd213 Merge pull request #1605 from lappp9/override-callback-for-display-range
[ASDisplayNode] Added callbacks for entering and exiting fetch data and display ranges
2016-06-11 22:21:20 -07:00
Eric Jensen
001d3ea624 Use a strong reference to the current asset in order to prevent setting a placeholder image if the asset is set to nil while the placeholder image is generating 2016-06-08 12:37:32 -07:00
Luke Parham
fc5467b110 fixed typo and added backwards compatibility for 'visibilityDidChange' 2016-06-06 02:02:23 -05:00
Luke Parham
e510120031 changed '-visibilityDidChange:' to '-visiblieStateDidChange:' to match the others 2016-06-06 00:56:21 -05:00
Hannah Troisi
52d58992da [ASVideoNode] Change superclass to ASNetworkImageNode so that it can be its own placeholder (#1710)
* [ASVideoNode] Change superclass to ASNetworkImageNode so that ASVideoNode can be its own placeholder
- remove _placeholderImageNode property of ASVideoNode (use self.image now instead)
- move layoutSpecThatFits: code to calculateSizeThatFits: & layout: methods as ASImageNode uses calculateSizeThatFits:

* [ASVideoNode] Tweaks to the definition of the delegate protocols to integrate with ASNetworkImageNode (superclass)
2016-06-05 18:18:52 -07:00
Scott Goodson
783011bc0e [ASVideoNode] Added a couple comments for clarity and to identify future improvement areas. 2016-06-04 21:38:05 -07:00
Erekle
4ab0f1ec60 [ASVideoPlayerNode] fixes; Ability to add custom controls 2016-05-23 23:23:33 +04:00
Erekle
100d2b4f26 moved spinner to ASVIdeoPlayerNode 2016-05-19 15:07:39 +04:00
Erekle
053b14992c Merge remote-tracking branch 'facebook/master' into ASVideoPlayerNode
# Conflicts:
#	AsyncDisplayKit/ASVideoNode.h
#	AsyncDisplayKit/ASVideoNode.mm
2016-05-19 11:57:16 +04:00
Max Gu
73b41ee450 Renaming the delegate flags for the deprecated methods 2016-05-18 22:10:06 -07:00
Max Gu
1c64a4a785 Surpressing deprecated methods warning 2016-05-18 16:39:45 -07:00
Max Gu
90877847c2 Adding deprecated methods back 2016-05-18 14:05:08 -07:00
Max Gu
a93bc72e25 Updating and adding a few APIs for ASVideoNode 2016-05-18 08:40:58 -07:00
Max Gu
325e37020c Adding startup loading state in ASVideoNode 2016-05-17 15:31:30 -07:00
Erekle
98c451118b removed play button
* Removed play button from ASVideoNode
* Removed play button tests
* added some checks in ASVideoPlayerNode
* added new delegate method for time formats
2016-05-13 00:46:55 +04:00
Erekle
d0345549f6 Merge remote-tracking branch 'facebook/master' into ASVideoPlayerNode
# Conflicts:
#	AsyncDisplayKit.xcodeproj/project.pbxproj
2016-05-12 13:05:24 +04:00
Michael Schneider
9b3ecd28a9 Fix position of loading spinner in ASVideoNode 2016-05-11 20:14:22 +02:00
Erekle
975690744b Merge remote-tracking branch 'facebook/master' into ASVideoPlayerNode 2016-05-11 20:43:57 +04:00
Erekle
52b40f8004 ASVideoPlayerNodeControlType and fixes
* changed static string to ASVideoPlayerNodeControlType
* public property for duration
* public method for seek
* new _controlFlexGrowSpacerSpec; used to use flexible space in
controlbar. for example if user does not want to have scrubber, he can
replace it with flexible spacer and duration text node will be kept at
the right edge.
2016-05-10 23:57:47 +04:00
Erekle
716082d411 better duration handling. new ASVideoNode states 2016-05-10 22:48:32 +04:00
Erekle
c46547ac5f prototype
Added duration detection in ASVideoNode.
2016-05-06 21:41:54 +04:00
Michael Schneider
cac4ed5626 Move layout of ASVideoNode to layout specs
- This should fix adjusting a custom play button position
- Fix sample project use of ASVideoNode
2016-05-05 16:49:01 -07:00
Erekle
5c3770e543 fixes 2016-05-05 02:03:03 +04:00
Erekle
82cc6f49f2 coding style fixes 2016-05-05 01:49:52 +04:00