see https://developer.apple.com/Library/ios/samplecode/AVPlayerDemo/Introduction/Intro.html