Avplayer packaged video player with cache

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.