Author: jablko
Date: Wed Dec 2 13:25:58 2009
New Revision: 4032
Log:
Update Flowplayer usage -- force
Added:
trunk/web/js/flowplayer.js (contents, props changed)
Modified:
trunk/apps/qubit/modules/digitalobject/actions/showAudioComponent.class.php
trunk/apps/qubit/modules/digitalobject/actions/showVideoComponent.class.php
trunk/apps/qubit/modules/digitalobject/templates/_showAudio.php
trunk/apps/qubit/modules/digitalobject/templates/_showVideo.php
trunk/web/css/main.css
Modified:
trunk/apps/qubit/modules/digitalobject/actions/showAudioComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/digitalobject/actions/showAudioComponent.class.php
Wed Dec 2 13:19:05 2009 (r4031)
+++ trunk/apps/qubit/modules/digitalobject/actions/showAudioComponent.class.php
Wed Dec 2 13:25:58 2009 (r4032)
@@ -35,11 +35,7 @@
*/
public function execute($request)
{
- $this->getResponse()->addJavaScript('/vendor/jquery');
-
$this->getResponse()->addJavaScript('/vendor/flowplayer/flashembed.min.js');
- $this->getResponse()->addStylesheet('flowPlayer');
-
- $this->pathToFlowPlayer = public_path('flowplayer/flowplayer.swf');
- $this->pathToFlowPlayerAudioPlugin =
public_path('flowplayer/flowplayer.audio.swf');
+
$this->getResponse()->addJavaScript('/vendor/flowplayer/example/flowplayer-3.1.4.min.js');
+ $this->getResponse()->addJavaScript('flowplayer');
}
}
Modified:
trunk/apps/qubit/modules/digitalobject/actions/showVideoComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/digitalobject/actions/showVideoComponent.class.php
Wed Dec 2 13:19:05 2009 (r4031)
+++ trunk/apps/qubit/modules/digitalobject/actions/showVideoComponent.class.php
Wed Dec 2 13:25:58 2009 (r4032)
@@ -35,12 +35,6 @@
*/
public function execute($request)
{
- $this->getResponse()->addJavaScript('/vendor/jquery');
-
$this->getResponse()->addJavaScript('/vendor/flowplayer/flashembed.min.js');
- $this->getResponse()->addStylesheet('flowPlayer');
-
- $this->pathToFlowPlayer = public_path('flowplayer/flowplayer.swf');
-
// Get representation by usage type
$this->representation =
$this->digitalObject->getRepresentationByUsage($this->usageType);
@@ -53,6 +47,9 @@
// Set up display of video in flowplayer
if ($this->representation)
{
+
$this->getResponse()->addJavaScript('/vendor/flowplayer/example/flowplayer-3.1.4.min.js');
+ $this->getResponse()->addJavaScript('flowplayer');
+
// If this is a reference movie, get the thumbnail representation for the
// place holder image
$this->showFlashPlayer = true;
Modified: trunk/apps/qubit/modules/digitalobject/templates/_showAudio.php
==============================================================================
--- trunk/apps/qubit/modules/digitalobject/templates/_showAudio.php Wed Dec
2 13:19:05 2009 (r4031)
+++ trunk/apps/qubit/modules/digitalobject/templates/_showAudio.php Wed Dec
2 13:25:58 2009 (r4032)
@@ -1,73 +1,2 @@
-<?php use_helper('Javascript') ?>
-<?php echo javascript_tag(<<<EOF
- // select all link tags with "flowplayer" class and "audio-enable" them.
- $(function() {
- $('a.flowplayer').flashembed('$pathToFlowPlayer', {
- config:
- {
- clip: {
- autoPlay: false,
- autoBuffering: false,
- url: '$link'
- },
- plugins: {
- audio: {
- url: '$pathToFlowPlayerAudioPlugin'
- },
- controls: { // This plugin is automatically loaded by flowplayer
-
- // TODO: i18n tooltips
- tooltips: {
- // buttons: false,
- // play: '',
- // pause: '',
- // mute: '',
- // unmute: '',
- // stop: '',
- // fullscreen: '',
- // fullscreenExit: '',
- // next: '',
- // previous: '',
- // scrubber: true
- // volume: true
- },
-
- // Coloring properties
- backgroundColor: '#006699',
- backgroundGradient: 'low',
- timeColor: '#ffffff',
- durationColor: '#000000',
- progressColor: '#000000',
- progressGradient: 'low',
- bufferColor: '#ffffff',
- bufferGradient: 'low',
- sliderColor: '#999999',
- sliderGradient: 'low',
- buttonColor: '#ff9d3c',
- buttonOverColor: '#000000',
- volumeSliderColor: '#999999',
- volumeSliderGradient: 'low',
- timeBgColor: '#006699',
-
- // Position, dimensions, ...,
- height: '24px',
-
- // Visibility properties and buttons
- autohide: 'never',
- all: true,
- playlist: false,
- fullscreen: false
- }
- }
- }
- });
- });
-EOF
-) ?>
-
-<a class="flowplayer flowplayerAudio" href="<?php echo $link ?>"></a>
-
-<!-- link to download master -->
-<?php if ($link != null): ?>
- <?php echo link_to(__('download audio'),$link) ?>
-<?php endif; ?>
+<a class="flowplayer audio" href="<?php echo $link ?>"></a>
+<?php echo link_to(__('download audio'), $link) ?>
Modified: trunk/apps/qubit/modules/digitalobject/templates/_showVideo.php
==============================================================================
--- trunk/apps/qubit/modules/digitalobject/templates/_showVideo.php Wed Dec
2 13:19:05 2009 (r4031)
+++ trunk/apps/qubit/modules/digitalobject/templates/_showVideo.php Wed Dec
2 13:25:58 2009 (r4032)
@@ -1,4 +1,3 @@
-<?php use_helper('Javascript') ?>
<?php if ($usageType == QubitTerm::MASTER_ID): ?>
<?php if ($link == null): ?>
<?php echo image_tag($representation->getFullPath()); ?>
@@ -7,76 +6,13 @@
<?php endif; ?>
<?php elseif ($usageType == QubitTerm::REFERENCE_ID): ?>
<?php if ($showFlashPlayer): ?>
- <?php echo javascript_tag(<<<EOF
- // select all link tags with "flowplayer" class and "audio-enable" them.
- $(function() {
- $('a.flowplayer').flashembed('$pathToFlowPlayer', {
- config:
- {
- clip: {
- autoPlay: false,
- autoBuffering: true,
- url: '$representationFullPath'
- },
- plugins: {
- controls: { // This plugin is automatically loaded by
flowplayer
-
- // TODO: i18n tooltips
- tooltips: {
- // buttons: false,
- // play: '',
- // pause: '',
- // mute: '',
- // unmute: '',
- // stop: '',
- // fullscreen: '',
- // fullscreenExit: '',
- // next: '',
- // previous: '',
- // scrubber: true
- // volume: true
- },
-
- // Coloring properties
- backgroundColor: '#006699',
- backgroundGradient: 'low',
- timeColor: '#ffffff',
- durationColor: '#000000',
- progressColor: '#000000',
- progressGradient: 'low',
- bufferColor: '#ffffff',
- bufferGradient: 'low',
- sliderColor: '#999999',
- sliderGradient: 'low',
- buttonColor: '#ff9d3c',
- buttonOverColor: '#000000',
- volumeSliderColor: '#999999',
- volumeSliderGradient: 'low',
- timeBgColor: '#006699',
-
- // Position, dimensions, ...,
- height: '24px',
-
- // Visibility properties and buttons
- autohide: 'never',
- all: true,
- playlist: false
- }
- }
- }
- });
- });
-EOF
- ) ?>
- <a class="flowplayer flowplayerVideo" href="<?php echo
public_path($representation->getFullPath()) ?>">
-
- </a>
+ <a class="flowplayer" href="<?php echo
public_path($representation->getFullPath()) ?>"></a>
<?php else: ?>
<div style="text-align: center">
<?php echo image_tag($representation->getFullPath(), array('style' =>
'border: #999 1px solid')) ?>
</div>
<?php endif;?>
-
+
<!-- link to download master -->
<?php if ($link != null): ?>
<?php echo link_to(__('download movie'),$link) ?>
Modified: trunk/web/css/main.css
==============================================================================
--- trunk/web/css/main.css Wed Dec 2 13:19:05 2009 (r4031)
+++ trunk/web/css/main.css Wed Dec 2 13:25:58 2009 (r4032)
@@ -160,3 +160,17 @@
{
position: static;
}
+
+/* Flowplayer width and height */
+
+.flowplayer
+{
+ display: block;
+ height: 300px;
+ width: 435px;
+}
+
+.audio
+{
+ height: 24px;
+}
Added: trunk/web/js/flowplayer.js
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/web/js/flowplayer.js Wed Dec 2 13:25:58 2009 (r4032)
@@ -0,0 +1,8 @@
+Drupal.behaviors.flowplayer = {
+ attach: function (context)
+ {
+ $('.flowplayer', context).each(function ()
+ {
+ flowplayer(this, Qubit.relativeUrlRoot +
'/vendor/flowplayer/flowplayer-3.1.5.swf', { clip: { autoPlay: false } });
+ });
+ } };
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.