In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to synchronously display the lyrics in the Flex player. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Flex player synchronously displays lyrics
To display the lyrics synchronously when playing a song, you must first be able to parse the lyrics in lrc format. Before that, I was going to download the corresponding lyrics directly on the Internet, turn on my machine's thousands of mutes to match the lyrics online, and then use HTTPAnalyzerStdV to monitor all http requests. I found that it was asking this ttlrcct.qianqian.com website to download lyrics, which was still directly applied to thousands of mute servers to download lyrics. But its url parameters are all encrypted. Later, I took a look at KuGou's music, in which I monitored and did not request downloading lyrics. Considering that even if I could find the url address of downloading lyrics online, sending remote requests in flash would still have a security problem, so I finally gave up the method of downloading lyrics directly on the network, or uploaded them all to my website. Lrc lyrics are actually a file in text format, which can be loaded using URLLoader in the Flex player. The code is as follows:
Java code
Load the lyrics varlrcUrl:String= xml.item [currIndex] .lrc; if (lrcUrlUrl.lrcUrllite = "") {varlrc:URLLoader=newURLLoader (); / / lrc.dataFormat=URLLoaderDataFormat.VARIABLES; lrc.load (newURLRequest (lrcUrl)); lrc.addEventListener (Event.COMPLETE,LRC_Complete); lrc.addEventListener (IOErrorEvent.IO_ERROR,LRC_IOError);} lrcArr=null; outPutLRCString= "; startIndexOf=0;txtLrc.text="
Then, in the loaded event, we can get the lrc text string. In this case, we need to process the string and convert it into an Array array, as follows:
PublicfunctiongetLRCArray (lrc:String): Array {varlrcArr:Array=newArray;lrc+= "\ r"; for (vari:int=0;i
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.