/**
  * Returns the html markup that can embed the media on a page.
  * @return string
  */
 public function get_embed_markup()
 {
     if (!$this->media_work) {
         return '';
     }
     if ($this->current_media_file) {
         $avd = new reasonAVDisplay();
         $height = $this->get_embed_height();
         $width = $this->get_embed_width();
         $avd->set_video_dimensions($width, $height);
         $avd->set_audio_dimensions(0, 0);
         if (!$this->show_controls) {
             $avd->set_parameter('flv', 'controlbar', 'false');
             $avd->set_parameter('qt', 'controller', '0');
             $avd->set_parameter('wmv', 'ShowControls', 'false');
         }
         if (!$this->autostart) {
             $avd->disable_automatic_play_start();
         }
         if ($image_info = reason_get_media_placard_image_info($this->current_media_file)) {
             $avd->set_placard_image($image_info['url']);
             $avd->set_placard_image_dimensions($image_info['width'], $image_info['height']);
         }
         $this->latest_tech_note = $avd->get_tech_note($this->current_media_file);
         $embed_markup = $avd->get_embedding_markup($this->current_media_file);
         return $embed_markup;
     } else {
         return '';
     }
 }
Esempio n. 2
0
 include_once 'reason_header.php';
 reason_include_once('classes/entity.php');
 reason_include_once('classes/av_display.php');
 reason_include_once('function_libraries/file_finders.php');
 $e = new entity($id);
 if ($e->get_value('type') != id_of('av_file')) {
     trigger_error('ID passed to av_display is not for a media file');
     die;
 }
 if ($e->get_value('url')) {
     $avd = new reasonAVDisplay();
     $embed_markup = $avd->get_embedding_markup($id);
     if (empty($embed_markup)) {
         $embed_markup = '<a href="' . $e->get_value('url') . '">' . $e->get_value('url') . '</a>';
     } else {
         $tech_note = $avd->get_tech_note($id);
         if (!empty($tech_note)) {
             $embed_markup .= '<div class="techNote">' . $tech_note . '</div>' . "\n";
         }
     }
 } else {
     $embed_markup = 'Please contact site maintainer for this file (No URL provided)';
 }
 $GLOBALS['_reason_media_popup_data']['embed_markup'] = $embed_markup;
 $rel = $e->get_right_relationship('av_to_av_file');
 if ($rel) {
     reset($rel);
     $rel = current($rel);
     $GLOBALS['_reason_media_popup_data']['desc'] = $rel->get_value('description');
     $GLOBALS['_reason_media_popup_data']['title'] = $rel->get_value('name');
 } else {