Local video playback is implemented using the Avplayer package, and online video is broadcast on the side, and the video is saved in a local folder after the cache is completed and played directly from the local area the next time it is played.
and realize the left and right slide fast forward rewind video, swipe up and down to adjust the volume, and full screen function.
Hcdcacheplayer
The player with the cache, developed using the Avplayer package.
Simple Introduction
The Hcdcachevideoplayer implements an on-edge streaming video and can cache online video locally, support left and right swipe gestures to adjust video playback progress, swipe up and down gestures to adjust volume, and support full-screen playback. This control uses the masonry automatic layout to achieve the interface layout when full-screen playback occurs. It took a while to write this control, and I would write a few notes to record the entire control's writing process.
Usage
when you need to use the player's page
#Import "HcdCacheVideoPlayer.h"
Then create a view to place the video [Objective-c]View Source file copy code ?
12345 |
hcdcachevideoplayer *play = [Hcdcachevideoplayer sharedinstance]; uiview *videoview = [[UIView alloc]initwithframe:cgrectmake (0, +, [UIScreen mainscreen]. Bounds.size.width, [uiscreen mainscreen].bounds.size.width * 0.5625)]; [ self .view Addsubview:videoview]; [play playwithurl:[ nsurl urlwithstring: @" http://7xsnx0.com2.z0.glb.qiniucdn.com/ 14651947751451.mp4 " " Showview:videoview Andsuperview: self .view]; |
Code Download:
http://www.code4app.com/forum.php?mod=viewthread&tid=9334&extra=page%3D1%26filter%3Dsortid%26sortid% 3d1
Avplayer packaged video player with cache