Since version 8.11, we have been encouraging LAC users to install the free, well-known "vlc" media player application in their LINUX computers hosting LAC. This is optional, and LAC will run without vlc, but because vlc is so easy for LAC's new mission developers to use, and it makes such a nice enhancement to those missions, we anticipate that it will become increasingly attractive among our community.
In support of this, LAC already has an infrastructure that players can use in case vlc causes a problem for them. In our experience, if vlc is NOT installed, then any attempt any future mission may make to use it is simply and harmlessly discarded by the operating system. Nevertheless, vlc is a "heavy" application and it may load too slowly to be practical if the user does not have a lot of RAM, so there is already a user-configurable provision that will prevent LAC from attempting to invoke vlc. This could be used by any user that ever has a problem caused by vlc. It's done by setting the "8" bit within LAC's "NetworkMode" configuration variable within the user's ~home/.LAC/LacConfig.txt configuration file.
Here is a very simple code block sample showing how to invoke vlc:
(Note that "YouTube" video clips generally require tedious extra configuration of VLC and therefore are NOT practical for our use by this means.)
If you want to add video clips to a new LAC mission, this technique can work for you. It works best with short, low-resolution video clips for fastest loading. You will need to find or create an appropriate video clip and upload it somewhere, then reference the appropriate URL according to the pattern shown above. If you create a video clip to our liking we may be willing to host it at AskMisterWizard.com for you.
; )
Last edit: bbosen 2023-04-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since version 8.11, we have been encouraging LAC users to install the free, well-known "vlc" media player application in their LINUX computers hosting LAC. This is optional, and LAC will run without vlc, but because vlc is so easy for LAC's new mission developers to use, and it makes such a nice enhancement to those missions, we anticipate that it will become increasingly attractive among our community.
In support of this, LAC already has an infrastructure that players can use in case vlc causes a problem for them. In our experience, if vlc is NOT installed, then any attempt any future mission may make to use it is simply and harmlessly discarded by the operating system. Nevertheless, vlc is a "heavy" application and it may load too slowly to be practical if the user does not have a lot of RAM, so there is already a user-configurable provision that will prevent LAC from attempting to invoke vlc. This could be used by any user that ever has a problem caused by vlc. It's done by setting the "8" bit within LAC's "NetworkMode" configuration variable within the user's ~home/.LAC/LacConfig.txt configuration file.
Here is a very simple code block sample showing how to invoke vlc:
That little block of code will invoke vlc in a small window on top of LAC and attempt to play the mp4 video clip addressed by the URL at http://AskMisterWizard.com/RaspberryPiCockpitForLAC.mp4.
(Note that "YouTube" video clips generally require tedious extra configuration of VLC and therefore are NOT practical for our use by this means.)
If you want to add video clips to a new LAC mission, this technique can work for you. It works best with short, low-resolution video clips for fastest loading. You will need to find or create an appropriate video clip and upload it somewhere, then reference the appropriate URL according to the pattern shown above. If you create a video clip to our liking we may be willing to host it at AskMisterWizard.com for you.
; )
Last edit: bbosen 2023-04-25
Of course, you want to choose a location within your code that only gets invoked ONCE during the time duration of the video to be played.