First look at the four-tier architecture of the iOS system
1. Core OS cores OS Layer
2. Core Services Tier
3. Media Layer
4. Cocoa Touch Layer
Media layer is to support multimedia playback
iOS9 after the official recommended use of Avkit and avfoundtion framework to achieve video playback
-(Ibaction) Click: (ID) sender
{
Creating a player Controller
Avplayerviewcontroller * PLAYERVC = [[Avplayerviewcontroller alloc] init];
A range of features that need to be set for their property player to complete video playback
Its player property is a class in the Avfoundtion framework
NSString * Path = [[NSBundle mainbundle] pathforresource:@ "model" oftype:@ ". mp4"];
Playervc.player = [[Avplayer alloc] Initwithurl:[nsurl Fileurlwithpath:path]];
Performing playback
[Playervc.player play];
[Self PRESENTVIEWCONTROLLER:PLAYERVC animated:yes completion:^{
NSLog (@ "local video playback");
}];
}
IOS Multimedia Programming