[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
supplied
property; explicit declaration of afree_mode
property is no longer required. To update older code, simply removefree_mode
from the script. - [MBBC]: The list of supported audio formats in Supplied Mode has dropped
m4a
,m4b
andm4r
. - 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
extra
property. Now MP silently reads and stores the tracks' duration; it can be rendered inside the playlist by adding a newplist_duration = true
property, 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
canplay
events 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-left
for styling. - Added flag
mobile_volume: true
to 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-looped
class. - 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-cnt
mp-vslider-bar
->mp-vol-bar
mp-progress-cnt
->mp-seek-cnt
mp-progress-bar
->mp-seek-bar
mp-progress-percent
->mp-track-percent
mp-pl-current
->mp-plist-current
mp-repeat
->mp-loop
warning
->mp-warning
- Some code optimization.
- Abandoned
element.hidden
strategy 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 ignoressupplied
property and allows a mixed-format playlist. The script must include the extension in thetracks.file
property. - Improved error messages and console logs.
- Added audio formats to
supplied
list:oga
,m4b
,m4r
,opus
andwebm
. - Renamed a few variables and functions.
element.hidden = true/false
instead 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-play
andmp-text-pause
elements (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 objectplObj
to associate the original style ofmp-play
with the audio element's id. - [MBBC]: Merged
mp-text-play
&mp-text-pause
into onemp-sit-rep
, injected by two new playlist object properties,txt_pause
andtxt_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_format
property when Muted. - [MBBC]: Changed
volTxt
(.mp-vol-text
) tovolNum
(.mp-vol-number
) - Repurposed
volTxt
for a custom label when it's not convinient to use::before
&::after
selectors withmp-vol-number
. The idea is to be able to remove the element when running on mobile. - Reinstated
.mp-plist-number
for further flexibility. - Optimized position of variables
progressBar
andvolSliderBar
(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
loading
message 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:
trackNumber
trackTitle
trackArtist
trackExtra
album
albumArtist
poster
trackImage
0.1.1h - Sep 21
- Unified bar drag action code in one function.
- Removed functions and calls for each bar.
- Removed
addEventListener
functions 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
updateAudioSource
insideloadTrack()
. 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 byeswitch
statement.
0.1.1g - Sep 21
- Eliminated code for number in playlists (can be done with CSS.)
- Removed
plist_numbers
object property. - Added l
eading_zero
object property to optionally prepend a zero tomp-track-number
class. - Event listener for clicked playlist items now toggles between play and pause states.
- If there's no
title
property in the playlist object, MP usesfile
instead. - Added
volume_format = 'a, b'
property. - Substituted
let
forconst
where 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
playing
variable 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-state
and theop_text_
variables. - Added play state options as
mp-
classes. - Removed
loop
variable; repeat now works looking at classmp-looped
.
0.1.1e and previous
- Single player.
- Basic playlist functionality.