This topic describes what is Video Splash Screen and how you can use it.
Video Splash Screen displays a short video while the application is loading and a static splash screen after the video is finished if the application is not loaded yet or no file for video splash screen was provided.
Separate video splash screen can be used for landscape and portrait oriented screens.
The video terminates after one of the below events and only those events. You have to choose one of them for your application:
If during these events the video will be terminated but the application isn't fully loaded a static splash screen will appear for the remaining time.
The feature works with the following types of applications:
This topic describes how to add video splash screen to a web application.
In config.xml add tag:
<tizen:video_splash_screen ready_when="video-finished"> ... </tizen:video_splash_screen>
Inside this tag you can define splash screens depending on their orientations:
<tizen:vss_default ../> <tizen:vss_landscape .../> <tizen:vss_portrait .../>
The table below shows the description of each tag and its attributes.
Description of video_splash_screen element
Video Splash Screen child elements
Descrition of vss_default
Descrition of vss_landscape
Descrition of vss_portrait
Below is the example video splash screen declaration in config.xml of a web application.
<tizen:video_splash_screen ready_when="complete"> <tizen:vss_default video="res/test_video.mp4" background_image="background.png" background_color="#cbe0f2" image="Samsung.png" image_border="0px stretch"/> <tizen:vss_portrait video="res/test_video_portrait.mp4" background_image="background.png" background_color="#cbe0f2" image="Samsung.png" image_border="0px stretch"/> <tizen:vss_landscape video="res/test_video_landscape.mp4" background_image="background.png" background_color="#cbe0f2" image="Samsung.png" image_border="0px stretch"/> </tizen:video_splash_screen>
This topic describes how to add video splash screen to a native, hybrid and .NET application.
In tizen-manifest.xml add tag:
<splash-screens> ... </splash-screens>
Add communication between the application and video splash screen port. A. Import aul_app_com_create from aul library to your application (the path is /usr/lib/libaul-extension.so.0). Example code in C#:
private const string AulLib = "/usr/lib/libaul-extension.so.0"; public delegate int app_com_cb(byte* endpoint, int result, ref bundle_t enevelope, IntPtr userdata); [StructLayout(LayoutKind.Sequential)] public struct aul_app_com_connection_s { public byte* endpoint; public app_com_cb callback; public IntPtr user_data; } [StructLayout(LayoutKind.Sequential)] public struct bundle_t { public IntPtr kv_head; } [DllImport(AulLib, EntryPoint = "aul_app_com_create")] public static extern int aul_app_com_create(byte* endpoint, IntPtr permission, IntPtr callback, IntPtr user_data, ref IntPtr connection); ...
B. Create a message received callback. Example code in C#:
private DllImports.app_com_cb callback; private IntPtr connection; public unsafe int MessageReceived_Callback(byte* endpoint, int result, ref DllImports.bundle_t enevelope, IntPtr userdata) { ShowMenu(true); return 0; } ...
Create a message port for video splash screen communication before starting to load the application. The name of the port is created by pattern: "crosswalk.splashscreen.player." + appid, where appid is tv application's id. Example code in C#:
callback = MessageReceived_Callback; DllImports.Create(); fixed (byte* p = ResourceLoader.GetBytes("crosswalk.splashscreen.player.JuvoPlayerOpenGLNative.Tizen.TV")) { DllImports.aul_app_com_connection_s con = new DllImports.aul_app_com_connection_s(); connection = Marshal.AllocHGlobal(Marshal.SizeOf(con)); DllImports.aul_app_com_create(p, IntPtr.Zero, Marshal.GetFunctionPointerForDelegate(callback), IntPtr.Zero, ref connection); } ...
The following table lists the structure and parameters for splash-screens tag.
Sctructure of splash-screens
Sctructure of tv-splash-screen
Below is the example video splash screen declaration in tizen-manifest.xml of a native application.
<splash-screens> <tv-splash-screen dpi="hdpi" indicatordisplay="true" color_depth="video-finished" orientation="portrait" src="test_video_portrait.mp4" type="video" /> <tv-splash-screen dpi="hdpi" indicatordisplay="true" color_depth="video-finished" orientation="landscape" src="test_video.mp4" type="video" /> </splash-screens>
The following table defines the video splash screen limitations.
Video splash screen limitations
The following table defines the static splash screen limitations.
Static splash screen limitations