在viewcontroller中创建avplayer可能会导致再次进入viewcontroller的时候avplayer重复播放,为解决这个问题,可以在appDelegate中创建一个全局的avplayer,然后在viewcontroller中取得appDelegate的实例然后调用相关函数。
1 | [(AppDelegate*)[[UIApplication sharedApplication]delegate]startPlayerWithURL:currentURL]; |
在viewcontroller中创建avplayer可能会导致再次进入viewcontroller的时候avplayer重复播放,为解决这个问题,可以在appDelegate中创建一个全局的avplayer,然后在viewcontroller中取得appDelegate的实例然后调用相关函数。
1 | [(AppDelegate*)[[UIApplication sharedApplication]delegate]startPlayerWithURL:currentURL]; |
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: true
tags: true