Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the functions of dancer js

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "what are the functions of dancer js". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Dancer.js is an advanced audio API designed to create cool visual effects that can be used in conjunction with Mozilla's AudioDataAPI and Webkit's WebAudioAPI.

The main functions of Dancer.js are as follows:

Use real-time audio waveforms and frequency data, and can be mapped to a variety of visualization effects

Obtain audio data from existing audio sources

Your visualization can be detected.

Support for WebAudio (webkit), AudioData (mozilla) and flashfallback (v9 +)

Extensible to support plug-ins and custom behaviors

Dancer.js instance method

Setup

Load (source) specifiestheaudiosourceforthedancerinstance.sourcecaneitherbeanaudioelement,oranobjectwithasrcpropertyandanoptionalcodecsarray.Whiletheaudioelementsourceisrecommendedtousewithotherplayers,ifyouspecifyaconfigobject,thesrcpropertycaneitherbeastringoftheaudiopath,orastringoftheaudiopath,withoutthefileextension,ifyouspecifyacodecarraytoworkacrossmultipleaudioimplementations.Examplesofinput:

Vardancer=newDancer ()

/ / Usinganaudioobject

Vara=newAudio ()

A.srcroomsomesong.mp3'

Dancer.load (a)

/ / Usinganaudioelementonthepage

Dancer.load (document.getElementsByTagName ('audio') [0])

/ / Usingaconfigobjectandyouonlyhaveoneencoding

Dancer.load ({src:'somesong.mp3'})

/ / Usingaconfigobject,andyouhaveanoggandmp3version

Dancer.load ({src:'somesong',codecs: ['ogg','mp3']})

This is the end of the content of "what are the functions of dancer js"? thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report