head	1.3;
access;
symbols;
locks
	root:1.3; strict;
comment	@# @;


1.3
date	2009.12.01.05.39.45;	author root;	state Exp;
branches;
next	1.2;

1.2
date	2009.12.01.05.39.28;	author root;	state Exp;
branches;
next	1.1;

1.1
date	2009.11.24.02.12.50;	author root;	state Exp;
branches;
next	;


desc
@/opt/nforge/var/wiki/easylogiclib/data/text/WINBINDERMP3Player
@


1.3
log
@118.219.84.10;;cyberuls easylogic ;;
@
text
@= Description = 

 * window media player 를 이용해서 mp3 플레이어를 만들어봅니다.

== 필요한 기능들 == 

 * MP3 재생 라이브러리 클래스화 (필요한 기본기능 메소드 정리)
  * 플레이리스트 관리 (추가, 삭제, 지정) 
  * 파일 재생, 멈춤, 일시정지, 다음트랙, 이전트랙, 건너뛰기, cd 롬 열기 , 버퍼링 
  * 소리조절 
 * MP3 파일 관리 
 * MP3 재생정보 
 * MP3 ID3 태그 보여주기 
 * MP3 이외의 멀티미디어 연결
 * WMP 상태 표시 
{{{

0	사용자 컴에서 미플(7.1버젼)을 찾을 수 없을때
1	현재 미디어 클립이 정지되었을 경우
2	현재 미디어 클립이 일시정지되었을 경우
3	현재 미디어 클립이 재생되었을 경우
4	현재 미디어 클립을 빨리 감기인 경우
5	현재 미디어 클립을 되감기인 경우
6	버퍼링인 경우
7	서버의 응답을 기다리는 중
8	현재 미디어클립이 끝났을 경우
9	새로운 미디어를 시작하려는 경우
10	미디어 재생을 시작하려는 경우

}}}

== Sample Code == 

{{{#!vim php

<?php

$com = new Com("WMPlayer.OCX");
$strPlayList = "xxxxxx.mp3";

$tune = $com->NewMedia($strPlayList); 
$com->CurrentPlaylist->AppendItem($tune);

function play()
{
	global $com, $tune; 

	$com->Controls->PlayItem($tune);
} 

function stop()
{
	global $com; 

	$com->Controls->Stop();
}

$window = new WBAppWindow(array(
	'width' => 300,
	'height' => 300,
	'title' => 'MP3 Player',
	'layout' => new WBGridLayout(1,3)
));

$window->createTimer('timer');

$panel = $window->add(array(
	'wbtype' => 'Panel',
	'layout' => new WBGridLayout(2, 1),
	'marginLeft' => 5,
	'marginTop' => 5,
	'marginRight' => 5,	
	'marginBottom' => 5,	
));


$panel->add(array(
	'wbtype' => 'PushButton',
	'caption' => '시작',
	'event' => array('click' => 'test'),
));

$panel->add(array(
	'wbtype' => 'PushButton',
	'caption' => '종료',
	'event' => array('click' => 'test'),
));

$panel = $window->add(array(
	'wbtype' => 'Panel',
	'layout' => new WBGridLayout(1, 5),
));


$label1 = $panel->add(array( 'wbtype' => 'Label', 'name' => 'start', 'caption' => '' ));
$label2 = $panel->add(array( 'wbtype' => 'Label', 'caption' => '' ));
$label3 = $panel->add(array( 'wbtype' => 'Label', 'caption' => '' ));
$label4 = $panel->add(array( 'wbtype' => 'Label', 'caption' => '' ));
$label5 = $panel->add(array( 'wbtype' => 'Label', 'caption' => '' ));

$temp = round($tune->duration);

$slider = $window->add(array( 'wbtype' => 'Slider', 'min' => 0, 'max' => $temp));


$window->setVisible(true);



WBApplication::start();

function test($eo) { 
	if ($eo->object()->getText() == '시작') { 
		play();
	} else { 
		stop();
	}
}

function timer($eo) { 
	global $com,  $label2, $label3, $label4,  $label5, $slider ;

	$label1 = WBApplication::getObject('start');

	$label1->setText('전체시간 : ' . $com->Controls->currentItem->durationString);
	$label2->setText('전체시간(초) : ' . round($com->Controls->currentItem->duration));
	$label3->setText('현재 위치 : ' . round($com->Controls->currentPosition));

	if ($com->PlayState == 3) { 
		$slider->setCurrent(round($com->Controls->currentPosition));
	}

	$label4->setText('현재 위치(시간) : ' . $com->Controls->currentPositionString);
	$label5->setText('현재 상태 : ' . $com->PlayState);
}

?>


}}}
@


1.2
log
@118.219.84.10;;cyberuls easylogic ;;
@
text
@d3 1
a3 1
* window media player 를 이용해서 mp3 플레이어를 만들어봅니다.
d7 9
a15 9
* MP3 재생 라이브러리 클래스화 (필요한 기본기능 메소드 정리)
** 플레이리스트 관리 (추가, 삭제, 지정) 
** 파일 재생, 멈춤, 일시정지, 다음트랙, 이전트랙, 건너뛰기, cd 롬 열기 , 버퍼링 
** 소리조절 
* MP3 파일 관리 
* MP3 재생정보 
* MP3 ID3 태그 보여주기 
* MP3 이외의 멀티미디어 연결
* WMP 상태 표시 
@


1.1
log
@118.219.84.10;;cyberuls easylogic ;;
@
text
@d16 1
a16 1
<code>
d30 1
a30 1
</code>
d34 1
a34 1
<php>
d140 1
a140 1
</php>
@
