Skip to content

Instantly share code, notes, and snippets.

View NiklasOemler's full-sized avatar
👨‍💻
am frickeln

NiklasOemler

👨‍💻
am frickeln
View GitHub Profile
@NiklasOemler
NiklasOemler / AVVideoPlayer
Created October 31, 2019 08:32
AVVideoPlayer
#import <AVKit/AVKit.h>
@interface ViewController () <AVPlayerViewControllerDelegate>
- (void)presentVideoPlayerWithURL:(NSURL *)videoURL
{
AVAudioSession *session = [AVAudioSession sharedInstance];
[session setActive:YES error:nil];
[session setCategory:AVAudioSessionCategoryPlayback error:nil];
if (!self.videoPlayerViewController) {