mirror of
https://github.com/danog/Telegram.git
synced 2024-12-03 09:57:46 +01:00
46 lines
1.1 KiB
Objective-C
46 lines
1.1 KiB
Objective-C
/*
|
|
* This is the source code of Telegram for iOS v. 1.1
|
|
* It is licensed under GNU GPL v. 2 or later.
|
|
* You should have received a copy of the license in this archive (see LICENSE).
|
|
*
|
|
* Copyright Peter Iakovlev, 2013.
|
|
*/
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import <SSignalKit/SSignalKit.h>
|
|
|
|
@class TGModernConversationAudioPlayer;
|
|
@class TGModernViewInlineMediaContext;
|
|
|
|
@protocol TGModernConversationAudioPlayerDelegate <NSObject>
|
|
|
|
@optional
|
|
|
|
- (void)audioPlayerDidPause;
|
|
- (void)audioPlayerDidFinish;
|
|
|
|
@end
|
|
|
|
@interface TGModernConversationAudioPlayer : NSObject
|
|
|
|
@property (nonatomic, weak) id<TGModernConversationAudioPlayerDelegate> delegate;
|
|
@property (nonatomic, strong) SQueue *queue;
|
|
|
|
- (instancetype)initWithFilePath:(NSString *)filePath music:(bool)music controlAudioSession:(bool)controlAudioSession;
|
|
|
|
- (TGModernViewInlineMediaContext *)inlineMediaContext;
|
|
|
|
- (void)play;
|
|
- (void)play:(float)playbackPosition;
|
|
- (void)pause;
|
|
- (void)pause:(void (^)())completion;
|
|
- (void)stop;
|
|
|
|
- (float)playbackPosition;
|
|
- (float)playbackPositionSync:(bool)sync;
|
|
- (NSTimeInterval)absolutePlaybackPosition;
|
|
- (NSTimeInterval)duration;
|
|
- (bool)isPaused;
|
|
|
|
@end
|