I have this tiny Gnoga app: with Ada.Exceptions;
with Gnoga.Application.Singleton; with Gnoga.Gui.Base; with Gnoga.Gui.Element.Common; with Gnoga.Gui.Element.Multimedia; with Gnoga.Gui.View; with Gnoga.Gui.Window; package body MP.UI is Window : Gnoga.Gui.Window.Window_Type; View : Gnoga.Gui.View.View_Type; Player : Gnoga.Gui.Element.Multimedia.Audio_Type; Quit : Gnoga.Gui.Element.Common.Button_Type; procedure Quit_Now (Object : in out Gnoga.Gui.Base.Base_Type'Class) is -- Empty; begin -- Quit_Now Gnoga.Application.Singleton.End_Application; exception -- Quit_Now when E : others => Gnoga.Log (Message => "Quit_Now: " & Ada.Exceptions.Exception_Information (E) ); end Quit_Now; begin -- MP.UI Gnoga.Application.Title ("MP"); Gnoga.Application.HTML_On_Close ("MP ended."); Gnoga.Application.Open_URL; Gnoga.Application.Singleton.Initialize (Main_Window => Window); View.Create (Parent => Window); Player.Create (Parent => View, Source => "glass.ogg", Preload => True); Gnoga.Log(Player.Media_Source); View.New_Line; Quit.Create (Parent => View, Content => "Quit"); Quit.On_Click_Handler (Handler => Quit_Now'Access); Gnoga.Application.Singleton.Message_Loop; exception -- MP.UI when E : others => Gnoga.Log (Message => Ada.Exceptions.Exception_Information (E) ); end MP.UI; which works fine and reports the source as "http://127.0.0.1:8080/glass.ogg". However, if I want to access a file not in the current directory, I have problems. Using "~/Code/Chattanooga/glass.ogg" results in the widget not being shown, and the source as "http://127.0.0.1:8080/~/Code/Chattanooga/glass.ogg". "/home/jrcarter/Code/Chattanooga/glass.ogg" also results in the widget not being shown and the source as "http://127.0.0.1:8080/home/jrcarter/Code/Chattanooga/glass.ogg". "file:///home/jrcarter/Code/Chattanooga/glass.ogg" results in the widget being shown, but nothing plays, with the reported source also being "file:///home/jrcarter/Code/Chattanooga/glass.ogg". The file exists: $ ll /home/jrcarter/Code/Chattanooga/glass.ogg -rw-r--r-- 1 jrcarter jrcarter 18999 Jan 11 2015 /home/jrcarter/Code/Chattanooga/glass.ogg How can I play a file not in the current directory? -- Jeff Carter "Why, the Mayflower was full of Fireflies, and a few horseflies, too. The Fireflies were on the upper deck, and the horseflies were on the Fireflies." Duck Soup 95 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list