home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 November
/
PCWorld_2007-11_cd.bin
/
temacd
/
imtoodownyoutube
/
download-youtube-video.exe
/
script
/
playerfileinfos.js
< prev
next >
Wrap
Text File
|
2007-07-25
|
2KB
|
69 lines
LoadLib("Helper.dll");
var helper=new JSHelper();
helper.Helper_Init();
function GetFileInfo(filename)
{
helper.Helper_InitFileInfo(filename);
playerfileinfos.filename.SetText(getfilename(filename));
playerfileinfos.filelocation.SetText(getlocation(filename));
playerfileinfos.filelocation.SetLink(getlocation(filename));
var duration=helper.Helper_GetDuration();
playerfileinfos.fileduration.SetText(duration);
var filesize=helper.Helper_GetFileSize();
playerfileinfos.filesize.SetText(parseInt(filesize/1024)+"KB");
var videowidth=helper.Helper_GetVideoWidth();
var videoheight=helper.Helper_GetVidoeHeight();
playerfileinfos.Dimensionvalue.SetText(videowidth+"*"+videoheight);
var videoframe=helper.Helper_GetVideoFrame();
playerfileinfos.FramerateValue.SetText(videoframe);
var audiochannel=helper.Helper_GetAudioChannels();
playerfileinfos.ChannelsValue.SetText(audiochannel);
var audiofreq=helper.Helper_GetAudioFrequency();
playerfileinfos.FidelityValue.SetText(audiofreq+"Hz");
var audiorate=helper.Helper_GetAudioRate();
playerfileinfos.BitrateValue.SetText(audiorate);
var videorate=helper.Helper_GetVideoRate();
playerfileinfos.videorate.SetText(videorate);
var videocodec=helper.Helper_GetVideoCodec();
playerfileinfos.videocodecvalue.SetText(videocodec);
var audiocodec=helper.Helper_GetAudioCodec();
playerfileinfos.AudioCodecValue.SetText(audiocodec);
}
function formatFloat(src, pos)
{
return Math.round(src*Math.pow(10, pos))/Math.pow(10, pos);
}
function getfilename(filename)
{
var start=filename.lastIndexOf("\\");
var file1=filename.substr(start+1,filename.length-start);
return file1;
}
function getlocation(filename)
{
var end=filename.lastIndexOf("\\");
var filepath=filename.substr(0,end+1);
return filepath;
}
function fileinfos_destroy()
{
//helper.Helper_UnInit();
playerfileinfos.Close();
}