The present invention relates to a management method of video playback owner, setting video owner protocol Video Owner Protocol, setting the following attributes in the protocol: automatic playback attribute, used to identify whether the video currently playing supports automatic playback, floating window attribute, used to identify whether the video currently playing supports floating or not. Layer play, set video owner manager Video Owner Manager, to achieve the following functions: join the video owner pushOwner, press the video owner into the top of the queue, delete the video owner popOwner, pop the video owner out of the top of the queue, empty the video owner clearOwner, empty all the videos in the queue. There is a person. The invention manages the video owner, effectively solves the problem of out-of-control of video control caused by timing problem, is no longer disturbed by calling timing, has simple algorithm, easy processing, good stability, and effectively avoids the occurrence of playback confusion.
【技术实现步骤摘要】
一种视频播放所有者的管理方法
本专利技术涉及视频播放管理
,具体说是一种视频播放所有者的管理方法。
技术介绍
在多视频播放页面切换时,或在单例播放页面重入时,容易出现播放混乱问题。例如:一遇到加载就显示Tookbackgroundtaskassertion(9)forplaybackstall。再例如:等到Endingbackgroundtaskassertion(9)forplaybackstall视频继续播放,但是会发生奇怪的情况,明明设置了repeatModeNone他还继续播放而且反复卡在同一个时间段循环播放。多视频播放:同时或按顺序播放多个视频,关闭任意一个视频就退出播放器,播放完成自动切换到下一个视频,App进入后台暂停播放,进入前台继续播放,跳转到其他页面则不再播放。单例播放(单例模式):在程序运行过程,一个类只有一个实例,无论如何程序运行过程中只有一份实例。针对上述情况导致的播放混乱问题,目前的解决方法是:需要在不同的ViewController的生存周期方法(viewDidLoad,viewWillDisappear,viewDidDisappear,dealloc)中乱舞。ViewController是iOS应用程序中重要的部分,是应用程序数据和视图之间的重要桥梁,ViewController管理应用中的众多视图。viewDidLoad方法,在视图加载后被调用,如果是在代码中创建的视图加载器,他将会在loadView方法后被调用,如果是从nib视图页面输出,他将会在视图设置好后后被调用。viewWillDisappear方法,当收 ...
【技术保护点】
1.一种视频播放所有者的管理方法,其特征在于:设定视频所有者协议 VideoOwnerProtocol,在协议中设定以下属性:自动播放属性,用于标识当前播放中的视频是否支持自动播放,浮动小窗属性,用于标识当前播放中的视频是否支持浮层播放,设定视频所有者管理器VideoOwnerManager,用于实现以下功能:加入视频所有者pushOwner,将视频所有者压入队列顶端,删除视频所有者popOwner,将视频所有者弹出队列顶端,清空视频所有者clearOwner,清空队列中所有的视频所有者。
【技术特征摘要】
1.一种视频播放所有者的管理方法,其特征在于:设定视频所有者协议VideoOwnerProtocol,在协议中设定以下属性:自动播放属性,用于标识当前播放中的视频是否支持自动播放,浮动小窗属性,用于标识当前播放中的视频是否支持浮层播放,设定视频所有者管理器VideoOwnerManager,用于实现以下功能:加入视频所有者pushOwner,将视频所有者压入队列顶端,删除视频所有者popOwner,将视频所有者弹出队列顶端,清空视频所有者clearOwner,清空队列中所有的视频所有者。2.如权利要求1所述的视频播放所有者的管理方法,其特征在于:所述浮层播放指播放窗口缩小为一浮动小窗。3.如权利要求2所述的视频播放所有者的管理方法,其特征在于:所述浮动小窗尺寸为默认值,其所在view置于最上层,支持拖动调整位置。4.如权利要求1所述的视频播放所...
【专利技术属性】
技术研发人员:郭艳杰,
申请(专利权)人:北京酷我科技有限公司,
类型:发明
国别省市:北京,11
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。