PageRenderTime 47ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/modules/media/bpm_audio_stream/loader.php

http://buddypress-media.googlecode.com/
PHP | 1039 lines | 470 code | 264 blank | 305 comment | 74 complexity | 4d7da737fad2b387303bd51968e01de9 MD5 | raw file
Possible License(s): AGPL-1.0, Apache-2.0, GPL-2.0, LGPL-2.1
  1. <?php
  2. /**
  3. * MEDIA MODULE - BPM Audio
  4. * The audio layout for BP-Media
  5. *
  6. * @version 0.1.9
  7. * @since 0.1.9
  8. * @package BP-Media
  9. * @subpackage Media Modules
  10. * @license GPL v2.0
  11. * @link http://code.google.com/p/buddypress-media/
  12. *
  13. * ========================================================================================================
  14. */
  15. class BPMM_audioStream extends BPM_mediaModule_base implements iBPM_mediaModule {
  16. var $name = "Audio - Stream"; // Human readable name for this module
  17. var $slug = "bpm_audio_stream"; // Internal slug for this module
  18. // ============================================================================================================ //
  19. /**
  20. * Returns the human-readable name of the media module. This is displayed in the admin interface.
  21. * Example: "Video Gallery"
  22. *
  23. * @version 0.1.9
  24. * @since 0.1.9
  25. * @return string | Media module admin name
  26. */
  27. public function getName(){
  28. return $this->name;
  29. }
  30. /**
  31. * Returns the url-safe slug for the media module. Must be unique from all other
  32. * media modules installed on the system. Example: "bpm_photo"
  33. *
  34. * @version 0.1.9
  35. * @since 0.1.9
  36. * @return string | Media module slug
  37. */
  38. public function getSlug(){
  39. return $this->slug;
  40. }
  41. /**
  42. * Returns the guid of the media module as assigned by the database
  43. *
  44. * @version 0.1.9
  45. * @since 0.1.9
  46. * @return int | Media module id
  47. */
  48. public function getId(){
  49. global $bpm;
  50. $result = $bpm->mediaModules->getBySlug( $this->slug );
  51. return $result["module_id"];
  52. }
  53. /**
  54. * Returns the HTTP path to the module's icon. Icons MUST be 64px*64px .PNG files.
  55. *
  56. * @version 0.1.9
  57. * @since 0.1.9
  58. * @return string | path to icon file
  59. */
  60. public function getIconPath(){
  61. return BPM_URL_BASE . "/modules/media/bpm_audio_stream/admin/icon.png";
  62. }
  63. /**
  64. * Returns a short (30 words) description of what the media module does.
  65. *
  66. * @version 0.1.9
  67. * @since 0.1.9
  68. * @return string | description
  69. */
  70. public function getDesc(){
  71. return __("The streaming audio module transcodes uploaded files to MP3 format using LAME then streams them to visitors using
  72. lighthttpd. This is an advanced media module intended for experienced users.","bp-media");
  73. }
  74. /**
  75. * Returns the media module's version number. 64 chars max.
  76. *
  77. * @version 0.1.9
  78. * @since 0.1.9
  79. * @return string | version number
  80. */
  81. public static function getVersion(){
  82. return "0.1.0";
  83. }
  84. /**
  85. * Returns a composited HTML string, including the name of the content module developer
  86. * and a link to their personal or company website.
  87. *
  88. * @version 0.1.9
  89. * @since 0.1.9
  90. * @return string | version number
  91. */
  92. public function getAuthor(){
  93. return "<a href='http://code.google.com/p/buddypress-media/'>The BP-Media Team</a>";
  94. }
  95. /**
  96. * Returns a composited HTML string containing a link to the media module's support page, or dedicated
  97. * project site. Example: <a href='http://code.google.com/p/buddypress-media/'>The BP-Media Team</a>
  98. *
  99. * @version 0.1.9
  100. * @since 0.1.9
  101. * @return string | version number
  102. */
  103. public static function getSite(){
  104. return "<a href='http://code.google.com/p/buddypress-media/'>Support Forum</a>";
  105. }
  106. /**
  107. * Performs all of the media module's installation operations
  108. *
  109. * @version 0.1.9
  110. * @since 0.1.9
  111. * @return bool | True on success. False on failure.
  112. */
  113. public function install(){
  114. global $bpm;
  115. // Load the base install classes
  116. $bpm->config->installMode();
  117. $cls = new BPM_mediaModule_install_base( $slug=self::getSlug(), $name=self::getName(), $php_class=get_class($this) );
  118. // Add 'settings' page keys and set default values
  119. $settings_ok = $cls->settings($error);
  120. if(!$settings_ok){
  121. $error_string = "Media module install error during 'settings'";
  122. $error_string .= " Module class: " . get_class($this);
  123. $error_string .= " Failed keys: " . implode(",", $error) . "\n";
  124. trigger_error($error_string);
  125. }
  126. // Add 'templates' page keys and set default values
  127. $templates_ok = $cls->templates($error);
  128. if(!$settings_ok){
  129. $error_string = "Media module install error during 'templates'";
  130. $error_string .= " Module class: " . get_class($this);
  131. $error_string .= " Failed keys: " . implode(",", $error) . "\n";
  132. trigger_error($error_string);
  133. }
  134. // Add module-specific keys
  135. if(!$bpm->config->createKey( $tree="mediaModules",
  136. $branch = self::getSlug(),
  137. $key="actionName",
  138. $val="Audio File",
  139. $filter="i18nString",
  140. $ctrl=null,
  141. $error=null)
  142. ) {$result[]=$key;}
  143. if(!$bpm->config->createKey( $tree="mediaModules",
  144. $branch = self::getSlug(),
  145. $key="actionDescription",
  146. $val="Upload an audio file",
  147. $filter="i18nString",
  148. $ctrl=null,
  149. $error=null)
  150. ) {$result[]=$key;}
  151. if(!$bpm->config->createKey( $tree="mediaModules",
  152. $branch = self::getSlug(),
  153. $key="thumbMasterX",
  154. $val=640,
  155. $filter="int",
  156. $ctrl=null,
  157. $error=null)
  158. ) {$result[]=$key;}
  159. if(!$bpm->config->createKey( $tree="mediaModules",
  160. $branch = self::getSlug(),
  161. $key="thumbMasterY",
  162. $val=640,
  163. $filter="int",
  164. $ctrl=null,
  165. $error=null)
  166. ) {$result[]=$key;}
  167. if(!$bpm->config->createKey( $tree="mediaModules",
  168. $branch = self::getSlug(),
  169. $key="thumbFormat",
  170. $val="JPG",
  171. $filter="textAndNumbers",
  172. $ctrl=null,
  173. $error=null)
  174. ) {$result[]=$key;}
  175. if(!$bpm->config->createKey( $tree="mediaModules",
  176. $branch = self::getSlug(),
  177. $key="thumbQuality",
  178. $val=80,
  179. $filter="int",
  180. $ctrl=null,
  181. $error=null)
  182. ) {$result[]=$key;}
  183. if(!$bpm->config->createKey( $tree="mediaModules",
  184. $branch = self::getSlug(),
  185. $key="thumbDefaultPath",
  186. $val= BPM_PATH_MEDIA_MODULES . "/" . self::getSlug(). "/templates/default_thumb.png",
  187. $filter="fileStringLocal",
  188. $ctrl=null,
  189. $error=null)
  190. ) {$result[]=$key;}
  191. if(!$bpm->config->createKey( $tree="mediaModules",
  192. $branch = self::getSlug(),
  193. $key="contentFolder",
  194. $val= BPM_PATH_CONTENT . "/" . self::getSlug() . "/",
  195. $filter="fileStringLocal",
  196. $ctrl=null,
  197. $error=null)
  198. ) {$result[]=$key;}
  199. if(!$bpm->config->createKey( $tree="mediaModules",
  200. $branch = self::getSlug(),
  201. $key="contentURL",
  202. $val= BPM_URL_CONTENT . "/" . self::getSlug() . "/",
  203. $filter="URL",
  204. $ctrl=null,
  205. $error=null)
  206. ) {$result[]=$key;}
  207. if(!$bpm->config->createKey( $tree="mediaModules",
  208. $branch = self::getSlug(),
  209. $key="uploadMaxBytes",
  210. $val=(1024 * 1024 *500), // 500 MB
  211. $filter="int",
  212. $ctrl=null,
  213. $error=null)
  214. ) { $result[] = $key; }
  215. if(!$bpm->config->createKey( $tree="mediaModules",
  216. $branch = self::getSlug(),
  217. $key="fileMaxLength",
  218. $val=3600,
  219. $filter="int",
  220. $ctrl=null,
  221. $error=null)
  222. ) { $result[] = $key; }
  223. if(!$bpm->config->createKey( $tree="mediaModules",
  224. $branch = self::getSlug(),
  225. $key="fileMinLength",
  226. $val=5,
  227. $filter="int",
  228. $ctrl=null,
  229. $error=null)
  230. ) { $result[] = $key; }
  231. if(!$bpm->config->createKey( $tree="mediaModules",
  232. $branch = self::getSlug(),
  233. $key="fileMaxBitrate",
  234. $val=320,
  235. $filter="int",
  236. $ctrl=null,
  237. $error=null)
  238. ) { $result[] = $key; }
  239. if(!$bpm->config->createKey( $tree="mediaModules",
  240. $branch = self::getSlug(),
  241. $key="fileMinBitrate",
  242. $val=32,
  243. $filter="int",
  244. $ctrl=null,
  245. $error=null)
  246. ) { $result[] = $key; }
  247. if(!$bpm->config->createKey( $tree="mediaModules",
  248. $branch = self::getSlug(),
  249. $key="fileMaxSamplerate",
  250. $val=44,
  251. $filter="int",
  252. $ctrl=null,
  253. $error=null)
  254. ) { $result[] = $key; }
  255. if(!$bpm->config->createKey( $tree="mediaModules",
  256. $branch = self::getSlug(),
  257. $key="fileMinSamplerate",
  258. $val=22,
  259. $filter="int",
  260. $ctrl=null,
  261. $error=null)
  262. ) { $result[] = $key; }
  263. // Operating system platform
  264. $os_string = PHP_OS;
  265. if( stripos($os_string,"DARWIN") !== false){
  266. $os_platform = "mac";
  267. }
  268. elseif( stripos($os_string, "WIN") !== false){
  269. $os_platform = "windows";
  270. }
  271. else {
  272. $os_platform = "linux";
  273. }
  274. if(!$bpm->config->createKey( $tree="mediaModules",
  275. $branch = self::getSlug(),
  276. $key="transcoderPlatform",
  277. $val = $os_platform,
  278. $filter="slug",
  279. $ctrl=null,
  280. $error=null)
  281. ) { $result[] = $key; }
  282. // Operating system bits
  283. $os_bits = (int)(PHP_INT_SIZE * 8);
  284. if(!$bpm->config->createKey( $tree="mediaModules",
  285. $branch = self::getSlug(),
  286. $key="transcoderBits",
  287. $val = $os_bits,
  288. $filter="int",
  289. $ctrl=null,
  290. $error=null)
  291. ) { $result[] = $key; }
  292. // Select correct transcoder binary
  293. if($os_platform == "mac"){
  294. if($os_bits == 32){
  295. $binary_path = BPM_PATH_LIB . "/lame/bin/";
  296. }
  297. elseif($os_bits == 64) {
  298. $binary_path = BPM_PATH_LIB . "/lame/bin/";
  299. }
  300. }
  301. elseif($os_platform == "windows"){
  302. if($os_bits == 32){
  303. $binary_path = BPM_PATH_LIB . "/lame/bin/";
  304. }
  305. elseif($os_bits == 64) {
  306. $binary_path = BPM_PATH_LIB . "/lame/bin/";
  307. }
  308. }
  309. elseif($os_platform == "linux"){
  310. if($os_bits == 32){
  311. $binary_path = BPM_PATH_LIB . "/lame/bin/";
  312. }
  313. elseif($os_bits == 64) {
  314. $binary_path = BPM_PATH_LIB . "/lame/bin/";
  315. }
  316. }
  317. if(!$bpm->config->createKey( $tree="mediaModules",
  318. $branch = self::getSlug(),
  319. $key="transcoderBinaryPath",
  320. $val = $binary_path,
  321. $filter="fileStringLocal",
  322. $ctrl=null,
  323. $error=null)
  324. ) { $result[] = $key; }
  325. if(!$bpm->config->createKey( $tree="mediaModules",
  326. $branch = self::getSlug(),
  327. $key="transcoderOptions",
  328. $val = "-h -S ",
  329. $filter="commandPromptOptions",
  330. $ctrl=null,
  331. $error=null)
  332. ) { $result[] = $key; }
  333. if( count($result) == 0) {
  334. $custom_ok = true;
  335. }
  336. else {
  337. $custom_ok = false;
  338. $error_string = "Media module install error during 'custom settings'";
  339. $error_string .= " Module class: " . get_class($this);
  340. $error_string .= " Failed keys: " . implode(",", $result) . "\n";
  341. trigger_error($error_string);
  342. }
  343. // Activate the module and return result
  344. if($settings_ok && $templates_ok && $custom_ok){
  345. $activate_ok = $bpm->mediaModules->activateBySlug( self::getSlug() );
  346. return $activate_ok;
  347. }
  348. else {
  349. return false;
  350. }
  351. }
  352. /**
  353. * Performs all of the media module's uninstallation operations. Completely
  354. * removes the module from the system, and deletes all items stored within
  355. * medias that this module owns.
  356. *
  357. * @version 0.1.9
  358. * @since 0.1.9
  359. * @return bool | True on success. False on failure.
  360. */
  361. public function uninstall(){
  362. global $bpm;
  363. // Load the base uninstall classes
  364. $bpm->config->uninstallMode();
  365. $cls = new BPM_mediaModule_uninstall_base( $slug=self::getSlug(), $name=self::getName(), $php_class=get_class($this) );
  366. // Remove 'settings' page keys
  367. $settings_ok = $cls->settings($error);
  368. if(!$settings_ok){
  369. $error_string = "Media module uninstall error during 'settings'";
  370. $error_string .= " Module class: " . get_class($this);
  371. $error_string .= " Failed keys: " . implode(",", $error) . "\n";
  372. trigger_error($error_string);
  373. }
  374. // Remove 'templates' page keys
  375. $templates_ok = $cls->templates($error);
  376. if(!$settings_ok){
  377. $error_string = "Media module uninstall error during 'templates'";
  378. $error_string .= " Module class: " . get_class($this);
  379. $error_string .= " Failed keys: " . implode(",", $error) . "\n";
  380. trigger_error($error_string);
  381. }
  382. // Remove module-specific keys
  383. if(!$bpm->config->dropKey( $tree="mediaModules",
  384. $branch = self::getSlug(),
  385. $key="actionName")
  386. ) {$result[]=$key;}
  387. if(!$bpm->config->dropKey( $tree="mediaModules",
  388. $branch = self::getSlug(),
  389. $key="actionDescription")
  390. ) {$result[]=$key;}
  391. if(!$bpm->config->dropKey( $tree="mediaModules",
  392. $branch = self::getSlug(),
  393. $key="thumbMasterX")
  394. ) {$result[]=$key;}
  395. if(!$bpm->config->dropKey( $tree="mediaModules",
  396. $branch = self::getSlug(),
  397. $key="thumbMasterY")
  398. ) {$result[]=$key;}
  399. if(!$bpm->config->dropKey( $tree="mediaModules",
  400. $branch = self::getSlug(),
  401. $key="thumbFormat")
  402. ) {$result[]=$key;}
  403. if(!$bpm->config->dropKey( $tree="mediaModules",
  404. $branch = self::getSlug(),
  405. $key="thumbQuality")
  406. ) {$result[]=$key;}
  407. if(!$bpm->config->dropKey( $tree="mediaModules",
  408. $branch = self::getSlug(),
  409. $key="thumbDefaultPath")
  410. ) {$result[]=$key;}
  411. if(!$bpm->config->dropKey( $tree="mediaModules",
  412. $branch = self::getSlug(),
  413. $key="contentFolder")
  414. ) {$result[]=$key;}
  415. if(!$bpm->config->dropKey( $tree="mediaModules",
  416. $branch = self::getSlug(),
  417. $key="contentURL")
  418. ) {$result[]=$key;}
  419. if(!$bpm->config->dropKey( $tree="mediaModules",
  420. $branch = self::getSlug(),
  421. $key="uploadMaxBytes")
  422. ) { $result[] = $key; }
  423. if(!$bpm->config->dropKey( $tree="mediaModules",
  424. $branch = self::getSlug(),
  425. $key="fileMaxLength")
  426. ) { $result[] = $key; }
  427. if(!$bpm->config->dropKey( $tree="mediaModules",
  428. $branch = self::getSlug(),
  429. $key="fileMinLength")
  430. ) { $result[] = $key; }
  431. if(!$bpm->config->dropKey( $tree="mediaModules",
  432. $branch = self::getSlug(),
  433. $key="fileMaxBitrate")
  434. ) { $result[] = $key; }
  435. if(!$bpm->config->dropKey( $tree="mediaModules",
  436. $branch = self::getSlug(),
  437. $key="fileMinBitrate")
  438. ) { $result[] = $key; }
  439. if(!$bpm->config->dropKey( $tree="mediaModules",
  440. $branch = self::getSlug(),
  441. $key="fileMaxSamplerate")
  442. ) { $result[] = $key; }
  443. if(!$bpm->config->dropKey( $tree="mediaModules",
  444. $branch = self::getSlug(),
  445. $key="fileMinSamplerate")
  446. ) { $result[] = $key; }
  447. if(!$bpm->config->dropKey( $tree="mediaModules",
  448. $branch = self::getSlug(),
  449. $key="transcoderPlatform")
  450. ) { $result[] = $key; }
  451. if(!$bpm->config->dropKey( $tree="mediaModules",
  452. $branch = self::getSlug(),
  453. $key="transcoderBits")
  454. ) { $result[] = $key; }
  455. if(!$bpm->config->dropKey( $tree="mediaModules",
  456. $branch = self::getSlug(),
  457. $key="transcoderBinaryPath")
  458. ) { $result[] = $key; }
  459. if(!$bpm->config->dropKey( $tree="mediaModules",
  460. $branch = self::getSlug(),
  461. $key="transcoderOptions")
  462. ) { $result[] = $key; }
  463. if( count($result) == 0) {
  464. $custom_ok = true;
  465. }
  466. else {
  467. $custom_ok = false;
  468. $error_string = "Media module uninstall error during 'custom settings'";
  469. $error_string .= " Module class: " . get_class($this);
  470. $error_string .= " Failed keys: " . implode(",", $result) . "\n";
  471. trigger_error($error_string);
  472. }
  473. // Delete the module's content and return result
  474. if($settings_ok && $templates_ok && $custom_ok){
  475. // Delete all of the module's albums, items, and content
  476. $delete_ok = $bpm->mediaModules->deleteBySlug( self::getSlug() );
  477. return $delete_ok;
  478. }
  479. else {
  480. return false;
  481. }
  482. }
  483. /**
  484. * Adds scripts used by the media module to the admin page header
  485. *
  486. * @version 0.1.9
  487. * @since 0.1.9
  488. * @param string $tab | Name of the admin tab the plugin is rendering
  489. */
  490. public function enqueueAdminScripts($tab){
  491. // BP-Media has centralized script management. See: /core/js/register.scripts.php
  492. // ==============================================================================
  493. // Loading a custom script
  494. // ===============================================
  495. // $file_path = BPM_URL_MEDIA_MODULES . "/" . self::getSlug() . "/admin/transcoder.js";
  496. // wp_register_script('BPMM_tab_transcoder', $file_path);
  497. // wp_enqueue_script( 'BPMM_tab_transcoder');
  498. switch($tab) {
  499. case "BPMM_tab_settings" : {
  500. } break;
  501. case "BPMM_tab_transcoder" : {
  502. } break;
  503. // Handle landing on default tab
  504. case null : {
  505. } break;
  506. // Handle all other tabs
  507. default : {
  508. } break;
  509. }
  510. }
  511. /**
  512. * Adds CSS styles used by the media module to the admin page header
  513. *
  514. * @version 0.1.9
  515. * @since 0.1.9
  516. * @param string $tab | Name of the admin tab the plugin is rendering
  517. */
  518. public function enqueueAdminStyles($tab){
  519. switch($tab) {
  520. case "BPMM_tab_settings" : {
  521. } break;
  522. case "BPMM_tab_transcoder" : {
  523. $file_path = BPM_URL_MEDIA_MODULES . "/" . self::getSlug() . "/admin/transcoder.css";
  524. wp_enqueue_style( self::getSlug(), $file_path, false, '2.8.1', 'screen' );
  525. } break;
  526. // Handle landing on default tab
  527. case null : {
  528. } break;
  529. // Handle all other tabs
  530. default : {
  531. } break;
  532. }
  533. }
  534. /**
  535. * Adds scripts used by the media module to the site page header
  536. *
  537. * @version 0.1.9
  538. * @since 0.1.9
  539. * @param string $page | Name of the site page the plugin is rendering
  540. */
  541. public function enqueueSiteScripts($page){
  542. return $page;
  543. }
  544. /**
  545. * Adds CSS styles used by the media module to the site page header
  546. *
  547. * @version 0.1.9
  548. * @since 0.1.9
  549. * @param string $page | Name of the site page the plugin is rendering
  550. */
  551. public function enqueueSiteStyles($page){
  552. return $page;
  553. }
  554. /**
  555. * Media module init function. Media modules place their hook and filter functions in the init
  556. * function inside their class. When the core loads media modules, it fires the init function in each
  557. * media module, attaching the module's functions to the core.
  558. *
  559. * @version 0.1.9
  560. * @since 0.1.9
  561. */
  562. public function init(){
  563. return true;
  564. }
  565. /**
  566. * Specifies the view structure of the module's screens
  567. *
  568. * @version 0.1.9
  569. * @since 0.1.9
  570. * @return array | mixed
  571. */
  572. public function viewStructure(){
  573. $result = array(
  574. "site"=>array("type"=>"page", "views"=>array("visitor") ),
  575. "profile"=>array("type"=>"page","views"=>array("visitor") ),
  576. "tab"=>array("type"=>"page","views"=>array("visitor") )
  577. );
  578. return $result;
  579. }
  580. /**
  581. * Processes a media item and returns relevant data to the media item manager
  582. *
  583. * @version 0.1.9
  584. * @since 0.1.9
  585. *
  586. * @param mixed $media_object | Media object (file handle or URL) to process
  587. * @param array $options | Array of options that controls how the module processes the item
  588. * @param array &$error | Array numeric error code and text error string
  589. * @return bool/array | False on failure. Media item data array on success.
  590. */
  591. public function processItem($media_object, $options, &$error=null){
  592. return true;
  593. }
  594. /**
  595. * Deletes the master content for a media item. This is implemented in the individual media
  596. * modules instead of the plugin core so that media modules which host content on 3rd-party
  597. * servers (Amazon S3, etc) can connect to the remote server's API and delete the item.
  598. *
  599. * @version 0.1.9
  600. * @since 0.1.9
  601. *
  602. * @param array $media_item | Full database record of the item being deleted
  603. * @param array &$error | Error data returned on failure
  604. * @return bool | False on failure. True on success
  605. */
  606. public function deleteItem($media_item, &$error=null){
  607. return true;
  608. }
  609. /**
  610. * Renders the configuration page for a media module, as seen on the admin
  611. * "media modules" screen.
  612. *
  613. * @version 0.1.9
  614. * @since 0.1.9
  615. * @return string | composited HTML block
  616. */
  617. public function adminConfigPage(){
  618. global $bpm;
  619. require ( dirname( __FILE__ ) . '/admin/loader.php' );
  620. $current_page = new BPMM_admin_loader( new self() );
  621. }
  622. /**
  623. * Renders the configuration page for a media module, as seen on the user's
  624. * site settings screens.
  625. *
  626. * @version 0.1.9
  627. * @since 0.1.9
  628. * @return string | composited HTML block
  629. */
  630. public function userConfigPage(){
  631. }
  632. /**
  633. * Renders the HTML block for the page a user sees when they create a new
  634. * instance of an media type owned by the media module.
  635. *
  636. * @version 0.1.9
  637. * @since 0.1.9
  638. * @param ?
  639. * @return string | composited HTML block
  640. */
  641. public function render_createMedia(){
  642. }
  643. /**
  644. * Renders the HTML block for an upload page when items are uploaded to an
  645. * media type owned by the media module.
  646. *
  647. * @version 0.1.9
  648. * @since 0.1.9
  649. * @param ?
  650. * @return string | composited HTML block
  651. */
  652. public function render_uploadItem(){
  653. }
  654. /**
  655. * Renders the HTML block for the page a user sees when they edit an
  656. * instance of an media type owned by the media module.
  657. *
  658. * @version 0.1.9
  659. * @since 0.1.9
  660. * @param ?
  661. * @return string | composited HTML block
  662. */
  663. public function render_editMedia(){
  664. }
  665. /**
  666. * Renders the HTML block for the page a user sees when they edit an individual
  667. * media item within an instance of an media type owned by the media module.
  668. *
  669. * @version 0.1.9
  670. * @since 0.1.9
  671. * @param ?
  672. * @return string | composited HTML block
  673. */
  674. public function render_editItem(){
  675. }
  676. /**
  677. * Renders the HTML block for the first page of items a user sees when they
  678. * view an instance of an media type owned by the media module.
  679. *
  680. * @version 0.1.9
  681. * @since 0.1.9
  682. * @param ?
  683. * @return string | composited HTML block
  684. */
  685. public function render_landingPage(){
  686. }
  687. /**
  688. * Renders the HTML block for for the second and subsequent pages of items a user
  689. * sees when they view an instance of an media type owned by the media module.
  690. *
  691. * @version 0.1.9
  692. * @since 0.1.9
  693. * @param ?
  694. * @return string | composited HTML block
  695. */
  696. public function render_galleryPage(){
  697. }
  698. /**
  699. * Renders the HTML block for the page a user sees when they view an individual
  700. * item within an media instance owned by the media module.
  701. *
  702. * @version 0.1.9
  703. * @since 0.1.9
  704. * @param ?
  705. * @return string | composited HTML block
  706. */
  707. public function render_singlePage(){
  708. }
  709. /**
  710. * Renders the HTML block for the page a user sees when they sort items within
  711. * an media instance owned by the media module.
  712. *
  713. * @version 0.1.9
  714. * @since 0.1.9
  715. * @param ?
  716. * @return string | composited HTML block
  717. */
  718. public function render_sortPage(){
  719. }
  720. /**
  721. * Renders the HTML block for the page a user sees when they apply user tags to a
  722. * media item within an media instance owned by the media module.
  723. *
  724. * @version 0.1.9
  725. * @since 0.1.9
  726. * @param ?
  727. * @return string | composited HTML block
  728. */
  729. public function render_userTagPage(){
  730. }
  731. /**
  732. * Renders the HTML block for the page a user sees when they apply keyword tags to
  733. * a media item within an media instance owned by the media module.
  734. *
  735. * @version 0.1.9
  736. * @since 0.1.9
  737. * @param ?
  738. * @return string | composited HTML block
  739. */
  740. public function render_keywordTagPage(){
  741. }
  742. /**
  743. * Renders the HTML block for the page a user sees when they add geotagging info to
  744. * a media item within an media instance owned by the media module.
  745. *
  746. * @version 0.1.9
  747. * @since 0.1.9
  748. * @param ?
  749. * @return string | composited HTML block
  750. */
  751. public function render_geoTagPage(){
  752. }
  753. /**
  754. * Renders the HTML block for the page a user sees when they add licensing info to
  755. * a media item within an media instance owned by the media module.
  756. *
  757. * @version 0.1.9
  758. * @since 0.1.9
  759. * @param ?
  760. * @return string | composited HTML block
  761. */
  762. public function render_licenseTagPage(){
  763. }
  764. public function register(){
  765. global $bpm;
  766. $slug = $this->getSlug();
  767. $name = $this->getName();
  768. $php_class = get_class($this);
  769. $bpm->mediaModules->register($slug, $name, $php_class);
  770. }
  771. }
  772. $temp = new BPMM_audioStream();
  773. $temp->register();
  774. unset($temp);
  775. ?>