⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 music_all.js

📁 空间音乐查询工具1.9 1122 本工具采集php抓取QQ空间音乐。 换播放器可直接去qq空间音乐播放器 系统要求 PHP+ZEND3.3以后 cache 目录可写 cfg_
💻 JS
📖 第 1 页 / 共 2 页
字号:
var debugMode = false;function openMusicUrl(sUrl){//alert("显示菜单");}//--------------------------qusic.js-----------//All Rights Reserved By Micoz.Zhong //Tencent.Crop.Limitedvar S_UNDEFINE= 0;var S_STOP = 1;var S_PAUSE = 2;var S_PLAYING = 3;var S_FORWORD = 4;var S_RESERVSE = 5;var S_BUFFERING = 6;var S_WAITING = 7;var S_MEDIAEND = 8;var S_TRANSITION = 9;var S_READY = 10;var S_RECONNECTION = 11;//播放列表最大个数var MAX_PLAYLIST_NUM = 200;var BRANDOMPLAY=false;//当前播放器版本var CURRENT_WMP_VERSION = "7.0.0.0";var CURRENT_PLAYER_VERSION = "1.3.0.0";function PlayerListManager(){		this.mFull  = false;	this.mPosition = -1;	this.mpList = new Array();		//获取播放列表的长度	this.getCount = function()	{			return this.mpList.length;	}		//获取指定下标的播放列表信息	this.getObject = function(n)	{		return this.mpList[n];	}		//根据播放url查找播放列表的下标	this.getPos = function(strURL)	{		for(var i=0; i<this.getCount(); i++)		{			if(this.getObject(i).mPlayURL==strURL) 				return i ;		}		return -1 ;	}		//根据播放id查找播放列表的下标	this.getPosById = function(Id)	{		for(var i=0; i<this.getCount(); i++)		{			if(this.getObject(i).mId==Id) 				return i ;		}		return -1 ;	}			//根据播放id查找对应播放列表内容	this.findObjectById = function(iId)	{		var i = this.getPosById(iId) ;		if(i!=-1)			return this.getObject(i) ;		return null;		}			//根据播放url查找对应播放列表	this.findObject = function(strURL)	{			var i = this.getPos(strURL) ;		if(i!=-1)			return this.getObject(i) ;		return null;	}		//添加指定内容到播放列表	this.addObject = function(iId, strURL, strTorrentURL, iDuration, strSongName, strSingerName, strQzoneKey)	{			if (strURL=="")			return;				var obj, pos;		if (iId>0)			pos = this.getPosById(iId);		else if (strURL!="")			pos = this.getPos(strURL);		if(pos!=-1)		{		}		else if (this.getCount()>=MAX_PLAYLIST_NUM)		{			this.mFull  = true;			this.mPosition+=1;			if (this.mPosition>=MAX_PLAYLIST_NUM)				this.mPosition = 0;						obj = this.getObject(this.mPosition);			obj.mId = iId;			obj.mPlayURL = strURL;			obj.mTorrentURL = strTorrentURL;			obj.mDuration = iDuration;			obj.mSongName = strSongName;			obj.mSingerName = strSingerName;			obj.mQzoneKey = strQzoneKey;		}			else		{					obj = new Object() ;				obj.mId = iId;				obj.mPlayURL = strURL;				obj.mTorrentURL = strTorrentURL;				obj.mDuration = iDuration;				obj.mSongName = strSongName;				obj.mSingerName = strSingerName;				obj.mQzoneKey = strQzoneKey;				this.mpList[this.getCount()] = obj ;		}		return;				}		//根据播放url更新播放列表	this.updateObject = function(iId, strURL, strTorrentURL, iDuration, strSongName, strSingerName, strQzoneKey)	{			var n = this.getPos(strURL) ;		if(n != -1)		{			this.mpList[n].mId = iId;			this.mpList[n].mDuration = iDuration ;			this.mpList[n].mTorrentURL = strTorrentURL;			this.mpList[n].mSongName = strSongName;			this.mpList[n].mSingerName = strSingerName;			this.mpList[n].mQzoneKey = strQzoneKey;			return true;		}		return false;	}		//根据id更新播放列表	this.updateObjectById = function(iId, strURL, strTorrentURL, iDuration, strSongName, strSingerName, strQzoneKey)	{			var n = this.getPosById(iId) ;		if(n != -1)		{			this.mpList[n].mPlayURL = strURL;			this.mpList[n].mTorrentURL = strTorrentURL;			this.mpList[n].mDuration = iDuration ;			this.mpList[n].mSongName = strSongName;			this.mpList[n].mSingerName = strSingerName;			this.mpList[n].mQzoneKey = strQzoneKey;			return true;		}		return false;	}		//根据播放url从播放列表中删除指定内容	this.deleteObject = function(strURL)	{			var n = this.getPos(strURL) ;		if(n!=-1)		{				delete this.mpList[n];			this.mpList.length-- ;			return true;		}		return false;	}	//根据播放id从播放列表中删除指定内容	this.deleteObjectById = function(iId)	{			var n = this.getPosById(iId) ;		if(n!=-1)		{				delete this.mpList[n];			this.mpList.length-- ;			return true;		}		return false;	}		//清空播放列表	this.clearObject = function()	{			for(var i=0; i<this.getCount(); i++)			delete this.mpList[i];		this.mpList.length = 0;	}}function WMPlayer(){	this.mPlayerName = "";	this.mInitializeStatus = false;	this.mMute = false;	this.mPlayList = new PlayerListManager();	this.mPlayingPos = -1;	this.mVisible = true;	this.mInstall = true;	this.mDLLink = "";			this.checkPlayer = function(strDLLink)	{		var objPlayer = document.all(this.mPlayerName);		if (!objPlayer) 			return false;		if (!objPlayer.Controls) 			return false;		return true;	}		this.createActiveX = function(bVisible, bInstall, objName, objWidth, objHeight, strUinCookieName, strKeyCookieName, strDLLink)	{		if (objName=="")			objName = "wmplayer";					this.mPlayerName = objName;		var objStr = "<OBJECT id=\"" + objName + "\" width=\""+ objWidth + "\" height=\"" + objHeight + "\" CLASSID=\"CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6\">";		objStr = objStr + "<PARAM Name=\"autoStart\" value=\"true\">";		if (!bVisible)			objStr = objStr + "<PARAM Name=\"uiMode\" value=\"invisible\">";		objStr = objStr + "</OBJECT>";				this.mVisible = bVisible;		this.mInstall = bInstall;		this.mDLLink = strDLLink;		return objStr;	}	this.initialize = function()	{		if (!this.checkPlayer())		{			if (this.mInstall)			{				alert("对不起,您现在的媒体播放器版本太低,请升级媒体播放器。");				//window.location = this.mDLLink;			}			return false;		}				this.mInitializeStatus = true;		return true;	}			this.isInitialize = function()	{		return this.mInitializeStatus;	}			this.getStatus = function()	{		if (!this.mInitializeStatus)			return -1;		return document.all(this.mPlayerName).playState;	}		this.getCurrentMusic = function()	{		if (this.mPlayingPos<0)			return null;		return this.mPlayList.getObject(this.mPlayingPos);	}			this.runPlayer = function(strPlayURL)	{		if (!this.mInitializeStatus)			return;		if (this.isPause())		{		}			else	if ( (strPlayURL!=null) && (strPlayURL!="") )		{				document.all(this.mPlayerName).URL = strPlayURL;			this.mPlayList.addObject(-1, strPlayURL, "", 0, "", "");			this.mPlayingPos = this.mPlayList.getPos(strPlayURL);		}				if ( (this.mPlayingPos<0) && (this.mPlayList.getCount()>0	) )		{			this.mPlayingPos = 0;			document.all(this.mPlayerName).URL = this.mPlayList.getObject(0).mPlayURL;		}		try		{		if (document.all(this.mPlayerName).Controls.isAvailable('play')) 			document.all(this.mPlayerName).Controls.Play();		}		catch(e)		{			if(debugMode) status = ("error 2 "+e.message)		}					return;			}		

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -