[MBBC]: May Break Backwards Compatibility
0.3.7 - Dec 23
- Bugfix: A previous tweak broke the code that removed volume controls in mobile devices.
- Some code reduction.
0.3.6 - Nov 23
- [MBBC]: MP automatically enters into Free Mode if we don't declare a
suppliedproperty; explicit declaration of afree_modeproperty is no longer required. To update older code, simply removefree_modefrom the script. - [MBBC]: The list of supported audio formats in Supplied Mode has dropped
m4a,m4bandm4r. - Failure to load one file in Free Mode doesn't result in a fatal error anymore. The library simply removes the file from the playlist.
- Feature: Until now, the only (and cumbersome) way to include track times in the playlist was through the use of the
extraproperty. Now MP silently reads and stores the tracks' duration; it can be rendered inside the playlist by adding a newplist_duration = trueproperty, which generates, for each track, a<span>element with classmp-plist-length. - Improvement: In Supplied Mode, a successful format check will stop the library from testing other formats.
0.3.4 / 0.3.5 - Nov 23
- Internal feature development versions. Unpublished.
0.3.3 - Sep 23
- Minor code tweaks.
0.3.2 - Feb 23
- Return to happy 0.2.9 times, with minor code tweaks.
0.3.0 / 0.3.1 - Jan 23
- Brave (but unsatisfactory) efforts to change initial sequence so that Supplied Mode only tests one file for each supplied file type.
0.2.9 - Sep 22
- Bugfix: Initial sequence didn't work as intended after all. Async audio file tests could make MP choose the wrong format before the testing was finished. Fixed (hopefully) with Promises.
- Fix: iPhones were halting execution during audio file test phase. Discovered that Safari doesn't emit
canplayevents when the audio element (just) reads a file; it only goes as far asloadedmetadata. - Minor code tweaks.
0.2.8 - Aug 22
- Simplified cleanup of Supplied Array, updated logs and messages.
0.2.7 - Apr 22
- Initial test sequence now works as intended (hindsight note: nope.)
- New event: Click on "current time" toggles to "remaining time", adding a new class
mp-time-leftfor styling. - Added flag
mobile_volume: trueto make the removal of volume controls in mobile devices optional.
0.2.6 - Apr 22
- Minor tweaks.
- Bugfix: Track end of last track didn't check for the existence of
mp-loop, only formp-loopedclass. - Changed shuffle algorithm to Sattolo's (pure random could produce no change.)
0.2.5 - Apr 22
- Added shuffle functionality.
- Optimized
playlistClick(event);
0.2.4 - Mar 22
- [MBBC]: Changed classes and variable names. Breaks previous HTML + CSS.
mp-vslider-cnt->mp-vol-cntmp-vslider-bar->mp-vol-barmp-progress-cnt->mp-seek-cntmp-progress-bar->mp-seek-barmp-progress-percent->mp-track-percentmp-pl-current->mp-plist-currentmp-repeat->mp-loopwarning->mp-warning
- Some code optimization.
- Abandoned
element.hiddenstrategy as it doesn't work withdisplay: flex;
0.2.3 - Mar 22
- Reworked initial sequence of events, when MP checks audio files.
- Previous load system kept as "Supplied Mode".
- Added a "Free Mode" flag (
free_mode: true) that ignoressuppliedproperty and allows a mixed-format playlist. The script must include the extension in thetracks.fileproperty. - Improved error messages and console logs.
- Added audio formats to
suppliedlist:oga,m4b,m4r,opusandwebm. - Renamed a few variables and functions.
element.hidden = true/falseinstead ofelement.style.display = 'none'- Merged
displayToken()anddisplayImage()in one function (displayToken). - Bugfix:
isMediaReady()-> nowtestMedia(): Moved audio element creation inside the loop.
Ref: Get extensions. Cut off extensions.
0.2.2 - Oct 21
- Added function to check all media files before showing the player.
- Show warning message if player not ready.
- Reworked initial sequence.
- Noob mistake: didn't need to calculate original display style, could just add inline style with
element.style.display = 'none'and remove it after withelement.style.display = ''. Good exercise, though. - [MBBC]: Because of that, went back to
mp-text-playandmp-text-pauseelements (shorter code in JS and HTML.) - Failed to add buffering bar & percent display (various problems, forget.)
- Added a Volume Max function.
- If no title is provided, playlist file name now includes extension.
- Some code reduction.
0.2.1 - Oct 21
- Bugfix: Lyrics display was thrown off if the lyrics divs had more than one class.
- [MBBC]: Renamed a few variables and class names.
- Bugfix: Change display styles failed if there were two players (or +) and one of them didn't feature
mp-text-classes. Created external objectplObjto associate the original style ofmp-playwith the audio element's id. - [MBBC]: Merged
mp-text-play&mp-text-pauseinto onemp-sit-rep, injected by two new playlist object properties,txt_pauseandtxt_play. - Removed unnecessary
(event)argument from controls. - Made new function to choose audio format and file extension.
- Reworked controls' change-style functions.
- Changed a few variable names.
0.2.0 - Sep 21
- Improved
updateVoData()to take heed ofvolume_formatproperty when Muted. - [MBBC]: Changed
volTxt(.mp-vol-text) tovolNum(.mp-vol-number) - Repurposed
volTxtfor a custom label when it's not convinient to use::before&::afterselectors withmp-vol-number. The idea is to be able to remove the element when running on mobile. - Reinstated
.mp-plist-numberfor further flexibility. - Optimized position of variables
progressBarandvolSliderBar(no longer faux global.) - Created object of lyrics display styles, so that each lyrics element can be restored to its original state in
updateLyrics(). - Changed some function names and calls.
0.1.1i - Sep 21
- Reworked style change of mutable controls by reading CSS display property.
- Reworked
playlistClick(). - Minor code reductions.
- Moved
loadingmessage removal toinitLoader(); - Changed a few function and variable names.
- Created
erase()helper function. - Improved array loops.
- Turned track properties into arrays (in case there's more than one instance of each in the HTML.) Affects:
trackNumbertrackTitletrackArtisttrackExtraalbumalbumArtistpostertrackImage
0.1.1h - Sep 21
- Unified bar drag action code in one function.
- Removed functions and calls for each bar.
- Removed
addEventListenerfunctions for controls, volume and time. - Updated
createListItem(). - Made 2 helper functions for some playlist properties.
- Merged
updateVolumeText()andupdateVolSliderBar()in one functionupdateVolData(). Updated relevant function calls. - Minor code optimization fixes.
- Placed
hideLyrics()code insideupdateLyrics(), as it's the only place from where it's called. - Returned
updateAudioSourceinsideloadTrack(). Tweaked functions dependent onfileName(now passed as argument.) - Removed
prependZero()function and moved the code toupdateTrackNumber(). - Removed dot from
fileExt; rewroteaddMimeType()code and moved it insideloadTrack()--bye byeswitchstatement.
0.1.1g - Sep 21
- Eliminated code for number in playlists (can be done with CSS.)
- Removed
plist_numbersobject property. - Added l
eading_zeroobject property to optionally prepend a zero tomp-track-numberclass. - Event listener for clicked playlist items now toggles between play and pause states.
- If there's no
titleproperty in the playlist object, MP usesfileinstead. - Added
volume_format = 'a, b'property. - Substituted
letforconstwhere appropriate. - Put stray code within functions.
- Got rid of code repetition in
pauseAudio(), calldisplayControls()instead. - Moved stop, prev and next declarations into
controlsEventListeners().
0.1.1f - Sep 21
- Updated prev and next functions.
- Removed
playingvariable dependency fromplayNext()andplayPrev(). - Bugfix: Previous/next cross-player bug - player1 'playing' state leaked to player2.
- Added
trackEnd()function. 'Ended' event no longer triggersplayNext(). - Removed
mp-play-stateand theop_text_variables. - Added play state options as
mp-classes. - Removed
loopvariable; repeat now works looking at classmp-looped.
0.1.1e and previous
- Single player.
- Basic playlist functionality.