Permalink
Browse files

Adding the files for the Dash Media Player.

  • Loading branch information...
0 parents commit 354338df9f7ea3a292d380221c4bd0bb7b35cfd4 Travis Tidwell committed Apr 17, 2010
Showing with 15,028 additions and 0 deletions.
  1. +147 −0 DashPlayer.php
  2. +457 −0 DashPlaylist.php
  3. +19 −0 DashUtils.php
  4. +25 −0 LICENSE.txt
  5. +21 −0 README.txt
  6. +3 −0 cache/readme.txt
  7. +82 −0 com/hurlant/crypto/hash/HMAC.as
  8. +20 −0 com/hurlant/crypto/hash/IHash.as
  9. +196 −0 com/hurlant/crypto/hash/MD5.as
  10. +114 −0 com/hurlant/crypto/hash/SHA256.as
  11. +62 −0 com/hurlant/crypto/hash/SHABase.as
  12. +66 −0 com/hurlant/util/Hex.as
  13. +521 −0 com/tmtdigital/dash/DashPlayer.as
  14. +359 −0 com/tmtdigital/dash/config/Params.as
  15. +125 −0 com/tmtdigital/dash/config/Variables.as
  16. +1 −0 com/tmtdigital/dash/display/Dash.as
  17. +76 −0 com/tmtdigital/dash/display/Favorites.as
  18. +449 −0 com/tmtdigital/dash/display/Fields.as
  19. +1 −0 com/tmtdigital/dash/display/FilterList.as
  20. +1 −0 com/tmtdigital/dash/display/Image.as
  21. +189 −0 com/tmtdigital/dash/display/Link.as
  22. +112 −0 com/tmtdigital/dash/display/Menu.as
  23. +78 −0 com/tmtdigital/dash/display/Navigation.as
  24. +609 −0 com/tmtdigital/dash/display/Playlist.as
  25. +1 −0 com/tmtdigital/dash/display/PlaylistLink.as
  26. +1 −0 com/tmtdigital/dash/display/PlaylistLinks.as
  27. +1 −0 com/tmtdigital/dash/display/PreLoader.as
  28. +234 −0 com/tmtdigital/dash/display/Skinable.as
  29. +75 −0 com/tmtdigital/dash/display/Spinner.as
  30. +142 −0 com/tmtdigital/dash/display/Taxonomy.as
  31. +1 −0 com/tmtdigital/dash/display/ads/Ad.as
  32. +1 −0 com/tmtdigital/dash/display/ads/Banner.as
  33. +1 −0 com/tmtdigital/dash/display/ads/TextAd.as
  34. +262 −0 com/tmtdigital/dash/display/controls/ProgressControl.as
  35. +216 −0 com/tmtdigital/dash/display/controls/ScrollBar.as
  36. +486 −0 com/tmtdigital/dash/display/controls/ScrollRegion.as
  37. +105 −0 com/tmtdigital/dash/display/controls/ToggleButton.as
  38. +208 −0 com/tmtdigital/dash/display/media/AudioPlayer.as
  39. +1 −0 com/tmtdigital/dash/display/media/IMedia.as
  40. +866 −0 com/tmtdigital/dash/display/media/MediaPlayer.as
  41. +22 −0 com/tmtdigital/dash/display/media/MediaState.as
  42. +112 −0 com/tmtdigital/dash/display/media/Plymedia.as
  43. +173 −0 com/tmtdigital/dash/display/media/Preview.as
  44. +1 −0 com/tmtdigital/dash/display/media/PreviewMask.as
  45. +1 −0 com/tmtdigital/dash/display/media/SWFPlayer.as
  46. +54 −0 com/tmtdigital/dash/display/media/Spectrum.as
  47. +1 −0 com/tmtdigital/dash/display/media/VideoPlayer.as
  48. +1 −0 com/tmtdigital/dash/display/media/YouTubePlayer.as
  49. +431 −0 com/tmtdigital/dash/display/media/controlbar/ControlBar.as
  50. +140 −0 com/tmtdigital/dash/display/media/controlbar/SeekBar.as
  51. +104 −0 com/tmtdigital/dash/display/media/controlbar/VolumeBar.as
  52. +1 −0 com/tmtdigital/dash/display/node/Node.as
  53. +1 −0 com/tmtdigital/dash/display/node/NodeBase.as
  54. +1 −0 com/tmtdigital/dash/display/node/Teaser.as
  55. +154 −0 com/tmtdigital/dash/display/voter/DashVoter.as
  56. +91 −0 com/tmtdigital/dash/display/voter/TagVoter.as
  57. +191 −0 com/tmtdigital/dash/display/voter/Voter.as
  58. +66 −0 com/tmtdigital/dash/events/DashEvent.as
  59. +327 −0 com/tmtdigital/dash/net/DrupalService.as
  60. +678 −0 com/tmtdigital/dash/net/Gateway.as
  61. +262 −0 com/tmtdigital/dash/net/Service.as
  62. +118 −0 com/tmtdigital/dash/utils/Files.as
  63. +137 −0 com/tmtdigital/dash/utils/LayoutManager.as
  64. +1 −0 com/tmtdigital/dash/utils/Pager.as
  65. +237 −0 com/tmtdigital/dash/utils/Resizer.as
  66. +272 −0 com/tmtdigital/dash/utils/Utils.as
  67. +278 −0 com/tmtdigital/dash/utils/md5.as
  68. +50 −0 com/tmtdigital/dash/utils/xml/ASXParser.as
  69. +70 −0 com/tmtdigital/dash/utils/xml/PlaylistParser.as
  70. +52 −0 com/tmtdigital/dash/utils/xml/RSSParser.as
  71. +85 −0 com/tmtdigital/dash/utils/xml/XMLParser.as
  72. +64 −0 com/tmtdigital/dash/utils/xml/YouTubeParser.as
  73. +8 −0 config/dashconfig.xml
  74. +78 −0 config/readme.html
  75. +17 −0 dash.php
  76. +1 −0 dashPlayer.js
  77. BIN dashPlayer.swf
  78. +867 −0 dashPlayerFull.js
  79. +158 −0 dashphp.html
  80. +158 −0 flashvars.html
  81. +5 −0 getplaylist.php
  82. +24 −0 index.php
  83. BIN player.fla
  84. +151 −0 plugins/menus/default/menu.as
  85. BIN plugins/menus/default/menu.fla
  86. BIN plugins/menus/default/menu.swf
  87. +15 −0 plugins/preloaders/default/preloader.as
  88. BIN plugins/preloaders/default/preloader.fla
  89. BIN plugins/preloaders/default/preloader.swf
  90. +325 −0 plugins/services/drupal/DrupalService.as
  91. +82 −0 plugins/services/drupal/com/hurlant/crypto/hash/HMAC.as
  92. +20 −0 plugins/services/drupal/com/hurlant/crypto/hash/IHash.as
  93. +196 −0 plugins/services/drupal/com/hurlant/crypto/hash/MD5.as
  94. +114 −0 plugins/services/drupal/com/hurlant/crypto/hash/SHA256.as
  95. +62 −0 plugins/services/drupal/com/hurlant/crypto/hash/SHABase.as
  96. +66 −0 plugins/services/drupal/com/hurlant/util/Hex.as
  97. +377 −0 plugins/services/drupal/service.as
  98. BIN plugins/services/drupal/service.fla
  99. BIN plugins/services/drupal/service.swf
  100. BIN plugins/spectrums/revolt/revolt.swf
  101. +25 −0 plugins/spinners/default/spinner.as
  102. BIN plugins/spinners/default/spinner.fla
  103. BIN plugins/spinners/default/spinner.swf
  104. +25 −0 plugins/spinners/squares/spinner.as
  105. BIN plugins/spinners/squares/spinner.fla
  106. BIN plugins/spinners/squares/spinner.swf
  107. +45 −0 plugins/voters/circles/voter.as
  108. BIN plugins/voters/circles/voter.fla
  109. BIN plugins/voters/circles/voter.swf
  110. +45 −0 plugins/voters/default/voter.as
  111. BIN plugins/voters/default/voter.fla
  112. BIN plugins/voters/default/voter.swf
  113. +18 −0 sample.html
  114. +455 −0 skins/audiopro/skin.as
  115. BIN skins/audiopro/skin.fla
  116. BIN skins/audiopro/skin.swf
  117. +80 −0 skins/default/controlbar.as
  118. BIN skins/default/controlbar.fla
  119. BIN skins/default/controlbar.swf
  120. +404 −0 skins/default/hplaylist.as
  121. BIN skins/default/hplaylist.fla
  122. BIN skins/default/hplaylist.swf
  123. +381 −0 skins/default/playlist.as
  124. BIN skins/default/playlist.fla
  125. BIN skins/default/playlist.swf
  126. +1 −0 skins/default/skin.as
  127. BIN skins/default/skin.fla
  128. BIN skins/default/skin.swf
  129. +119 −0 skins/default/themes/green/theme.xml
  130. +76 −0 skins/default/themes/readme.html
  131. +119 −0 skins/default/themes/red/theme.xml
  132. +1 −0 version
