- <?php
- /**
- * Class PlayVideos.
- *
- * Media Players testing Class
- *
- * @author YOIS <sioy23@gmail.com>
- * @copyright YOIS <sioy23@gmail.com>
- * @version 1.0 06-Sep-2007 11:02:21
- * @link http://www.sysdevworld.com/en/ SysDevWorld
- */
- class PlayVideos extends TPage
- {
- /**
- * @var string Windows Media player file
- */
- private $_windowsMedia='';
- /**
- * @var string Flash Media player file
- */
- private $_flashMedia='';
- /**
- * @var string Quick Time Media Player file
- */
- private $_quickTimeMedia='';
- /**
- * @var string Real player media file
- */
- private $_realPlayerMedia='';
- /**
- * @var string YouTube URL
- */
- private $_youTubeURL='';
- /**
- * @return string Windows Media player file Defaults to ''.
- */
- public function getWindowsMedia()
- {
- return $this->_windowsMedia;
- }
- /**
- * @param string Windows Media player file
- */
- public function setWindowsMedia($value)
- {
- $this->_windowsMedia=TPropertyValue::ensureString($value);
- }
- /**
- * @return string Flash Media player file Defaults to ''.
- */
- public function getFlashMedia()
- {
- return $this->_flashMedia;
- }
- /**
- * @param string Flash Media player file
- */
- public function setFlashMedia($value)
- {
- $this->_flashMedia=TPropertyValue::ensureString($value);
- }
- /**
- * @return string Quick Time Media Player file Defaults to ''.
- */
- public function getQuickTimeMedia()
- {
- return $this->_quickTimeMedia;
- }
- /**
- * @param string Quick Time Media Player file
- */
- public function setQuickTimeMedia($value)
- {
- $this->_quickTimeMedia=TPropertyValue::ensureString($value);
- }
- /**
- * @return string Real player media file Defaults to ''.
- */
- public function getRealPlayerMedia()
- {
- return $this->_realPlayerMedia;
- }
- /**
- * @param string Real player media file
- */
- public function setRealPlayerMedia($value)
- {
- $this->_realPlayerMedia=TPropertyValue::ensureString($value);
- }
- /**
- * @return string YouTube URL Defaults to ''.
- */
- public function getYouTubeURL()
- {
- return $this->_youTubeURL;
- }
- /**
- * @param string YouTube URL
- */
- public function setYouTubeURL($value)
- {
- $this->_youTubeURL=TPropertyValue::ensureString($value);
- }
- /**
- * Enter description here...
- *
- */
- public function playall(){
- //Windows media
- $windowsMedia= new WindowsMedia;
- $windowsMedia->setFilePath($this->getWindowsMedia());
- //Real player
- $realPlayer = new RealPlayer;
- $realPlayer->setFilePath($this->getRealPlayerMedia());
- //Quick Time
- $quickTime = new QuickTimePlayer;
- $quickTime->setFilePath($this->getQuickTimeMedia());
- //Flash Player
- $flashPlayer= new FlashPlayer;
- $flashPlayer->setFilePath($this->getFlashMedia());
- //You Tube Url
- $youTube= new YouTube;
- $youTube->setUrl($this->getYouTubeURL());
- //Set lables values
- $this->lbl_wmv->Text=$windowsMedia->retrieveEmbededText();
- $this->lbl_real->Text=$realPlayer->retrieveEmbededText();
- $this->lbl_quick->Text=$quickTime->retrieveEmbededText();
- $this->lbl_flash->Text=$flashPlayer->retrieveEmbededText();
- $this->lbl_youTube->Text=$youTube->retrieveEmbededText();
- }
- /**
- * Enter description here...
- *
- * @param unknown_type $param
- */
- public function onLoad($param){
- $this->setFlashMedia('/videos/flash.swf');
- $this->setQuickTimeMedia('/videos/Sample.mov');
- $this->setRealPlayerMedia('/videos/realplayer.rm');
- $this->setWindowsMedia('/videos/windowsmv.wmv');
- //Web 2.0 concept
- $this->setYouTubeURL('http://www.youtube.com/v/6gmP4nk0EOE');
- $this->playall();
- }
- }
- ?>
Documentation generated on Thu, 06 Sep 2007 16:59:26 -0300 by phpDocumentor 1.3.0RC3