scottschiller / SoundManager2

A JavaScript Sound API supporting MP3, MPEG4 and HTML5 audio + RTMP, providing reliable cross-browser/platform audio control in as little as 12 KB. BSD licensed.
http://www.schillmania.com/projects/soundmanager2/
Other
4.99k stars 768 forks source link

Library with stripped Flash support #174

Open techtonik opened 7 years ago

techtonik commented 7 years ago

Considering that Flash is now officially deprecated and HTML5 is new standard, what it takes to release the library without Flash support? What will be the size of the library then?

scottschiller commented 7 years ago

(Sorry, was on vacation)

You will find this of interest! 😉 https://github.com/scottschiller/SoundManager2/commit/b7742cb77798adb21bb3e375bd7819d1b7da1533

I've also updated http://isflashdeadyet.com/ with the official date. However the HTML5-only version goes, once Flash is officially "dead" I should make the official SM2 master HTML5-only as well.

I'm not sure whether to switch master here on Github over to HTML5-only and make a branch for the Flash version; TBD. Likewise for soundmanager2 on npm and the like. I don't want to break developers' expectations for sites that may still need to support users on Flash, etc.

techtonik commented 7 years ago

60kB stripped. Nice. =) What is the total size of minified script then?

For developers it would be convenient to just use soundmanager2-nodebug-noflash-jsmin.js version if it is possible to strip flash support during build and deliver this way.

techtonik commented 7 years ago

Another interesting option is to provide downloads with stripped Flash support and track Flash version popularity decline for http://isflashdeadyet.com/

scottschiller commented 7 years ago

I haven't run the build stuff yet (or if I did, I forget!), but I wager there will be a few KB taken off the HTML5-only -nodebug-jsmin version. With gzip factored in, maybe it'll be down to 8 KB or less. Presently, the HTML5 + flash -nodebug-jsmin version is 11 KB. In any event, I'm happy to say that both versions of the library are pretty small.

Perhaps I flip things around, have soundmanager2.js become the new HTML5-only version and then make soundmanager2-flash.js or similar. TBD!

b9chris commented 5 years ago

It seems like the metric here should be Flash necessity, not Flash support. Flash, I suspect, will live on a long time, as Digital Natives used to a giant breadth of free Flash games on the Web are going to find a way to run a browser that still gives them Flash long after Chrome tells them it's not OK.

But no browser running today requires Flash to play audio - the audio tag and its most complex features are supported by every browser running except one - Opera Mini for Android - but that browser never supported Flash anyway, making a Flash fallback irrelevant (and the browser nearly impossible to support here, as in most cases). For any current user of SoundManager2, every supported audio format is supported without Flash, and the Flash code is dead weight slowing them down. It's also a lot of extra build complexity of no modern relevance.

Seems like time to merge the Flash-stripped version into master, and just before then, Tag the final version that fell back to Flash and give it a good send off, to Avalon of the Apple Trees.