Sep 29, 2021 Replies: 20 This library includes two custom views: MediaView and MediaViewController. MediaView can play local and remote videos and music. The native JavaFX MediaView doesn't include a controller interface. I've implemented one. You can use it or create your own. Tip: the controller code and layout are inside the b4xlib file. Usage: Add the two custom views and connect them: Code: Copy MediaViewController1.SetMediaView(MediaView1) Set the video source. Code: Copy MediaView1.Source = "https://player.vimeo.... Use File.GetUri to play a local file. Tip: the simplest way to create a MediaView is with SimpleMediaManager: https://www.b4x.com/android/forum/threads/134716/#content Updates v1.03 - The MediaViewController class instance wasn't assigned to mBase.Tag correctly. This is fixed (https://www.b4x.com/android/forum/t...he-mediaviewcontroller-b4j.159864/post-981468) v1.02 - Fixes an issue with setting the volume. v1.01 - Fixes a layout issue. Attachments MediaViewExample.zip MediaViewExample.zip 10.6 KB · Views: 1,178 MediaView.b4xlib MediaView.b4xlib 4.9 KB · Views: 779 Last edited: Mar 13, 2024 Click to expand...
This library includes two custom views: MediaView and MediaViewController. MediaView can play local and remote videos and music. The native JavaFX MediaView doesn't include a controller interface. I've implemented one. You can use it or create your own. Tip: the controller code and layout are inside the b4xlib file. Usage: Add the two custom views and connect them: Code: Copy MediaViewController1.SetMediaView(MediaView1) Set the video source. Code: Copy MediaView1.Source = "https://player.vimeo.... Use File.GetUri to play a local file. Tip: the simplest way to create a MediaView is with SimpleMediaManager: https://www.b4x.com/android/forum/threads/134716/#content Updates v1.03 - The MediaViewController class instance wasn't assigned to mBase.Tag correctly. This is fixed (https://www.b4x.com/android/forum/t...he-mediaviewcontroller-b4j.159864/post-981468) v1.02 - Fixes an issue with setting the volume. v1.01 - Fixes a layout issue.
LucaMs Expert Licensed User Longtime User Friday at 7:05 AM #21 Erel said: Correct, and this suggestion still applies: Tip: the simplest way to create a MediaView is with SimpleMediaManager: https://www.b4x.com/android/forum/threads/134716/#content Click to expand... Yes, I read about SimpleMediaManager right away, but... ChatGPT, my zero-salary employee , prefers to use the two views directly, to have more "freedom" (though I don’t recall the exact reason at the moment ).
Erel said: Correct, and this suggestion still applies: Tip: the simplest way to create a MediaView is with SimpleMediaManager: https://www.b4x.com/android/forum/threads/134716/#content Click to expand... Yes, I read about SimpleMediaManager right away, but... ChatGPT, my zero-salary employee , prefers to use the two views directly, to have more "freedom" (though I don’t recall the exact reason at the moment ).