I checked out Bugs in Kodular Eagle before creating a new topic Describe your issue
The Kodular Video Player is not playing assets programmatically.
Steps to reproduce the issue
Add the component
Set source to none initially and controls not visible
Programmatically (blocks) set source to
start method - nothing happens However when I show the controls and manually press Play, video plays well.
Video should play.
Video does not play.
Use clock or web component in clock
Clock: Set 1-2 sec time and then after set video source then enable clock time and after clock time do then off time and set video player play video.
Web: Use web component and set url to
https://www.google.com/ and after set video source then call to web get block after that use when got text block then set video player to play video.
Thanks a lot
I used the clock component (instruction 1), set it to 2 seconds and everything worked like a charm.
Really appreciate your help in this.
Posting an update on this:
The solution above works in the Companion.
When you build the apk, you get an Error 701 (file not found).
There is already another thread about this if you search in the community forum and it seems to be a bug with the VideoPlayer component. There are workarounds but I prefer a working component.
Can someone suggest a good (and possibly free) video player extension for Kodular until the bug is fixed please?
It would really help if you provided a screenshot of your
relevant blocks, so we can see what you are trying to do, and where the problem may be.
To get an image of your blocks, right click in the Blocks Editor and select “Download Blocks as Image”. You might want to use an image editor to crop etc. if required. Then post it here in the community.
This bug still doesn’t seem to have been fixed since 2019.
There is obviously a bug with the Video_Player component. The video player does not find / get the (right) path to the assets. In addition, READ_EXTERNAL_STORAGE permission is falsely requested even though the video file is played from the assets. Companion works. The other AI versions do not have this error.
To reproduce the error, here is a test aia:
videoPlayerTest.aia (633.6 KB)
EDIT: I posted this bug on July 2019. Today is Oct 10, 2020 and the bug is still not fixed.
No, this bug is not fixed, even not on the Beta server.
I reported this bug already on July 2019.
The approach of
@drpeterramsis2007 is not really a solution or a trick, as you should always avoid that unnecessary permissions are required (in this case: READ_ / WRITE_EXTERNAL_STOARGE).
Therefore you should wait for a fix or use an extension.
If you still want to go this way, you have to use Taifun’s file extension ( App Inventor Extensions: File | Pura Vida Apps), because the File component…
Both methods should work, but there is obviously still the same bug that I reported already in July 2019. (Companion works.)
@Kodular please fix it.
Thanks for all your replies.
@Taifun - the 701 error disappears when I load the file from the device using file:///sdcard/…
@bodymindpower - Yes in fact it seems that the bug is still not solved unfortunately
My suspicion is that the Video Player is always trying to find the source either from the internal storage of the device or else from the Application Specific Directory.
To test this, I would appreciate your help (maybe even posting a screenshot with the blocks). I would like to make my application such that on Screen1.Initialize:
Checks if my video assets exist in the ASD
If not, the app copies them to the ASD
I will then test by trying to play the video using just the name. If this works, then my theory is right.
I guess it can be done using a combination of
@Taifun file extension ( https://puravidaapps.com/file.php) and the extension by @bodymindpower that I found here: https://community.appinventor.mit.edu/t/get-the-path-of-the-asd-app-specific-directory/17004 - However I do not know whether it works in kodular as well.
Thanks in advance for your time.
yes, of course… what about trying something yourself?
all the methods you need you can find in the file extension
and if you get stuck, then post a screenshot of your relevant blocks…
@Taifun using your extension I successfully managed to copy my files to the ASD. However the Video Player still does not search for the files there, when using just the name (ex: video1.mp4). Therefore, my suspicions were wrong.
I have decided to create a folder and store all the videos there temporarily. However I have a list of videos which I intend to copy asynchronously. I do not know how to handle the AfterFileListAsync event correctly though. I know how to store files in a list but how can I copy them one by one and detect when the last file in the list has finished copying please?
Here is a test APK that can be used to test different paths of the
As I have said often enough, it is still not possible to play a video from the assets. But other paths (especially from the ASD) do not work either.
videoPlayerPath.apk (5.9 MB)
Can you please check this.
These bugs should finally be fixed.
I reported this bug for the first time in July 2019.
Test on a Galaxy Note8 (Android 9):
(Note: on a Pixel 2XL, Android 11, no path to ASD works)
We’ll take a look again, thanks for reminding us of the issue
do it asynchronously… i.e. Copy the first file and in the Copied event check if there is another file to copy and if yes copy it, etc.
see also this example App Inventor Tutorials and Examples: Webprefetch File by File | Pura Vida Apps which is about something completely different, but the logic to use is the same
@Taifun for providing the link. It helped me a lot and I managed to achieve what I wanted.
@bodymindpower for reminding Kodular staff of the issue and for providing the videoPlayerPath.apk - Things are much clearer to me at this point. I hope that this VideoPlayer bug is solved soon…
Yes, and this issue (topic) has
not yet been resolved.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.