MediaSoundCloudStyles.inc
1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* @file
* Styles class implementation for Media: SoundCloud.
*/
class MediaSoundCloudStyles extends FileStyles {
public $autoplay;
public $extra_params;
function getAutoplay() {
//drupal_set_message("getAutoplay");
return $this->get('autoplay');
}
function setAutoplay($value) {
//drupal_set_message("setAutoplay");
return $this->set('autoplay', $value);
}
function getExtraParams() {
//drupal_set_message("getExtraParams");
return $this->get('extra_params');
}
function setExtrasParams($value) {
//drupal_set_message("setExtrasParams");
return $this->set('extra_params', $value);
}
function getImageUri() {
//drupal_set_message("getImageUri");
if ($image_uri = $this->get('imageUri')) {
return $image_uri;
}
$object = $this->getObject();
if ($object->uri) {
$wrapper = file_stream_wrapper_get_instance_by_uri($object->uri);
return $wrapper->getLocalThumbnailPath();
}
}
function audio($effect) {
//drupal_set_message("audio");
$variables = array(
'uri' => $this->getUri(),
'width' => $this->getWidth(),
'autoplay' => $this->getAutoplay(),
'extra_params' => $this->getExtraParams(),
);
$this->setOutput(theme('media_soundcloud_audio', $variables));
}
}