视频作为手机屏幕上的启动屏幕 [英] Video as splash screen on phonegap

查看:97
本文介绍了视频作为手机屏幕上的启动屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

视频mp4 或任何形式的初始屏幕,例如混合电话应用程序中的间隙/cordova.就像目前的Ubber App

Video mp4 or any format as a splash screen on hybrid app like phone gap/cordova. like current Ubber App

推荐答案

我知道我来晚了,但是可以在加载文档后使用HTML5标签播放视频.收听事件(视频结束)以隐藏视频并显示启动后出现的内容

I know i am quite late, But you can use the HTML5 tag to play a video after the document is loaded. Listen to event(video end) to hide the video and show the content that comes after the splash

这是一个样本

<div id="splashVid" class="centerpage" style="overflow:hidden; display:block">
    <video width="100%" autoplay onended="splashEnd();">
        <source src="BT-logo-splash.mov" type="video/mp4">
        Your browser does not support the video tag.
    </video>
</div>

在函数"splashEnd()"中,您可以编写初始视频结束时要执行的操作

Within the function "splashEnd()" you can write what you want to do when the splash video ends

此外,对于我来说,该视频在应用程序捆绑包中本地可用.如果您使用的是URL,请确保侦听该标签的其他事件,以确保用户在应用启动之初不必面对缓冲.

Also In my case the video is available locally within the app bundle. In case you are using a URL make sure to listen to other events for the tag to make sure that the user does not has to face buffering at the beginning of app launch.

这篇关于视频作为手机屏幕上的启动屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