The invention discloses a method for solving the black screen before the start of Android advertising video. The field of digital video technology includes step 1: detecting whether or not the transitional picture has been parsed, and if not, parsing the first frame of the video and saving it as a picture format and naming; step 2: converting the image saved in step 1 into a Drawable object; step 3: converting the Drawable object obtained in step 2. Set it as the starting background of the application; Step 4: Show the picture in Step 1 in the ImageView before the video is broadcast, and set OnInfoLister monitor for MediaPlayer. Step 5: Hide the ImageView in Step 4 after OnInfoLister listens to the first frame of the video; exit the playback program if the video is not listened to. Through this method, the natural transition to video playback, there is no black screen process, a good solution to the problem that users can always feel the black screen before video broadcasting, which leads to poor user experience.
【技术实现步骤摘要】
一种解决android广告视频启播前黑屏的方法
本专利技术涉及数字视频
,具体的说,是一种解决android广告视频启播前黑屏的方法。
技术介绍
目前,Android系统已经作为普遍的智能电视平台出现在我们面前,为了提升电视平台的运营价值,很多电视厂商都搭载了自己的广告服务系统和电视终端播放应用,但无论性能多么优良的播放器,由于视频播放前的资源准备的时间,用户总能感觉到视频启播前的黑屏,就用户体验来说,用户不明情况的黑屏是应该想办法避免的。也有很多时候由于网络的原因,视频卡顿在黑屏的位置不动,而用户不知道是什么原因导致的视频不动,只好退出视频的播放再次打开视频,这往往会再一次从头观看广告,导致用户体验极差。
技术实现思路
本专利技术的目的在于提供一种解决android广告视频启播前黑屏的方法,用于解决现有技术中视频在启播前黑屏导致用户体验变得很差的问题。本专利技术通过下述技术方案解决上述问题:一种解决android广告视频启播前黑屏的方法,包括以下步骤:步骤1:检测是否解析已经解析过渡图片,若没有则解析出视频第一帧并保存为图片格式并命名;步骤2:将步骤1所保存的图片转化成Drawable对象;步骤3:将步骤2中的得到的Drawable对象设为应用的启动背景;步骤4:视频启播前将步骤1中得到的图片展示在ImageView中,并为MediaPlayer设置OnInfoListner监听。步骤5:当OnInfoListner监听到视频的第一帧出现之后隐藏步骤4中的ImageView;若未监听到视频的播放则退出播放程序。通过本方法,将视频的第一帧解析出来,然后以 ...
【技术保护点】
1.一种解决android广告视频启播前黑屏的方法,其特征在于,所述方法包括以下步骤:步骤1:检测是否解析已经解析过渡图片,若没有则解析出视频第一帧并保存为图片格式并命名;步骤2:将步骤1所保存的图片转化成Drawable对象;步骤3:将步骤2中的得到的Drawable对象设为应用的启动背景;步骤4:视频启播前将步骤1中得到的图片展示在ImageView中,并为MediaPlayer设置OnInfoListner监听。步骤5:当OnInfoListner监听到视频的第一帧出现之后隐藏步骤4中的ImageView;若未监听到视频的播放则退出播放程序。
【技术特征摘要】
1.一种解决android广告视频启播前黑屏的方法,其特征在于,所述方法包括以下步骤:步骤1:检测是否解析已经解析过渡图片,若没有则解析出视频第一帧并保存为图片格式并命名;步骤2:将步骤1所保存的图片转化成Drawable对象;步骤3:将步骤2中的得到的Drawable对象设为应用的启动背景;步骤4:视频启播前将步骤1中得到的图片展示在ImageView中,并为MediaPlayer设置OnInfoListner监听。步骤5:当OnInfoListner监听到视频的第一帧出现之后隐藏步骤4中的ImageView;若未监听到视频的播放则退出播放程序。2.根据权利要求1所述的解决android广告视频启播前黑屏的方法,其特征在于:所述步骤1中采用AndriodSDK解析视频的第一帧,并以图片格式保存在data/tmp目录下。3.根据权利...
【专利技术属性】
技术研发人员:何快洛,
申请(专利权)人:四川长虹电器股份有限公司,
类型:发明
国别省市:四川,51
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。