Question

I'm trying to control the volume of an AVPlayer in my iPhone app. I seem to receive an "unrecognized selector sent to instance" error when trying to simply get the volume value, or even set it, from the AVPlayer.Volume property -

AVPlayer myAVPlayer = new AVPlayer();
var volume = myAVPlayer.Volume;

Any ideas how to make this work?

Was it helpful?

Solution

That's likely because you're using an older device (or simulator) version of iOS. The Volume property was added in iOS7.

There are other ways to set the volume - but you'll need to tell us more about what you're trying to accomplish.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top