Trying to figure out how to use the CE Video/audio to make a audio-player with a playlist
Here I use the CE Video/audio with multiple selections:
(I know that it is a feature, that only one audio-player shows up)
Screendump of the backend:

This is the default code for the ce_player.html5 template:
<?php $this->extend('block_searchable'); ?> <?php $this->block('content'); ?> <!-- indexer::stop --> <?php if ($this->isVideo): ?> <video<?= $this->size ?><?php if ($this->poster): ?> poster="<?= $this->poster ?>" preload="none"<?php endif; ?><?php if ($this->autoplay): ?> autoplay<?php endif; ?> controls> <?php foreach ($this->files as $file): ?> <source type="<?= $file->mime ?>" src="<?= $file->path ?>" title="<?= $file->title ?>"> <?php endforeach; ?> </video> <?php else: ?> <audio<?= $this->size ?> preload="none"<?php if ($this->autoplay): ?> autoplay<?php endif; ?> controls> <?php foreach ($this->files as $file): ?> <source type="<?= $file->mime ?>" src="<?= $file->path ?>" title="<?= $file->title ?>"> <?php endforeach; ?> </audio> <?php endif; ?> <!-- indexer::continue --> <?php $this->endblock(); ?>
And here is the player:
Moose the Mooche by Charlie Parker_tempo 50.m4a
Moose the Mooche by Charlie Parker_tempo 75.m4a
Moose the Mooche by Charlie Parker_tempo 100.m4a
Steps In Space (S) - Worksheet 1.mp3
straight eighths - solo piano.mp3
Here is the same CE-video/audio, but to inspect $this I made a template (ce_player_playlist.html5) with this code:
<?php $this->extend('block_searchable'); ?> <?php $this->block('content'); ?> <!-- indexer::stop --> <?php $this->showTemplateVars(); ?> <!-- indexer::continue --> <?php $this->endblock(); ?>
And here's the output:
Array ( [id] => 940 [pid] => 93 [ptable] => tl_article [sorting] => 256 [tstamp] => 1539278876 [type] => player [headline] => [text] => [addImage] => [singleSRC] => [alt] => [title] => [size] => width="" height="" [imagemargin] => [imageUrl] => [fullsize] => [caption] => [floating] => above [html] => [listtype] => [listitems] => [tableitems] => [summary] => [thead] => [tfoot] => [tleft] => [sortable] => [sortIndex] => 0 [sortOrder] => ascending [mooHeadline] => [mooStyle] => [mooClasses] => [highlight] => [shClass] => [code] => [url] => [target] => [titleText] => [linkTitle] => [embed] => [rel] => [useImage] => [multiSRC] => [orderSRC] => [useHomeDir] => [perRow] => 4 [perPage] => 0 [numberOfItems] => 0 [sortBy] => [galleryTpl] => [customTpl] => ce_player_playlist [playerSRC] => a:6:{i:0;s:16:"Zzf桥z:ff";i:1;s:16:" % ";i:2;s:16:"Jg % ";i:3;s:16:"Jw % ";i:4;s:16:"5Z桥z:ff";i:5;s:16:"P % ";} [youtube] => [posterSRC] => [playerSize] => a:2:{i:0;s:0:"";i:1;s:0:"";} [autoplay] => [sliderDelay] => 0 [sliderSpeed] => 300 [sliderStartSlide] => 0 [sliderContinuous] => [cteAlias] => 0 [articleAlias] => 0 [article] => 0 [form] => 0 [module] => 0 [protected] => [groups] => [guests] => [cssID] => [space] => Array ( [0] => [1] => ) [invisible] => [start] => [stop] => [com_order] => ascending [com_perPage] => 0 [com_moderate] => [com_bbcode] => [com_disableCaptcha] => [com_requireLogin] => [com_template] => com_default [rs_columns_large] => [rs_columns_medium] => [rs_columns_small] => [rsce_data] => [rsts_id] => 0 [rsts_template] => rsts_default [rsts_type] => [rsts_direction] => [rsts_random] => [rsts_loop] => [rsts_centerContent] => [rsts_skin] => [rsts_width] => [rsts_height] => [rsts_preloadSlides] => 0 [rsts_gapSize] => 0% [rsts_duration] => 0 [rsts_autoplay] => 0 [rsts_videoAutoplay] => [rsts_autoplayRestart] => 0 [rsts_autoplayProgress] => [rsts_pauseAutoplayOnHover] => [rsts_navType] => [rsts_controls] => 1 [rsts_scaleMode] => [rsts_imagePosition] => [rsts_deepLinkPrefix] => [rsts_keyboard] => 1 [rsts_captions] => 1 [rsts_customSkin] => [rsts_cssPrefix] => [sc_name] => [sc_gap] => 0 [sc_type] => [sc_gapdefault] => 1 [sc_equalize] => [sc_color] => [sc_parent] => 0 [sc_childs] => [sc_sortid] => 0 [rsts_content_type] => rsts_default [rsts_invertControls] => [rsts_thumbs] => [rsts_thumbs_width] => 100% [rsts_thumbs_height] => 1x1 [rsts_thumbs_gapSize] => [rsts_thumbs_duration] => 0 [rsts_thumbs_scaleMode] => [rsts_thumbs_imagePosition] => [rsts_thumbs_controls] => 1 [rsts_thumbs_imgSize] => a:3:{i:0;s:2:"50";i:1;s:2:"50";i:2;s:4:"crop";} [rsts_thumbs_slideMaxCount] => 0 [rsts_thumbs_prevNextSteps] => 0 [rsts_thumbs_visibleArea] => 0 [rsts_thumbs_visibleAreaMax] => 0 [rsts_thumbs_slideMinSize] => 50 [rsts_thumbs_slideMaxSize] => 50 [rsts_thumbs_rowMaxCount] => 0 [rsts_thumbs_rowMinSize] => 0 [rsts_thumbs_rowSlideRatio] => [rsts_slideMaxCount] => 0 [rsts_prevNextSteps] => 0 [rsts_visibleArea] => 0 [rsts_visibleAreaMax] => 0 [rsts_slideMinSize] => 0 [rsts_slideMaxSize] => 0 [rsts_rowMaxCount] => 0 [rsts_rowMinSize] => 0 [rsts_rowSlideRatio] => [rsts_combineNavItems] => 1 [movie_controls] => [movie_preload] => [movie_autoplay] => [movie_loop] => [movie_width] => [movie_height] => [movie_preview] => [movie_webm] => [movie_mp4] => [movie_ogg] => [audio_controls] => [audio_preload] => [audio_autoplay] => [audio_loop] => [audio_webm] => [audio_mp3] => [audio_ogg] => [audio_order] => [movie_order] => [metaIgnore] => [rsts_import_settings] => [rsts_import_settings_from] => 0 [rsts_thumbControls] => [rsts_visibleAreaAlign] => 50 [classes] => Array ( ) [typePrefix] => ce_ [hl] => h1 [Template] => Contao\FrontendTemplate Object ( [strBuffer:protected] => [strContentType:protected] => text/html [arrData:protected] => Array *RECURSION* [strTemplate:protected] => ce_player_playlist [strParent:protected] => block_searchable [strDefault:protected] => [strFormat:protected] => html5 [strTagEnding:protected] => > [arrBlocks:protected] => Array ( ) [arrBlockNames:protected] => Array ( [0] => content ) [arrCache:protected] => Array ( ) [arrObjects:protected] => Array ( [Config] => Contao\Config Object ( [Files:protected] => [strTop:protected] => [strBottom:protected] => [blnIsModified:protected] => [arrData:protected] => Array ( ) [arrCache:protected] => Array ( ) ) [Session] => Contao\Session Object ( [arrSession:protected] => Array ( ) ) [MadeYourDay\Contao\FrontendHelper] => MadeYourDay\Contao\FrontendHelper Object ( [arrCache:protected] => Array ( ) [arrObjects:protected] => Array ( [Config] => Contao\Config Object ( [Files:protected] => [strTop:protected] => [strBottom:protected] => [blnIsModified:protected] => [arrData:protected] => Array ( ) [arrCache:protected] => Array ( ) ) [Session] => Contao\Session Object ( [arrSession:protected] => Array ( ) ) ) ) ) ) [poster] => [isVideo] => [files] => Array ( [0] => Contao\File Object ( [resFile:protected] => [strFile:protected] => files/Per/Lyd/Moose the Mooche by Charlie Parker_tempo 100.m4a [strTmp:protected] => [objModel:protected] => [arrPathinfo:protected] => Array ( [dirname] => /home/stinemic/bifagsklaver.dk/files/Per/Lyd [basename] => Moose the Mooche by Charlie Parker_tempo 100.m4a [extension] => m4a [filename] => Moose the Mooche by Charlie Parker_tempo 100 ) [arrImageSize:protected] => Array ( ) [arrImageViewSize:protected] => Array ( ) [blnDoNotCreate:protected] => 1 [arrCache:protected] => Array ( ) [arrObjects:protected] => Array ( [Files] => Contao\Files\Php Object ( ) ) [title] => Moose the Mooche by Charlie Parker_tempo 100.m4a ) [1] => Contao\File Object ( [resFile:protected] => [strFile:protected] => files/Per/Lyd/straight eighths - solo piano.mp3 [strTmp:protected] => [objModel:protected] => [arrPathinfo:protected] => Array ( [dirname] => /home/stinemic/bifagsklaver.dk/files/Per/Lyd [basename] => straight eighths - solo piano.mp3 [extension] => mp3 [filename] => straight eighths - solo piano ) [arrImageSize:protected] => Array ( ) [arrImageViewSize:protected] => Array ( ) [blnDoNotCreate:protected] => 1 [arrCache:protected] => Array ( ) [arrObjects:protected] => Array ( [Files] => Contao\Files\Php Object ( ) ) [title] => ) ) [style] => [class] => ce_player [inColumn] => main )
Same CE-video/audio - another template with this code:
<?php $this->extend('block_searchable'); ?> <?php $this->block('content'); ?> <!-- indexer::stop --> <?php foreach($this->files as $file) { dump($file->path); } ?> <!-- indexer::continue --> <?php $this->endblock(); ?>
gives this output:
string(62) "files/Per/Lyd/Moose the Mooche by Charlie Parker_tempo 100.m4a"
string(47) "files/Per/Lyd/straight eighths - solo piano.mp3"
From the $this->showTemplateVars():
There is nothing in the [multiSRC]
The content in [playerSRC] shows that there are multiple files, but the code is weird:
[playerSRC] => a:6:{i:0;s:16:"Z�z��f桥�z:ff";i:1;s:16:"������%� �";i:2;s:16:"Jg����%� �";i:3;s:16:"Jw����%� �";i:4;s:16:"5���Z桥�z:ff";i:5;s:16:"P������%� �";}
Moose the Mooche by Charlie Parker_tempo 50.m4a
Moose the Mooche by Charlie Parker_tempo 75.m4a
Moose the Mooche by Charlie Parker_tempo 100.m4a
Steps In Space (S) - Worksheet 1.mp3
straight eighths - solo piano.mp3