<commit_before>#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>

@class PersistentStreamPlayer;
@protocol PersistentStreamPlayerDelegate <NSObject>

@optional
- (void)persistentStreamPlayerDidPersistAsset:(PersistentStreamPlayer *)player;

- (void)persistentStreamPlayerDidFinishPlaying:(PersistentStreamPlayer *)player;
- (void)persistentStreamPlayerStreamingDidStall:(PersistentStreamPlayer *)player;

- (void)persistentStreamPlayerDidLoadAsset:(PersistentStreamPlayer *)player;
- (void)persistentStreamPlayerDidFailToLoadAsset:(PersistentStreamPlayer *)player;

@end

@interface PersistentStreamPlayer : NSObject

- (instancetype)initWithRemoteURL:(NSURL *)remoteURL
                         localURL:(NSURL *)localURL;

@property (nonatomic, weak) id<PersistentStreamPlayerDelegate> delegate;
@property (nonatomic, readonly) AVPlayer *player;
@property (nonatomic, assign) BOOL looping;
@property (nonatomic, readonly) BOOL playing;
@property (nonatomic, assign) float volume;

- (void)play;
- (void)pause;
- (void)destroy;

@property (nonatomic, readonly) BOOL isAssetLoaded;<commit_msg>add nullability attributes to .h for swift imports<commit_after>#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>

@class PersistentStreamPlayer;
@protocol PersistentStreamPlayerDelegate <NSObject>

@optional
- (void)persistentStreamPlayerDidPersistAsset:(nonnull PersistentStreamPlayer *)player;

- (void)persistentStreamPlayerDidFinishPlaying:(nonnull PersistentStreamPlayer *)player;
- (void)persistentStreamPlayerStreamingDidStall:(nonnull PersistentStreamPlayer *)player;

- (void)persistentStreamPlayerDidLoadAsset:(nonnull PersistentStreamPlayer *)player;
- (void)persistentStreamPlayerDidFailToLoadAsset:(nonnull PersistentStreamPlayer *)player;

@end

@interface PersistentStreamPlayer : NSObject

- (nullable instancetype)initWithRemoteURL:(nonnull NSURL *)remoteURL
                                  localURL:(nonnull NSURL *)localURL;

@property (nonatomic, readonly) AVPlayer *player;
@property (nonatomic, weak, nullable) id<PersistentStreamPlayerDelegate> delegate;
@property (nonatomic, assign) BOOL looping;
@property (nonatomic, readonly) BOOL playing;
@property (nonatomic, assign) float volume;

- (void)play;
- (void)pause;
- (void)destroy;

@property (nonatomic, readonly) BOOL isAssetLoaded;
{'fraction_non_alphanumeric': 0.10208421948107188, 'fraction_numerical': 0.0, 'mean_word_length': 7.942965779467681, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5414321', 'n_tokens_mistral': 683, 'n_tokens_neox': 642, 'n_words': 137}