AVPlayer
is contains one or more AVPlayerItem
objects, and it is through these objects that you can get and set audio levels for media played by an AVPlayer. Head to the AVPlayerItem docs and look at the audioMix
property, and also check out my answer to a slightly different question that should still provide some info.
Following up after your comment, this is (I think) how you would get the volume values from the - (BOOL)getVolumeRampForTime:(CMTime)time startVolume:(float *)startVolume endVolume:(float *)endVolume timeRange:(CMTimeRange *)timeRange
method:
// Get your AVAudioMixInputParameters instance, here called audioMixInputParameters
// currentTime is the current playhead time of your media
float startVolume;
float endVolume;
CMTimeRange timeRange;
bool success = [audioMixInputParameters getVolumeRampForTime: currentTime
startVolume: &startVolume
endVolume: &endVolume
timeRange: &timeRange];
// startVolume and endVolume should now be set
NSLog(@"Start volume: %f | End volume: %f", startVolume, endVolume);