Skip to content

Instantly share code, notes, and snippets.

@manmal
manmal / AVPlayer+MOAdditions.m
Created April 24, 2012 11:42
AVPlayer URL & volume Additions
#import "AVPlayer+MOAdditions.h"
#include <CoreMedia/CMBase.h>
#import "AVPlayerItem+MOAdditions.h"
@implementation AVPlayer (MOAdditions)
- (NSURL *)currentURL {
AVAsset *asset = self.currentItem.asset;
if ([asset isMemberOfClass:[AVURLAsset class]])
return ((AVURLAsset *)asset).URL;