Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9095325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:34:13+00:00 2026-06-16T23:34:13+00:00

Still working on my personal web server, I was trying to use the html5

  • 0

Still working on my personal web server, I was trying to use the html5 audio and video tags within Nitrogen.

As there is no #audio nor #video records, I decided to insert html text directly in the page generated by nitrogen, the result looks like this:

<audio controls preload="metadata"><source src="../../My Music/subdir/song.ogg" type="audio/ogg"  /source>audio tags not supported</audio>

In my understanding this should work because the audio tag is supposed to be interpreted directly by the client browser, and there is not any nitrogen id or event observer in the code.

But when I browse this code from Firefox, I briefly see the control opening, and then the audio element simply disappears.

If I copy paste the whole code generated by nitrogen (display html source page, copy and paste in a file located at the origin of the nitrogen project) and open it with the browser, it works fine. The relative path is correct, assuming that the search stats in nitrogen project. I have tried absolute path also, without success.

I don’t know

  • if it builds a file name of the form “.._.._My music_subdir_song.ogg” like nitrogen does for url analysis,
  • or if it uses another directory to start the path,
  • or if it simply doesn’t work the way I am thinking.
  • …

Edit: some complementary information:

I have done the following changes:

create one directory including some ogg files in the site/static directory + move a static test.html file in the site/static. If I open directly test.html -> ok. if I redirect from my web site -> Not ok.

same test with a copy of the directory at the Nitrogen application root and access from my web site -> not ok

As the information on the web page is ambiguous, I modified test.html to access to a file that does not exist on my PC -> same behavior.

I think I’ll use the debugger to understand how the request is managed, to be continued…

Edit 2:

using the debugger I can verify that the wf_core:run_catched() is called several times. The fist call is when it process the event in my page that redirect to the static file.

The second time to process the static html file itself.

A third time to process finish_static_request() with a Path equal to my_music/song.ogg, and then I get lost in the processing of the answer. Another wf_core:run_catched() was called in parallel, but I didn’t follow it…

I have been able to verify that the file can be accessed: I have added several audio tag in the html files, and I was able to “download” the existing files using the DownloadHelper Firefox plugin.

My understanding now is that the path is correct (at least when I place the files in a subdirectory of site/static), the server is able to retrieve the files and send them, the browser recognize the audio and video tags, but the link between the embedded audio/video reader and the files is lost, although I have added a type definition inside the audio tag.

Any idea to continue?

Edit 3:

Finally I got it. As Chops suggest it I had to go in the inets server configuration, not to define the path, but to define the type association. I have added the following definitions in etc/inets_httpd.erlenv, and it works.

{mime_types, [
    {"css", "text/css"}, 
    ...
    {"ogg","audio/ogg"},
    {"webm","video/webm"}
]}

:o)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T23:34:15+00:00Added an answer on June 16, 2026 at 11:34 pm

    Based on the contents of the url attribute (“../../My Music/subdir/song.ogg”), the problem, when it’s served from Nitrogen is that the request (Assuming you’re using the default 127.0.0.1:8000) for the audio will be to the url “http://127.0.0.1:8000/My Music/subdir/song.ogg”

    What you want to to do, if you’re using the standard Nitrogen installation, is to put the song files you want into the site/static directory, perhaps in “songs” subdirectory.

    Then change the url attribute to be “/songs/mysong.ogg” (or whatever path within site/static you used).

    Note: Dependinding on your server choice (Webmachine, for example), you may need to tinker with the server’s specific config file to tell it to handle the new directory for static paths, for help, check the configuration docs on the Nitrogen site.

    Beyond that, there’s nothing special about outputting raw HTML in Nitrogen. It is my understanding that the problem here is really just related to the paths of the requests being sent to the server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am still working with securing my web app. I decided to use PDO
Still working my way around this, but is there any function/command I can use
Is there anyone working solo and using fogbugz out there? I'm interested in personal
I'm working on my personal rails project and I'm still learning a lot of
I'm working on a personal learning project to help me understand how to use
I am working on a small backup application for my personal use, and as
Still working on a web application as a school project, and it just seems
I've been trying to use Git on my personal projects for almost a month
I'm still working on groking the F# thing - trying to work out how
Still working through JQuery to get data and repopulate portions of a page. Right

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.