視頻播放,橫屏切換CLPlayer(轉(zhuǎn)載)

CLPlayer是封裝的AVPlayer。在所有封裝AVPlayer的dome活著第三方中,CLPlayer不是最好的,但是是最簡單易懂,最易上手的之一。剛剛做了一個視頻的小項目。

以下是一些簡單的操作

/**視頻url*/

@property (nonatomic,strong) NSURL *url;

/**旋轉(zhuǎn)自動全屏,默認(rèn)Yes*/

@property (nonatomic,assign) BOOL autoFullScreen;

/**重復(fù)播放,默認(rèn)No*/

@property (nonatomic,assign) BOOL repeatPlay;

/**是否支持橫屏,默認(rèn)No*/

@property (nonatomic,assign) BOOL isLandscape;

/**播放*/

- (void)playVideo;

/**暫停*/

- (void)pausePlay;

/**返回按鈕回調(diào)方法*/

- (void)backButton:(BackButtonBlock) backButton;

/**播放完成回調(diào)*/

- (void)endPlay:(EndBolck) end;

/**銷毀播放器*/

- (void)destroyPlayer;

/**

根據(jù)播放器所在位置計算是否滑出屏幕,

@param tableView Cell所在tableView

@param cell 播放器所在Cell

@param beyond 滑出后的回調(diào)

*/

- (void)calculateWith:(UITableView *)tableView cell:(UITableViewCell *)cell beyond:(BeyondBlock) beyond;


最后是Demo的鏈接:祝大家學(xué)習(xí)工作愉快

https://github.com/JmoVxia/CLPlayer

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容