David Chavez
4f7a5b02a6
Fix: Bug - repeat mode and queue index event ( #16 )
2022-04-22 23:11:01 +02:00
David Chavez
a9f831a258
Fix bug in addItems at index and add tests
2022-04-01 21:18:52 +02:00
David Chavez
cc3840d81e
Fix next/previous with repeat modes
2022-04-01 20:47:54 +02:00
David Chavez
5307090ea3
Replace deprecated “timedMetadata" KVO
2022-04-01 17:47:57 +02:00
David Chavez
bdaee8b18f
Extract more information from interruptions
2022-04-01 00:14:47 +02:00
David Chavez
f2f1c1236c
Add tests for new seek improvements
2022-02-24 08:48:54 +01:00
David Chavez
cca7f68da4
Increase deployment target for Test Target
2021-09-28 10:12:22 +02:00
David Chavez
2773e4bfec
Trigger skip and jump events only when actually taking action
2021-09-28 09:57:24 +02:00
David Chavez
cafd513468
Raise minimum deployment target to iOS11
...
Due to breaking change in Swift 5.5 & Xcode 13
2021-09-16 17:50:43 +02:00
David Chavez
7b8a4f318d
Add tests for repeat mode
2021-08-19 16:27:41 +02:00
David Chavez
57b6fb08f3
Fix tests
2021-08-12 11:40:21 +02:00
David Chavez
7370ad05e6
Add support for metadata updates ( #3 )
2021-05-29 22:54:41 +02:00
David Chavez
b2cb178d21
Fix tests
2021-05-29 17:23:51 +02:00
David Chavez
fffe1e5514
Add SPM Support ( #1 )
2021-05-27 22:19:49 +02:00
Jørgen Henrichsen
ec9492da17
Add tests for the loading state.
2019-07-03 17:48:28 +02:00
Jørgen Henrichsen
5add7699ff
Added an example of how to handle network error.
...
The example app will now handle a network error, and reload when play is called, after a item failed to load because of a network error.
2019-07-03 16:41:14 +02:00
Jørgen Henrichsen
bc1d775875
Reset audio file to spotify preview in example app.
2019-07-03 15:06:50 +02:00
Jørgen Henrichsen
719d3c852b
Add an activityindicator to the example.
...
Shows how an activityindicator can be used to indicate loading, when player is loading or buffering.
2019-07-03 13:21:41 +02:00
Jørgen Henrichsen
4f33d7e688
Add a new state buffering.
...
Introduces an additional state to better describe the current state of the player.
Previously the player would be `idle` until the item was loaded, then changing to `ready`. When the player started to play it would first enter `loading`, then subsequently `playing`.
Now it will instead immediately enter `loading`, then when the item is loaded it will enter `ready`. When the item then is played it will enter `buffering` and then `playing`.
This should make it easier to update UI accordingly to the players current state.
2019-07-03 11:23:10 +02:00
Jørgen Henrichsen
457dff7c01
Use weak capturing of the AudioPlayer. Remove initial time test.
...
Weak capturing of the AudioPlayer is done in the listener callback functions in order to not receive INVOPs in the event the audioPlayer is deallocated.
The initial time test is removed because of the unreliable results it produces.
2019-06-23 18:06:43 +02:00
Jørgen Henrichsen
60eb4b4676
Removed the currentTime test.
...
Removes the test that always fails in the CI env at bitrise.
2019-06-18 11:30:47 +02:00
Jørgen Henrichsen
4ec9e9c2a2
Update currentTime tests.
...
Use a shorter `timeEventFrequenct` in order to recieve the callback quicker, so the test can pass quicker.
2019-06-18 11:16:04 +02:00
Jørgen Henrichsen
b2efdf4d65
Rewrote the current time test.
...
Checks each time a second elapses, instead of just at state == `playing`.
2019-06-13 22:33:41 +02:00
Jørgen Henrichsen
4d0f29adf6
Increased timeout for expectations.
2019-06-13 21:42:47 +02:00
Jørgen Henrichsen
f817bc5840
Wrote AudioPlayerTests using the XCTest framework.
2019-06-13 21:42:47 +02:00
Jørgen Henrichsen
5755b70e1b
Rewrote AVPlayerWrapperTests using the XCTest framework.
2019-06-13 21:42:47 +02:00
Jørgen Henrichsen
83ac2af5d6
Set timepitchingalgo on audio ready. Update tests to support async loading.
2019-06-13 21:10:57 +02:00
Jørgen Henrichsen
af4635d047
Remove AVPlayer parameter from init in both AudioPlayer and AVPlayerWrapper.
2019-05-11 19:29:36 +02:00
Jørgen Henrichsen
46022ef0d6
Add event when AVPlayer is recreated.
...
The AudioSession category will need to be set again when this event is emitted.
2019-05-11 17:56:43 +02:00
Jørgen Henrichsen
17166093c2
Correctly set isObserving when stopping the observation.
2019-05-11 17:46:27 +02:00
Jørgen Henrichsen
c06b8ce64c
Made the player observer not retain the AVPlayer.
...
They will also stop observing the current AVPlayer if a new one is going to be set.
2019-05-11 17:34:24 +02:00
Jørgen Henrichsen
d32a041159
Updated to recommended project settings.
2019-04-18 16:53:07 +02:00
Jørgen Henrichsen
8161c3cf02
Update to Swift 5.
2019-04-18 16:53:07 +02:00
Jørgen Henrichsen
bb0f301383
Update dependencies.
2019-04-18 16:53:07 +02:00
Jørgen Henrichsen
8e6b72613d
Set volume of player in tests to 0.
2019-03-10 10:36:30 +01:00
Jørgen Henrichsen
ae760c4cac
Put events in seperate struct.
...
Makes it easier to discover which events are available.
2019-03-10 09:37:00 +01:00
Jørgen Henrichsen
b3856e0a7a
Tests for AudioPlayer events.
2019-03-10 01:02:24 +01:00
Jørgen Henrichsen
757e5f476c
Use direct closure handlers for events.
2019-03-10 01:02:04 +01:00
Jørgen Henrichsen
1f5eae407d
Make event calls async.
...
- Events will be emitted on the utility class.
- Use a semaphore to avoid race conditions in the Event class.
- Update example to dispatch ui updates to the main queue.
2019-03-09 21:30:50 +01:00
Jørgen Henrichsen
29660371c9
Updated tests to use events.
2019-03-09 21:30:02 +01:00
Jørgen Henrichsen
6804cf5163
Add events as an alternative to delegate. Updated example app.
...
This allows for selective listening to events, and no need to implement empty uneeded delegate methods.
Added a deprecation message to the delegate class, will most likely remove AudioPlayerDelegate in a future update.
2019-03-09 20:18:07 +01:00
Jørgen Henrichsen
6ea2e082b0
Call func audioPlayer(itemPlaybackEndedWithReason:) directly, instead of calling the AVWrapperDelegate implementation method.
...
Also remove the corresponding delegate method in the AVWrapper, and add a `AVWrapperItemDidPlayToEndTime` method instead.
2019-03-03 20:04:27 +01:00
Jørgen Henrichsen
1febb782d8
Add tests for NowPlayingInfoController.
2019-03-03 16:10:30 +01:00
Jørgen Henrichsen
c4c6f42ac0
Added clear() method. Use NowPlayingInfoCenter protocol.
...
`NowPlayingInfoCenter` makes the info center mockable, so the controller can be easily tested.
2019-03-03 16:09:29 +01:00
Jørgen Henrichsen
d8b4466629
Add test for NowPlayingInfo artwork.
2019-03-01 12:21:00 +01:00
Jørgen Henrichsen
cb9dec49b2
Test updating of NowPlayingInfo.
...
* Create protocol NowPlayingInfoControllerProtocol to make it more testable (so it can be mocked).
2019-02-28 23:06:03 +01:00
Jørgen Henrichsen
6cc0638a70
Add possiblity to start AudioItem from certain time.
2019-02-24 11:58:03 +01:00
Jørgen Henrichsen
e57cf9d2e5
Increase timescale in seekto(time:) method.
...
Stops truncating of the seeked to time.
Also updated seekTo test to actually test the seeked value.
2019-01-31 18:31:34 +01:00
Jørgen Henrichsen
05ca97b8eb
Deleted AudioSessionCategory file.
2018-12-25 17:39:32 +01:00
Jørgen Henrichsen
9e3f5c0291
Use longer source for duration testing.
2018-12-23 14:36:39 +01:00