AFSoundItem.h 910 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // AFSoundItem.h
  3. // AFSoundManager-Demo
  4. //
  5. // Created by Alvaro Franco on 20/01/15.
  6. // Copyright (c) 2015 AlvaroFranco. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <AVFoundation/AVFoundation.h>
  10. @interface AFSoundItem : NSObject
  11. typedef NS_ENUM(NSInteger, AFSoundItemType) {
  12. AFSoundItemTypeLocal,
  13. AFSoundItemTypeStreaming
  14. };
  15. -(id)initWithLocalResource:(NSString *)name atPath:(NSString *)path;
  16. -(id)initWithStreamingURL:(NSURL *)URL;
  17. @property (nonatomic, readonly) NSString *title;
  18. @property (nonatomic, readonly) NSString *album;
  19. @property (nonatomic, readonly) NSString *artist;
  20. @property (nonatomic, readonly) UIImage *artwork;
  21. @property (nonatomic, readonly) NSURL *URL;
  22. @property (nonatomic, readonly) NSInteger type;
  23. @property (nonatomic) NSInteger duration;
  24. @property (nonatomic) NSInteger timePlayed;
  25. -(void)setInfoFromItem:(AVPlayerItem *)item;
  26. @end