I try to play some \"media\" but at the time the AVPlayer starts I don\'t know if it is audio or Video.
I connected the player Layer and it works fine.
From Apple’s sample code project AVSimplePlayer:
// Set up an AVPlayerLayer according to whether the asset contains video. if ([[(AVAsset *)asset tracksWithMediaType:AVMediaTypeVideo] count] != 0)