home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2008 April
/
PCWorld_2008-04_cd.bin
/
multimedia
/
mediacoder
/
MediaCoder-0.6.0.3905.exe
/
extensions
/
miniPlayer.7z
/
main.js
< prev
next >
Wrap
Text File
|
2007-02-13
|
1KB
|
44 lines
/*************************************************************************
* MediaCoder extension for Meizu miniPlayer
* Distributed under GPL license
* Copyright (c) 2006 Wu Xiaoyong <wuxy2000@citiz.net>
* All rights reserved.
*************************************************************************/
function ApplyParams()
{
var doc = NewXML("MediaCoderPref");
if (!doc) {
alert("Error creating config XML");
return;
}
var res = document.getElementById("res").value.split("x");
var format = document.getElementById("format").value;
switch (format) {
case "MPEG1":
case "MPEG2":
AddPrefNode(doc, "overall.container.format", format);
break;
default:
AddPrefNode(doc, "overall.container.format", "Default");
}
AddPrefNode(doc, "overall.video.format", format);
AddPrefNode(doc, "overall.video.bitrate", document.getElementById("vb").value);
AddPrefNode(doc, "audioenc.lame.quality", document.getElementById("aq").value);
AddPrefNode(doc, "videofilter.frame.fps", document.getElementById("fps").value);
AddPrefNode(doc, "videofilter.scale.width", res[0]);
AddPrefNode(doc, "videofilter.scale.height", res[1]);
// post settings to MediaCoder
PostPrefXML(doc);
}
function Unload()
{
// stop playback
SendCommand("stop_play");
}