mediagoblin-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

m3u support for Mediagoblin


From: Ben Sturmfels
Subject: m3u support for Mediagoblin
Date: Tue, 30 Mar 2021 15:02:52 +1100
User-agent: mu4e 1.4.15; emacs 27.1

[Forwarding Arne's message on the Guix bugtracker on to MediaGoblin devel.]

On Mon, 22 Mar 2021, Dr. Arne Babenhauserheide wrote:

> Ben Sturmfels via Bug reports for GNU Guix <bug-guix@gnu.org> writes:
>
>> On Fri, 19 Mar 2021, jgart wrote:
>>
>>> This sounds like a great project. I would love MediaGoblin to be in Guix 
>>> also.
>>>
>>>> 6. Rewrite MediaGoblin's JavaScript code not to use jQuery. Maybe
>>>> improve the no-bundled-JavaScript video/audio playing experience.
>>>
>>> What are your thoughts on rewriting the jquery? 
>>>
>>> Should MediaGoblin be using vanilla javascript instead?
>>>
>>> Some other possibilities could be purescript (https://www.purescript.org) or
>>> mint (http://mint-lang.com), although mint and crystal are not in guix yet 
>>> and
>>> mint uses preact (http://preactjs.com) as its' runtime since 0.8.0
>>> (https://www.mint-lang.com/blog/mint-0.8.0).
>>
>> Many of the functions we used to use jQuery for are now built into most
>> browsers from the last 10 years.
>>
>> By far the most common are element selectors like:
>>
>>   var panel = $('#header-panel')
>>   var arrow = $('.arrow')
>>
>> which we just change to:
>>
>>   var panel = document.querySelector('#header-panel')
>>   var arrow = document.querySelector('.arrow')
>>
>> This is all vanilla JavaScript in individual files imported via <script>
>> without any sort of compilation process. This seems to be the simplest
>> path to get into distributions like Guix and Debian. The main problem
>> with purescript and others is that they require more dependencies, build
>> steps and tooling and are known by less people.
>>
>> We have a few dependencies which will be harder to deal with such as the
>> video, audio and 3D model viewers. In the first instance, I think the
>> answer will be to do without this JavaScript entirely. That should be
>> feasible for video and audio given modern browser support. Perhaps we
>> don't ship 3D model support out of the box in distros for now.
>
> If you need support for m3u-playlists, you can use the player I wrote
> here: https://www.draketo.de/software/m3u-player
>https://www.draketo.de/software/m3u-player.js (save as utf-8)
> (that m3u-playlists aren’t supported out of the box in most players is a
> strange oversight, the code adds it for video- and audio-tags, License:
> GPLv2 or later — just ask me if you need something else)
>
> There’s also an enhanced version for Freenet, but that has lots of
> performance-changes to work over high-latency networks and with paranoid
> CSP-settings:
> https://github.com/freenet/fred/pull/721/files#diff-33cbf95723ae7b33eb205cf9adc3411b2098e27ba757e553406f689a4fafb802
>
> Best wishes,
> Arne



reply via email to

[Prev in Thread] Current Thread [Next in Thread]