Flash music player with Waveforms

Source: Internet
Author: User

I need such a thing in my recent project, but I have searched the internet and there is no suitable player with a waveform.

Once found a very close solution, and finally cannot be used:

  • Media Player. if the machine is installed with a later version of Media Player, it can display the waveform. The advantage is that the client generally does not need to download it (because WMP in Windows is called. DLL), the disadvantage is that if it is a lower version of Media Player, it will not be able to display the waveform, and even if it is a higher version, sometimes it will not display the waveform, the reason is unknown...
  • Flash Player. There are many examples on the Internet, but most of the waveforms are fake, that is, a jittery animation... In addition, the style is not suitable for use.

Finally, I made one myself, which is very simple. Only one video area is used to display the waveform, and three interfaces are provided: Play, pause, and stop.

 

0-512 pixels are left-channel waveforms, and 256-512 are right-channel waveforms. If pixels are exceeded, the waveforms start from the beginning.

 

The implementation principle is mainly to use soundmixer. computespectrum in as3, and then draw a Curve Based on the stage size.

The disadvantage is that it does not support WAV. I tried to use a flash player WAV library, but the memory overhead is too large. If you need to play wav, you can use FFMPEG to convert it to MP3.

SWF

Simple interface: Play: playaudio, pause: pauseaudio, stop: stopaudio

 

Flash music player with Waveforms

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.