The discussion is about disabling the media download option in onebox on a Discourse platform. martin9973 is trying to achieve this by setting SiteSetting.disable_onebox_media_download_controls to true, but it’s not working. Jagster questions the purpose of disabling downloads, as it might restrict users from listening to audio content.
Martin9973 explains that disabling explicit download options can help prevent intellectual property infringement. JammyDodger suggests a related topic that might be helpful.
Falco advises rebaking or editing the post with local audio, but martin9973 still faces issues. Falco clarifies that the site setting only affects onebox, not all types of audio.
To make the first case work, Falco suggests modifying the code in discourse-markdown-it.js. Martin9973 attempts a hardcoded fix but faces issues due to the asset pipeline. Falco recommends using a theme-component as a quick solution.
./launcher enter app
rails c
SiteSetting.disable_onebox_media_download_controls=true
and also here
vi containers/app.yml
under params:
disable_media_download_controls: true
disable_onebox_media_download_controls: true
under env:
DISCOURSE_DISABLE_ONEBOX_MEDIA_DOWNLOAD_CONTROLS: true
but still audio can be downloaded through the onebox’s “download” option. Anyone can help? many thanks.
if you allow explicit download option, then the audio/video content could be stored/used/commercialised elsewhere, where such intellectual property may not be authorised properly. So it is probably wise to make the default option to disable the explicit download option.
Can you advise how to achieve that in the setting/code level. thanks.
As far as the website (using discourse) itself is concerned, it is important to avoid any future IP-related issue. Even if the author use a TC or some sort of theme, any infringement of the IP could make the website liable for potential damage etc. Even if the website may seem to have nothing to do with it, just because it acts as a channel of exchange, some lawyer may have other thoughts.
So to disable explicit download option should be quite useful, as you wouldn’t see such option on most of the big websites like youtube. Can anyone help with the code/setting to make it happen please.
That wouldn’t work as the JS is compiled by our rather complicated asset pipeline.
If you want a quick and hacky solution, a theme-component that listens to our decoratedCooked callback and changes the audio element is your best bet. You can learn about it on Developer’s guide to Discourse Themes