From: dongsug-song <35130733+dongsug-song@users.noreply.github.com> Date: Tue, 14 Apr 2020 01:40:41 +0000 (+0900) Subject: [NUI] Fix VideoView sample (#1518) X-Git-Tag: submit/tizen/20200415.005204~1^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ffeb960b6f993eb1bb637805691025329abfc3f7;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix VideoView sample (#1518) --- diff --git a/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/DaliDemo/DaliDemo.cs b/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/DaliDemo/DaliDemo.cs index 72f26fcd7..44fec3ba7 100755 --- a/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/DaliDemo/DaliDemo.cs +++ b/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/DaliDemo/DaliDemo.cs @@ -10,7 +10,7 @@ namespace Tizen.NUI.Samples { public class DaliDemo : NUIApplication { - public DaliDemo(string styleSheet) : base(styleSheet) + public DaliDemo(string styleSheet) : base(styleSheet, WindowMode.Transparent) { } diff --git a/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/VideoViewTest.cs b/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/VideoViewTest.cs index a42d5ffb9..6705dca55 100755 --- a/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/VideoViewTest.cs +++ b/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/VideoViewTest.cs @@ -27,16 +27,17 @@ namespace Tizen.NUI.Samples myPlayer player; string resourcePath; const string tag = "NUITEST"; + View dummy; public void Activate() { win = NUIApplication.GetDefaultWindow(); - win.BackgroundColor = Color.Green; + win.BackgroundColor = new Color(1, 1, 1, 0); win.KeyEvent += Win_KeyEvent; win.TouchEvent += Win_TouchEvent; - var dummy = new View(); + dummy = new View(); dummy.Size = new Size(200, 200); - dummy.BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.2f); + dummy.BackgroundColor = new Color(1, 1, 1, 0.5f); win.Add(dummy); resourcePath = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "v.mp4"; @@ -49,9 +50,20 @@ namespace Tizen.NUI.Samples { win.KeyEvent -= Win_KeyEvent; win.TouchEvent -= Win_TouchEvent; - videoView?.Unparent(); - player?.Dispose(); - player = null; + + tlog.Fatal(tag, $"Deactivate()!"); + + dummy.Unparent(); + + videoView.Unparent(); + + // currently it is crashed when Dispose() is called. need to check. + //videoView.Dispose(); + //videoView = null; + //player.Unprepare(); + //player.Dispose(); + //player = null; + tlog.Fatal(tag, $"Deactivate()! videoView dispsed"); } int cnt;