Commit Graph

225 Commits

Author SHA1 Message Date
DIYgod e2f2888ea5
update devDependencies 2018-02-09 14:30:56 +08:00
DIYgod 2287758344
update README 2018-02-07 16:39:46 +08:00
DIYgod a2f96199fe
add OpenCollective 2018-01-12 14:07:26 +08:00
DIYgod 2df2cb49a6
rm codesponsor 2018-01-12 12:03:05 +08:00
DIYgod 1ef9d47b80
update Related Projects 2018-01-12 11:59:58 +08:00
DIYgod 4d1cdb3341
better workflow 2018-01-12 11:53:25 +08:00
DIYgod 29a462487c
Merge pull request #178 from MPierre9/add-music-fix
Add Music Fix, resolves issue #177
2017-12-21 11:21:33 +08:00
Michael 81002c0bf9 Removed check for hidden list, allows add music animation 2017-12-20 22:14:16 -05:00
Michael e3ce22bf7d Rounded up list.style.height to 33px 2017-12-20 08:03:01 -05:00
Michael 9d772ef052 Add music fix 2017-12-19 21:29:00 -05:00
DIYgod b654f6c6af
Merge pull request #176 from MPierre9/remove-song
Adds Remove Song Functionality
2017-12-19 23:50:08 +08:00
Michael 77cc9d9528 Small comment change 2017-12-18 01:33:41 -05:00
Michael 88aff9111b Fixed Indenting and added changes from @DIYgod 2017-12-18 01:20:29 -05:00
Michael 82ca11d126 New remove song function 2017-12-15 15:03:52 -05:00
DIYgod fa59380e4a
Merge pull request #175 from ericdrobinson/fix-setmusic-broken-pause
Fix broken pause state when calling setMusic on playing audio element
2017-12-15 10:18:46 +08:00
Eric Robinson e22933a503 Update to source map for previous commit changes
No changes to the built minified JS, but slight changes to the source map (let-to-const didn't result in meaningful changes in exported JS).
2017-12-14 11:06:45 -05:00
Eric Robinson 1a4ea7a4ed Change variables to constants for invariant values
Use const instead of let to help signify that the initialized values are not expected to change. This commit resolves some review requests on APlayer PR #175.
2017-12-14 11:04:08 -05:00
Eric Robinson 80b84affdc Built versions of the library
Add the built version of APlayer that contains fixes from this branch.
2017-12-12 16:39:49 -05:00
Eric Robinson 8a1f19ec57 Duplicate pause event logic into the abort event
It appears that the "pause" event is never triggered if you call `audio.pause()` on a playing audio element and then immediately set `audio.src`. The "abort" event, however, _is_ called in this case.

Because the "pause" event isn't raised, the APlayer code that resets the pause button state doesn't trigger. This leaves the APlayer in a state where the pause button is still showing but the audio element _isn't_ actually playing. Because `APlayer.toggle()` (which is called by the Play/Pause button) does not check the state of the audio element, and instead checks the state of the UI, we end up in a situation where the pause button is visible but we're not playing. The call to Toggle, then, calls `APlayer.pause()` which checks to see if it's already paused or not. Because the audio element is already paused, the call is ignored and the event never triggers (which would reset the button UI).

This [temporary] "fix" resolves the issue by intercepting the "abort" event that is triggered when the "pause" event is aborted. It then runs the same logic as the "pause" event, checking to see if the playback button is in a "paused" state and, if so, resetting it to a "play" button state.

_In theory_, the checks at the beginning of the `pauseHandler` arrow function should be enough to safeguard any other unrelated calls to "abort".
2017-12-12 16:38:41 -05:00
Eric Robinson a5c2c58092
Merge pull request #2 from ericdrobinson/fix-autoplay
Fix autoplay
2017-12-12 14:09:33 -05:00
Eric Robinson 27c8f6b44c Add build results to the repo
Work is effectively done on the branch so add the built versions.
2017-12-12 14:00:35 -05:00
Eric Robinson e7168ec462 Actually set the music to the audio element
In the default state, each audio element should already have the music url set. However, if a user externally adjusts the music stored on the APlayer and attempts to switch to it, everything _but_ the audio would change. This allows users to modify the music set in the options manually.
2017-12-12 13:42:54 -05:00
Eric Robinson 17c80e4083 Do not autoplay in mobile in `setMusic`
This change appears to have been made to support playlist auto-advance in mobile. This was a workaround to handle the autoplay guard lower in the function which was removed in an earlier commit on this branch. The play call is now handled external to the `setMusic` call, which allows external logic to determine whether play should be called on mobile or not.
2017-12-12 13:40:39 -05:00
Eric Robinson fa66dd90f4 Ensure that automatic playlist advance works
When playlists advance, the music should continue to play. The recent change to stop `setMusic` from "autoplaying" in this case must now be handled directly by the caller. This is far more clear to read: "set next music and play it."
2017-12-12 13:37:31 -05:00
Eric Robinson bd4426ff2b Remove redundant check
The constructor ensures that autoplay is false for mobile devices at this point.
2017-12-12 13:11:12 -05:00
Eric Robinson c0e868484a Move the autoplay check into the constructor
The `autoplay` option only makes sense in the constructor. After that, callers of `setMusic` should determine whether or not to begin playback based on their own state.
2017-12-12 13:09:35 -05:00
Eric Robinson ea7a97af3f
Merge pull request #1 from ericdrobinson/simple-fixes
Simple fixes
2017-12-12 12:47:55 -05:00
Eric Robinson a6705d08b1 Build output for simple fix changes
Built files that incorporate changes from this branch.
2017-12-12 12:41:34 -05:00
Eric Robinson db6e0f8b84 Verify actual state rather than flag
No need to track against a separate (and possibly out-of-sync) flag when it is just as easy to check the actual state of the loaded music.
2017-12-12 12:35:26 -05:00
Eric Robinson 00bec0c66e Remove unnecessary branches in code
Modulo operators are perfect for this type of logic.
2017-12-12 11:55:39 -05:00
DIYgod 275bbfcd07
README: Related Projects & Who use APlayer & Sponsor 2017-11-30 00:29:53 +08:00
DIYgod 62a9e9f1c7
Merge pull request #166 from MPierre9/author-not-showing-fix
Fixes issue #146, Author showing problem
2017-11-24 11:45:59 +08:00
Michael 77d00898be Fixes no author showing bug 2017-11-23 16:55:42 -05:00
DIYgod 67e09f7ab6
Merge pull request #164 from bugkiwi/master
fix aplayer-list listmaxheight bad grammar
2017-11-14 20:16:05 -06:00
gkiwi 00aac89320 Merge branch 'master' of github.com:bugkiwi/APlayer 2017-11-14 19:07:21 +08:00
gkiwi 1fd103c326 修复aplayer-list listmaxheight判断 语法错误问题
Change-Id: I90d1fab602500bcffdac82cb3b19a9b37e636de8
2017-11-14 19:02:17 +08:00
DIYgod 6b252a2c5f
Merge pull request #163 from kn007/patch-1
miss aplayer class
2017-11-02 21:21:44 -05:00
Karl Chen 719c5ce3ea
miss aplayer class 2017-11-02 21:29:50 +08:00
DIYgod f6fdb2a49d
Merge pull request #162 from kn007/patch-1
fix pic 重复打印,拉伸输出
2017-11-01 21:35:59 -05:00
DIYgod af85763598
Merge pull request #161 from kn007/patch-1
fix pic 继承问题
2017-11-01 02:38:47 -05:00
Karl Chen 665b0e7342
Update APlayer.scss 2017-10-31 23:00:16 +08:00
Karl Chen ceb2bc5feb
Update APlayer.js 2017-10-31 12:10:36 +08:00
DIYgod 6c019aba08 Merge pull request #158 from liwanglin12/patch-1
🐛 Fix Typo #157
2017-10-13 07:16:06 -05:00
liwanglin12 bce02f0016 🐛 Fix Typo #157 2017-10-13 19:46:34 +08:00
DIYgod 021eb283a3
update README 2017-09-23 21:18:01 +08:00
DIYgod e41fa9901d
add Who use APlayer 2017-09-07 10:40:46 +08:00
DIYgod f25e0bf82d
new `Who use APlayer`: iSearch 2017-08-22 00:31:46 +08:00
DIYgod b88341b233
README: add APlayer-Controler 2017-08-15 15:17:07 +08:00
DIYgod 8d690b81df
update README: Media formats 2017-08-09 15:39:56 +08:00
DIYgod 1ed95f0045
update README: fix links; add `Who use APlayer` 2017-08-09 15:35:56 +08:00