Linking to additional fles on article landing page

I wonder if this works next time with OJS if you check the option “Do this automatically for files like this from now on”?

If you use Firefox please go to Prefeences/Files and applications and check this:
Screenshot_2019-01-24_17-14-34
When you click on Always ask besides Mp3 you will see other option.

Tried it, I still get the options window, even after telling Firefox to open the file with an audio player. Does it work for you, saving the default?

No, as I put screenshot before I have option to download and to open it with player. Pragha is media player.
Screenshot_2019-01-24_16-47-36

Yes, but if you check the option “do this automatically…”, it should open with Pragha by default next time (VLC in my case), but it doesn’t but still offers the same dialog box, at least in my case.

That is rather issue of browser I guess.

I cannot see the reason, as audio files from other sites open with audio player now (after selecting the default), it’s only links to OJS audio galleys that don’t.

Hi all,

Unless OJS knows it can handle a galley file (e.g. via plugins, as the HTML galley plugin, PDF.js plugin, and Lens galley plugin do), it’ll force the browser to download the galley file. Have a look at Intersectional Apocalypse – they’ve uploaded a small HTML wrapper to present the audio file to get around this.

The “proper” way to do it would be to add a plugin to OJS that embeds the audio file, but I’m not aware of anyone who has done that yet.

Regards,
Alec Smecher
Public Knowledge Project Team

2 Likes

Thanks, at least now I know the reason!
I’m afraid I’m not tech-savvy enough to understand how exactly they did it, though. Did they add an html file as galley?

Hi @ivovolt,

Yes, I believe so – they added an HTML file as a galley, and the HTML file contains the <embed ...> code (or similar) to present the audio file.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks, @asmecher
Yes, it works! You can even add an autoplay attribute to it. But… in order to embed the audio file, the audio file has to be uploaded as a separate galley, right? Then how to make sure that the user only sees the link to HTML galley on article landing page, not both HTML and audio?

Hi @ivovolt,

You can edit the HTML galley and upload the audio as a “dependent” file. That will keep it organized along with its HTML wrapper.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks, @asmecher,
Tried this and seems to work, except that I cannot seem to find the file path/name for this “dependent” file, which I should use in the embedding code.

IV

Hi @ivovolt,

If you refer to the file in the HTML using only the filename on the system from which you’re uploading, OJS should take care of the rest.

For example, in your HTML:

<embed src="myaudio.mp3" ...>

Then upload the file from your local system called myaudio.mp3 into the dependent files list for the HTML galley.

When you open your HTML galley and view the source, you should see that OJS has rewritten the URL in the src=... part of the embed tag.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you so much, @asmecher, OJS wizard!
Now I only have to memorize these steps, because it only works in this order. But it works!