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

Feature/midi player #254

Merged
merged 22 commits into from
Sep 27, 2022
Merged

Feature/midi player #254

merged 22 commits into from
Sep 27, 2022

Conversation

femans
Copy link
Contributor

@femans femans commented Sep 26, 2022

implements midi player with random instruments.
Great care has been taken to make sure the player stops properly, does not play 2 songs through eachother, gets torn down when moving to a next song, and cancels the download if you stop/skip before it was (fully) loaded.

also fixes 2 bugs in the playlist functionality that were found along the way and makes the avatar icons on playlist prettier.

@dokterbob dokterbob mentioned this pull request Sep 27, 2022
Copy link
Member

@dokterbob dokterbob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small comments, do with it as you will.

MIDI and FLAC and MP3 all play wonderful, also going smoothly from song to song, the UX is also responsive and sensible. Consider the issue below minor issues, deserving of a ticket but not requiring fixup in this PR.

The code comments might be worth a small fixup though (e.g. removing commented code or TODO's).

Formats tested (Brave)

  • FLAC
  • MP3
  • MIDI
  • WMA
  • WAV
  • OPUS

User test: issues

  • Prev/next not working from detail view (entering from list view)
  • No user feedback for unsupported files
  • mdi-chevron-up missing
  • No file type shown in list and detail header for OPUS

Prev/next not working from detail view

  1. Open audio list view https://bafybeidrmheunuh7awdmfvr23o7yll4exi65uzlstgb7vskz2fz6giw5ji.on.fleek.co/#/search?type=audio&page=1
  2. Click on a song, moving to detail view
  3. Click play
  4. Click next or prev

Expected: move to previous or next song in search results.
Instead: nothing happens.

Perhaps this is intended behaviour, it just doesn't match my naive expectations.

No user feedback for unsupported files

On detail view for an unspported file, clicking on play results in an error in the console but no user feedback.

Example: https://bafybeidrmheunuh7awdmfvr23o7yll4exi65uzlstgb7vskz2fz6giw5ji.on.fleek.co/#/search/detail/audio/QmcLYjMMrAnou6LAgamY38wiqFgJhdyJ4E5RAEgQTxptGr?type=audio&page=2&last_seen=%3C30d

mdi-chevron-up missing

In detail view, I am getting the following error in the console:
Error: <path> attribute d: Expected number, "mdi-chevron-up".
Example: https://bafybeidrmheunuh7awdmfvr23o7yll4exi65uzlstgb7vskz2fz6giw5ji.on.fleek.co/#/search?type=audio&page=2&last_seen=%3C30d

No file type shown in list and detail header for OPUS, WAV

Example (list)

image

https://bafybeidrmheunuh7awdmfvr23o7yll4exi65uzlstgb7vskz2fz6giw5ji.on.fleek.co/#/search?type=audio&page=3&last_seen=%3C30d

Example (detail)

https://bafybeidrmheunuh7awdmfvr23o7yll4exi65uzlstgb7vskz2fz6giw5ji.on.fleek.co/#/search/detail/audio/QmT5mBGTfgh863gg28bs7pED2sXXKukXuE8vaYx3UyD99L?type=audio&page=3&last_seen=%3C30d

src/helpers/midiPlayer.ts Outdated Show resolved Hide resolved
src/helpers/midiPlayer.ts Outdated Show resolved Hide resolved
src/interfaces/audioInterfaces.ts Outdated Show resolved Hide resolved
@femans
Copy link
Contributor Author

femans commented Sep 27, 2022

@dokterbob created issues for everything mentioned and cleaned up the instrument selector code, should be good now

@femans femans merged commit c794e63 into staging Sep 27, 2022
@femans femans deleted the feature/midi-player branch September 27, 2022 16:21
femans added a commit that referenced this pull request 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

Successfully merging this pull request may close these issues.

2 participants