@@ -0,0 +1,147 @@
+<?php
+require_once("DashUtils.php");
+
+/**
+ * The Dash Media Player Class
+ *
+ * License: GPL
+ * Author: Travis Tidwell (www.travistidwell.com)
+ * Copyright: TMT Digital 2008 (www.tmtdigital.com)
+ *
+ * This class is used to construct or show the player on your page. It does this by constructing
+ * the DashPlayer object with a set of parameters in acociative array form. See constructor comments for more information.
+ *
+ */
+
+class DashPlayer
+{
+ private $params;
+
+ /**
+ * Constructor.
+ *
+ * @param - An associative array of parameters for this player to use when showing. These can be as follows.
+ *
+ * width - The width of the player.
+ * height - The height of the player.
+ * id - The HTML ID of the player.
+ * schema - The XML schema of the playlist to generate (XML, RSS, or ASX).
+ * file - The file to play. If none is provided, then this will play the generated playlist.
+ * playlist - The playlist to play.
+ *
+ * All other parameters are the FlashVars used to govern the player. These can be found by going to http://www.tmtdigital.com/flashvars .
+ *
+ * Example 1: To show a media player that will play the file http://www.mysite.com/videos/video.flv, you would use the following code...
+ *
+ * <?php
+ * $params['file'] = 'http://www.mysite.com/videos/video.flv';
+ * $player = new DashPlayer($params);
+ * $player->show();
+ * ?>
+ *
+ * Example 2: To show the default playlist in the playlists folder...
+ *
+ * <?php
+ * $player = new DashPlayer();
+ * $player->show();
+ * ?>
+ *
+ */
+ public function DashPlayer( $_params = array() )
+ {
+ $this->params = $_params;
+ }
+
+ /**
+ * Shows the media player on your PHP page.
+ */
+ public function show()
+ {
+ print $this->getPlayer();
+ }
+
+ /**
+ * Returns the player object HTML code.
+ *
+ * @return - The Dash Media Player HTML code.
+ */
+
+ public function getPlayer()
+ {
+ $flashvars = '';
+ $width = 652;
+ $height = 432;
+ $player = 'dashPlayer.swf';
+ $playlist = 'default';
+ $id = 'dashplayer';
+ $schema = 'xml';
+ $file = '';
+
+ foreach($this->params as $param => $value) {
+ $param = strtolower($param);
+
+ if( $param != 'file' )
+ {
+ switch( $param )
+ {
+ case 'player':
+ $player = $value;
+ break;
+ case 'width':
+ $width = $value;
+ break;
+ case 'height':
+ $height = $value;
+ break;
+ case 'id':
+ $flashvars .= $param . '=' . $value . '&';
+ $id = $value;
+ break;
+ case 'schema':
+ $schema = $value;
+ break;
+ case 'file':
+ $file = 'file=' . $value;
+ break;
+ case 'playlist':
+ $playlist = $value;
+ break;
+ default:
+ $flashvars .= $param . '=' . $value . '&';
+ break;
+ }
+ }
+ }
+
+ $url = dash_base_url();
+ $path = getcwd();
+
+ if( !$file )
+ {
+ if( file_exists( $path . '/cache/' . $playlist . '.xml' ) ) {
+ $file = 'file=' . $url . '/cache/' . $playlist . '.xml';
+ }
+ else {
+ $file = 'file=' . $url . '/getplaylist.php?playlist=' . $playlist;
+ }
+ }
+
+ $output = '';
+
+ if( $url )
+ {
+ $flashvars = $file . '&votingenabled=false&viewsenabled=false&' . rtrim($flashvars, '&');
+ $loader_path = $url . '/' . $player;
+ $output .= '<object id="'. $id .'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'.$width.'" height="'.$height.'" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">' . "\n";
+ $output .= '<param name="movie" value="'. $loader_path .'" />' . "\n";
+ $output .= '<param name="wmode" value="transparent" />' . "\n";
+ $output .= '<param name="allowfullscreen" value="true" />' . "\n";
+ $output .= '<param name="FlashVars" value="'.$flashvars.'" />' . "\n";
+ $output .= '<param name="quality" value="high" />' . "\n";
+ $output .= '<embed name="' . $id .'" allowScriptAccess="always" src="'. $loader_path .'" width="'.$width.'" height="'.$height.'" border="0" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" allowfullscreen="true" quality="high" flashvars="'.$flashvars.'" /></object>' . "\n";
+ }
+
+ return $output;
+ }
+}
+?>
Oops, something went wrong.

0 comments on commit 354338d

Please sign in to comment.