is it possible to have a QuickTime video with alpha layer (transparency) play on top of a static dynamic background UIView
(i.e. a view that changes occasionall
You could have a normal video and reduce the alpha of the presenting view. This can be done using an AVPlayer
and AVPlayerLayer
by adding the AVPlayerLayer
to a UIView
and setting the alpha of the UIView
. Something like:
self.player = [[AVPlayer alloc] initWithURL:url];
self.playerLayer = [AVPlayerLayer playerLayerWithPlayer:self.player];
self.playerLayer.frame = view.bounds;
...etc...
self.playerView.alpha = 0.3;
[self.playerView.layer addSublayer:self.playerLayer];
I haven't tried this with the alpha channel in the video itself, but AVPlayerLayer should work for that as well.