home *** CD-ROM | disk | FTP | other *** search
- var Movie=false;
- var videomode=1;
- var vismode=0;
- var draweropen=false;
- var playlistopen=false;
- var muteing=false;
- var audioopen=false;
- var videoopen=false;
- var AVopen=false;
- var tempfilename = "nothing";
- var shuffling=false;
- var medianame="nothing";
-
- function Loading() {
-
- pl.setColumnResizeMode( 1, "AutoSizeData" );
- pl.setColumnResizeMode( 0, "Stretches" );
- vis.currentEffectType = mediacenter.effectType;
- vis.currentPreset = mediacenter.effectPreset;
- ShouldVis();
- MetaData1();
-
- }
-
- function Closing() {
-
- mediacenter.effectType = vis.currentEffectType;
- mediacenter.effectPreset = vis.currentPreset;
-
- }
-
- function ShouldVis() {
-
- vis.visible = ((player.playstate == psPlaying || player.playstate == psPaused) && (!(player.currentMedia.ImageSourceWidth > 0)));
- vid.visible = ((player.playstate != psStopped) && (player.currentMedia.ImageSourceWidth > 0));
- vid.maintainAspectRatio = true;
- vid.stretchToFit = true;
-
- stopbutton.visible = (player.playstate == psPlaying);
-
- if (vis.visible)
- ChangeVisMode();
-
- if (vid.visible)
- ChangeVidMode();
-
- MetaData2();
-
- }
-
- function VideoStart() {
-
- Movie = true;
- vid.visible = true;
- vid.maintainAspectRatio = true;
- vid.stretchToFit = true;
- vis.visible = false;
-
- }
-
- function VideoEnd() {
-
- Movie = false;
- vis.visible = false;
- vid.visible = false;
-
- }
-
- function VidMode() {
-
- if (player.currentMedia.ImageSourceWidth > 0){
-
- if (videomode==1)
- videomode=0;
- else
- videomode=1;
-
- ChangeVidMode();
-
- }
-
- else {
-
- if (vismode==1)
- vismode=0;
- else
- vismode=1;
-
- ChangeVisMode();
-
- }
-
- }
-
- function ChangeVidMode(){
-
- if (videomode==0){
- largemode.visible=false;
- vid.visible=false;
- vid.left="160";
- vid.top="94";
- vid.width="128";
- vid.height="99";
- vid.maintainAspectRatio = true;
- vid.stretchToFit = true;
- smallvideomode.visible=true;
- smallvisback.visible=false;
- smallvismode.visible=false;
- vid.visible=true;
- MetaData1();
- }
-
- if (videomode==1){
- vid.visible=false;
- smallvismode.visible=false;
- smallvisback.visible=false;
- smallvideomode.visible=false;
- vid.left="53";
- vid.top="52";
- vid.width="245";
- vid.height="184";
- vid.maintainAspectRatio = true;
- vid.stretchToFit = true;
- largemode.visible=true;
- vid.visible=true;
- MetaData1();
- }
-
- }
-
-
- function ChangeVisMode(){
-
- if (vismode==0) {
- largemode.visible=false;
- vis.left="157"
- vis.top="93";
- vis.width="134";
- vis.height="100";
- smallvismode.visible=true;
- smallvideomode.visible=false;
- smallvisback.visible=true;
- MetaData1();
- }
-
- if (vismode==1){
- smallvisback.visible=false;
- smallvideomode.visible=false;
- smallvismode.visible=false;
- vis.left="38";
- vis.top="52";
- vis.width="287";
- vis.height="185";
- largemode.visible=true;
- MetaData1();
- }
-
- }
-
- function MetaData1()
- {
- switch (player.OpenState)
- {
- case osUndefined:
- break;
- case osMediaOpen:
- MetaData2();
- break;
- }
- }
-
- function MetaData2()
- {
-
- clip.value = player.currentmedia.getiteminfo("#title");
- if(clip.value == "")
- clip.value = player.currentmedia.name;
-
- filename.value = player.currentmedia.getiteminfo("#name");
- if(filename.value == "")
- filename.value = player.currentmedia.name;
-
- audiobitrate.value = player.currentmedia.getiteminfo("#Bitrate");
- if(audiobitrate.value == "")
- audiobitrate.value = player.currentmedia.getiteminfo("Bitrate");
-
- streambitrate.value = player.currentmedia.getiteminfo("#Bitrate");
- if(streambitrate.value == "")
- streambitrate.value = player.currentmedia.getiteminfo("Bitrate");
-
- show.value = player.currentplaylist.getiteminfo("#title");
- if(show.value == "")
- show.value = player.currentmedia.getiteminfo("WM/AlbumTitle");
-
- showing.value = player.currentplaylist.getiteminfo("#title");
- if(showing.value == "")
- showing.value = player.currentmedia.getiteminfo("WM/AlbumTitle");
-
- }
-
- function PlaylistMove()
- {
- if (playlistopen)
- {
- pl.visible=false;
- playlist1.moveTo(0,0,2000);
- playlistgroup.moveTo(188,119,1000);
- playlistopen = false;
- }
- else
- {
- playlistgroup.moveTo(188,221,1000);
- playlist1.moveTo(0,59,2000);
- playlistopen = true;
-
- }
- }
-
- function plDoneMoving() {
-
- if (playlistopen)
- pl.visible = true;
- else
- pl.visible = false;
- }
-
-
- function FullScreen() {
-
- if (vis.visible)
- vis.fullScreen=true;
-
- if (vid.visible)
- vid.fullScreen=true;
-
- }
-
-
- function MuteMe(){
-
- if (muteing){
- player.Settings.mute = false;
- muteing=false;
- }
- else {
- player.Settings.mute = true;
- muteing=true;
- }
-
- }
-
-
- function AudioControls(){
-
- if (audioopen && draweropen)
- {
- drawer1.moveTo(147,78,200);
- draweropen = false;
- AVopen=false;
- audioopen = false;
- videoopen = false;
- audiocontrols1.visible=false;
- videocontrols1.visible=false;
- avmain.visible=false;
- animation.top="2000"
- }
- else
- {
- avmain.visible=false;
- videocontrols1.visible=false;
- drawer1.moveTo(0,78,200);
- AVopen=false;
- audioopen=true;
- draweropen=true;
- videoopen = false;
- audiocontrols1.visible=true;
-
- }
-
- }
-
- function VideoControls(){
-
- if (videoopen && draweropen)
- {
- drawer1.moveTo(147,78,200);
- AVopen=false;
- draweropen = false;
- audioopen = false;
- videoopen = false;
- audiocontrols1.visible=false;
- videocontrols1.visible=false;
- avmain.visible=false;
- animation.top="2000"
-
- }
- else
- {
- avmain.visible=false;
- audiocontrols1.visible=false;
- drawer1.moveTo(0,78,200);
- AVopen=false;
- videoopen=true;
- draweropen=true;
- audioopen = false;
- videocontrols1.visible=true;
-
- }
-
- }
-
- function Drawer()
- {
- if (draweropen)
- {
- avmain.visible=false;
- audiocontrols1.visible=false;
- videocontrols1.visible=false;
- drawer1.moveTo(147,78,200);
- draweropen = false;
- animation.left="0";
- animation.top="2000";
- AVopen=false;
- audioopen = false;
- videoopen = false;
- }
- else
- {
- avmain.visible=false;
- videocontrols1.visible=false;
- videocontrols1.visible=false;
- drawer1.moveTo(0,78,200);
- draweropen = true;
- audioopen = false;
- AVopen=false;
- videoopen = false;
- AVMain();
- }
- }
-
- function AVMain(){
-
- if (AVopen && draweropen)
- {
- drawer1.moveTo(147,78,200);
- draweropen = false;
- AVopen=false;
- audioopen = false;
- videoopen = false;
- avmain.visible=false;
- animation.left="0";
- animation.top="2000"
- audiocontrols1.visible=false;
- videocontrols1.visible=false;
-
- }
- else
- {
- audiocontrols1.visible=false;
- videocontrols1.visible=false;
- drawer1.moveTo(0,78,200);
- animation.left="3";
- animation.top="2";
- AVopen=true;
- videoopen=false;
- draweropen=true;
- audioopen = false;
- avmain.visible=true;
-
- }
-
- }