SevenOutman / vue-aplayer

:cake: Easy-to-use music player for Vue 2.x
https://vue-aplayer.js.org
MIT License
1.32k stars 200 forks source link

preload missing default props #161

Closed RaphaelDDL closed 8 months ago

RaphaelDDL commented 5 years ago

Without this default addition, README's "Audio attributes as props" table is wrong since having no props default will be the same as auto instead.

Name Type Default Observable Description
preload String none true The way to load music, can be 'none' 'metadata' or 'auto'

That means, without preload="none" in the <aplayer />, it's up for the browser to decide. In Chrome v75, all assets are downloaded, for example.

aplayer without preload props

image

aplayer with preload props explicitly set to none

Observe that only one was downloaded, which is the first icon, that I clicked "Play" (and is currently playing)

image

P.S.: I wasn't sure which branch to merge, develop or master, so sent to develop one