Latest 1.1.3
Homepage https://github.com/songyutao/YTAVPlayer
License MIT
Platforms ios 7.0, requires ARC
Authors

A custom UI audio and video player.

Examples:

UI Init:

[[YTAVPlayerView appearance] setPlayCtrlImage:[UIImage imageNamed:@"play"]];
[[YTAVPlayerView appearance] setPauseCtrlImage:[UIImage imageNamed:@"pause"]];
[[YTAVPlayerView appearance] setDragImage:[UIImage imageNamed:@"drag"]];
[[YTAVPlayerView appearance] setScreenCtrlImage:[UIImage imageNamed:@"icon_ad"]];

use way:

YTAVPlayerViewClickEventBlock block = ^(YTAVPlayerViewClickEvent event, YTRemoteResponseBlock remoteResponse){

    switch (event)
    {
        case kYTAVPlayerViewClickEventFullScreen:
        {
            NSLog(@"fullscreen");

            if (remoteResponse)
            {
                remoteResponse(YES);
            }
            break;
        }   
        default:
        {
            if (remoteResponse)
            {
                remoteResponse(YES);
            }
            break;
        }
    }

};
self.player = [[YTAVPlayer alloc] init];
self.player.ytAVPlayerView.containerViewController = self;
[self.view addSubview: self.player.ytAVPlayerView];
self.player.ytAVPlayerView.frame = CGRectMake(0, 0, self.view.frame.size.width, 160);
self.player.ytAVPlayerView.clickEventBlock = block;
[self.player play:pathUrl];

Latest podspec

{
    "name": "YTAVPlayer",
    "platforms": {
        "ios": "7.0"
    },
    "version": "1.1.3",
    "license": "MIT",
    "summary": "A custom UI Audio and video player.",
    "homepage": "https://github.com/songyutao/YTAVPlayer",
    "authors": {
        "u5b8bu7389u6d9b": "[email protected]"
    },
    "source": {
        "git": "https://github.com/songyutao/YTAVPlayer.git",
        "tag": "1.1.3"
    },
    "requires_arc": true,
    "subspecs": [
        {
            "name": "YTAVPlayer",
            "source_files": "YTAVPlayer/YTAVPlayer",
            "dependencies": {
                "Reachability": [],
                "YTTool": []
            },
            "frameworks": [
                "AVFoundation",
                "SystemConfiguration",
                "Foundation"
            ]
        }
    ]
}

Pin It on Pinterest

Share This