iOS 音頻播放 ZSoundManager
ZSoundManager 一個簡單的工具,可以在 iOS app 上播放聲音和音樂。
AZSoundManager is a simple tool for playing sound and music in iOS apps.
Installation
To use the AZSoundManager:
-
Just drag the class files into your project:
- AZSoundManager.h
- AZSoundManager.m
- AZSoundItem.h
- AZSoundItem.m
-
Add the AVFoundation framework.
Classes
The AZSoundManager package defines two classes: AZSoundManager and AZSoundItem.
AZSoundItem properties
@property (nonatomic, readonly) NSString *name;
The name of the item.
@property (nonatomic, readonly) NSURL *URL;
The absolute URL of the sound file.
@property (nonatomic, readonly) NSTimeInterval duration;
The duration (in seconds) of the sound file.
@property (nonatomic, readonly) NSTimeInterval currentTime;
The current time offset (in seconds) of the sound file.
@property (nonatomic, readonly) NSString *title;
The title from metadata of item.
@property (nonatomic, readonly) NSString *album;
The album name from metadata of item.
@property (nonatomic, readonly) NSString *artist;
The artist name from metadata of item.
@property (nonatomic, readonly) UIImage *artwork;
The artwork image from metadata of item.

本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!