Pregunta

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?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top