PlayVideos.Page/php

  1. <?php
  2. /**
  3. * Class PlayVideos.
  4. *
  5. * Media Players testing Class
  6. *
  7. * @author YOIS <sioy23@gmail.com>
  8. * @copyright YOIS <sioy23@gmail.com>
  9. * @version 1.0 06-Sep-2007 11:02:21
  10. * @link http://www.sysdevworld.com/en/ SysDevWorld
  11. */
  12. class PlayVideos extends TPage
  13. {
  14. /**
  15. * @var string Windows Media player file
  16. */
  17. private $_windowsMedia='';
  18. /**
  19. * @var string Flash Media player file
  20. */
  21. private $_flashMedia='';
  22. /**
  23. * @var string Quick Time Media Player file
  24. */
  25. private $_quickTimeMedia='';
  26. /**
  27. * @var string Real player media file
  28. */
  29. private $_realPlayerMedia='';
  30. /**
  31. * @var string YouTube URL
  32. */
  33. private $_youTubeURL='';
  34.  
  35. /**
  36. * @return string Windows Media player file Defaults to ''.
  37. */
  38. public function getWindowsMedia()
  39. {
  40. return $this->_windowsMedia;
  41. }
  42.  
  43. /**
  44. * @param string Windows Media player file
  45. */
  46. public function setWindowsMedia($value)
  47. {
  48. $this->_windowsMedia=TPropertyValue::ensureString($value);
  49. }
  50.  
  51. /**
  52. * @return string Flash Media player file Defaults to ''.
  53. */
  54. public function getFlashMedia()
  55. {
  56. return $this->_flashMedia;
  57. }
  58.  
  59. /**
  60. * @param string Flash Media player file
  61. */
  62. public function setFlashMedia($value)
  63. {
  64. $this->_flashMedia=TPropertyValue::ensureString($value);
  65. }
  66.  
  67. /**
  68. * @return string Quick Time Media Player file Defaults to ''.
  69. */
  70. public function getQuickTimeMedia()
  71. {
  72. return $this->_quickTimeMedia;
  73. }
  74.  
  75. /**
  76. * @param string Quick Time Media Player file
  77. */
  78. public function setQuickTimeMedia($value)
  79. {
  80. $this->_quickTimeMedia=TPropertyValue::ensureString($value);
  81. }
  82.  
  83. /**
  84. * @return string Real player media file Defaults to ''.
  85. */
  86. public function getRealPlayerMedia()
  87. {
  88. return $this->_realPlayerMedia;
  89. }
  90.  
  91. /**
  92. * @param string Real player media file
  93. */
  94. public function setRealPlayerMedia($value)
  95. {
  96. $this->_realPlayerMedia=TPropertyValue::ensureString($value);
  97. }
  98.  
  99. /**
  100. * @return string YouTube URL Defaults to ''.
  101. */
  102. public function getYouTubeURL()
  103. {
  104. return $this->_youTubeURL;
  105. }
  106.  
  107. /**
  108. * @param string YouTube URL
  109. */
  110. public function setYouTubeURL($value)
  111. {
  112. $this->_youTubeURL=TPropertyValue::ensureString($value);
  113. }
  114. /**
  115. * Enter description here...
  116. *
  117. */
  118. public function playall(){
  119.  
  120. //Windows media
  121. $windowsMedia= new WindowsMedia;
  122. $windowsMedia->setFilePath($this->getWindowsMedia());
  123. //Real player
  124. $realPlayer = new RealPlayer;
  125. $realPlayer->setFilePath($this->getRealPlayerMedia());
  126. //Quick Time
  127. $quickTime = new QuickTimePlayer;
  128. $quickTime->setFilePath($this->getQuickTimeMedia());
  129. //Flash Player
  130. $flashPlayer= new FlashPlayer;
  131. $flashPlayer->setFilePath($this->getFlashMedia());
  132. //You Tube Url
  133. $youTube= new YouTube;
  134.  
  135. $youTube->setUrl($this->getYouTubeURL());
  136.  
  137. //Set lables values
  138. $this->lbl_wmv->Text=$windowsMedia->retrieveEmbededText();
  139. $this->lbl_real->Text=$realPlayer->retrieveEmbededText();
  140. $this->lbl_quick->Text=$quickTime->retrieveEmbededText();
  141. $this->lbl_flash->Text=$flashPlayer->retrieveEmbededText();
  142. $this->lbl_youTube->Text=$youTube->retrieveEmbededText();
  143. }
  144. /**
  145. * Enter description here...
  146. *
  147. * @param unknown_type $param
  148. */
  149. public function onLoad($param){
  150. $this->setFlashMedia('/videos/flash.swf');
  151. $this->setQuickTimeMedia('/videos/Sample.mov');
  152. $this->setRealPlayerMedia('/videos/realplayer.rm');
  153. $this->setWindowsMedia('/videos/windowsmv.wmv');
  154. //Web 2.0 concept
  155. $this->setYouTubeURL('http://www.youtube.com/v/6gmP4nk0EOE');
  156. $this->playall();
  157.  
  158. }
  159. }
  160. ?>

Documentation generated on Thu, 06 Sep 2007 16:59:26 -0300 by phpDocumentor 1.3.0RC3