Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring of Audio Player #255

Open
femans opened this issue Sep 27, 2022 · 0 comments
Open

Refactoring of Audio Player #255

femans opened this issue Sep 27, 2022 · 0 comments

Comments

@femans
Copy link
Contributor

femans commented Sep 27, 2022

The audio player software has become more complex than necessary.

audioControls.ts has a reactive object that implements the IAudio interface, which references a player that implements the IMediaPlayer interface. The IAudio object passes itself as a context to the player, so that callbacks can be made to update the reactive values.

This IMediaPlayer interface shadows the Howl player, which is slightly impractical in usage (in a reactive environment), making the IMediaPlayer less than ideal.

Because of this structure, a lot of calls hence and forth need to be made between the IAudio object and IMediaPlayer callbacks.

Potentially, the IMediaPlayer interface and the IAudio interface could be combined into a single MediaPlayer class, making the code easier to analyze and maintain.

femans added a commit that referenced this issue Sep 27, 2022
femans added a commit that referenced this issue Sep 27, 2022
* implement midiplayer to patch into the audioplayer

* implemented full midi player object, fully compatible, pluggable into the audioplayer

* midi player working again, with callbacks

* FIX MAJOR BUG in audioplayer: resume playback after pause

* midi playing to the end working

* get time tracking working for midi files

* FIX BUG: responsiveness app header for detail view

* fix error handling on midi files

* add abortcontroller to cancel in-flight requests when switching to another audiofile

* some small fixes

* lint&prettier cleanup

* allow seeking

* remove debug messages

* simplify code sligntly

* use getResourceUrl in stead of hardcoded gateway url

* fix negative times

* improved avatar icons

* clean up midi event handler function

* less code duplicates

* removed todo in favor of #255
femans added a commit that referenced this issue Oct 12, 2022
Version 1 is finally there!
* introducing Planetarify Pro - playlist feature
* Styling of homepage; re-introducing slogan 'searching the universe since 2017'
* considerable improvements to responsiveness in all views
* Midi support in audioplayer
* fixing scrolling issues
* MKV support
* linked content in html viewer
* Various improvements and bug fixes
------------------------------------------
commits:
* Update issue templates

* Update feature_request.md

* Links from HTML files loading, remove VideJS, MKV support  (#248)

* Some fixes for the pdf viewer code
* Integrated rendering of HTML including linked content (where available)
* Make reference link to the actual page in stead of just the parent hash
* Added support for MKV (where possible). 
* Refactored video player (factoring out videoJS)
* Add matroska to video types filter

* added Play-all button to list view

* added playlist store and fill store when click Play all button

* cast playlist to localStorage and recover from localStorage. move to TS for vuex

* add playlist view; remove obsolete code from searchFilterMenu

* add music icon to app bar. Add enqueue function

* added playlist panel

* double click playlist entry to play it in the audioplayer

* refactored audiocontrols and audioplayer in to typescript

* lots of styling fixes, scrollbar fixes, bug fixes, other fixes

* got reactivity to work for the audio list

* stuff works again

* playlist playing working

* add skip controls to player. Add blinking play button for song that is playing. Better loading indicator

* fix: cancel audio playback when play video

* auto skip error files. remove white dots. Disable next/prev buttons for first/last song

* fixed audio item search view box sizing

* introducing unrelated feature: FileType Icons

* fix spacing of buttons on general page

* cleanup search list view

* responsive alignment of searchview

* responsive alignment of searchview video fix

* responsive alignment of searchview video fix; fix audio play/enqueue buttons on small screens

* make search field small in playlist mode

* loop function

* fast link to audio detail

* major improvement to Home view: remove text panels; several responsiveness fixes; refactoring of some components

* adjust scrollbar of search page for footer

* scrollbars finally working properly!

* some more responsiveness fixes; introducing the color "planetifyDark"

* add delete entry function. add more styling to playlist entries

* added slogan "Searching the Universe since 2017", fixes #221

* z-index of settings menu fixed

* less obtruse buttons for search list headers

* some better icons for buttons

* fix codeclimate issues

* improvements to big screen responsiveness

* empty playlist note

* empty playlist note - fix for small screen

* remove z-index from audio player

* fix scrolling issues

* fix for vuetify bug with v-scroll directive; upgrade of vuetify

* fix bug #241

* fix the scrolling bug again

* small fix in videolist component

* remove disabled button styles for banner

* alignment of searchbar

* change file details icon

* remove accidental styling causing weird behavior

* make planetifyDark color even darker

* simplify some code

* Perform async nsfw get in action not commit. (#247)

* Perform async nsfw get in action not commit.

Increases responsiveness and performance significantly.

* Perform async nsfw get in action not commit.

Increases responsiveness and performance significantly.

* wrap conditional around loop

* remove unnecessary todo

Co-authored-by: Frido Emans <[email protected]>

* adding metatags (#253)

Co-authored-by: Frido Emans <[email protected]>

* change year of home view to 2016

* Feature/midi player (#254)

* implement midiplayer to patch into the audioplayer

* implemented full midi player object, fully compatible, pluggable into the audioplayer

* midi player working again, with callbacks

* FIX MAJOR BUG in audioplayer: resume playback after pause

* midi playing to the end working

* get time tracking working for midi files

* FIX BUG: responsiveness app header for detail view

* fix error handling on midi files

* add abortcontroller to cancel in-flight requests when switching to another audiofile

* some small fixes

* lint&prettier cleanup

* allow seeking

* remove debug messages

* simplify code sligntly

* use getResourceUrl in stead of hardcoded gateway url

* fix negative times

* improved avatar icons

* clean up midi event handler function

* less code duplicates

* removed todo in favor of #255

* changing photo src for OG metatags

* add system media controls to the playlist. Fixes a minor bug in templ… (#260)

* add system media controls to the playlist. Fixes a minor bug in template rendering. Fixes issue that playing song outside of playlist still enabled the next/previous buttons

* fix loop function

* several codequality and minor fixes; media session controls improvements. Loop state added to the persisted playlist state

* minor lint fix and add album to audioplayer

* target blank for homepage links

* bump version to 1.0.0 for official silent release

Co-authored-by: Mathijs de Bruin <[email protected]>
Co-authored-by: ZMajer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant