kirby-video
kirby-video copied to clipboard
Different video qualities
Hi,
is there a way to have different video qualities with the same file extension. Up to now I had my files like video.standard.mp4, video.mobile.mp4, video.hd.mp4, video.ogv.
Is there a way to keep/use the different qualities.
Daniel
Hey dans0, this is not yet possible.
Can you give me an example of your markup and/or javascript to handle & serve these different versions?
Dennis
I used something similar to this.
// kirbytag kirbytext::$tags['sublime_old'] = array( 'attr' => array( 'width', 'height', 'uid', 'name', 'class' ), 'html' => function($tag) {
$page = $tag->page();
$id = $tag->attr('sublime');
$class = $tag->attr('class');
$videos = array();
$poster = false;
// gather all video files which match the given id/name
foreach($page->videos() as $v) {
if(preg_match('!^' . preg_quote($id) . '!i', $v->name())) {
$videos[] = $v;
}
}
if(empty($videos)) return false;
// find the poster for this video
foreach($page->images() as $i) {
if(preg_match('!^' . preg_quote($id) . '!i', $i->name())) {
$poster = $i;
break;
}
}
Am 29.10.2017 um 09:12 schrieb Dennis Kerzig [email protected]:
Hey dans0, this is not yet possible.
Can you give me an example of your markup and/or javascript to handle & serve these different versions?
Dennis
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.