diff options
author | Matt Stratton <matt.stratton@gmail.com> | 2020-02-05 02:46:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-05 02:46:37 +0300 |
commit | 46f2bb579a7d0cbdc3f509ca4952c5abeb408276 (patch) | |
tree | 764fb11fdc02fee2cbf11f364bbbab00cb310861 /layouts | |
parent | 2c3e4e216d12e67dce4d0cb336fdce2012e643c5 (diff) |
Update media player (#242)
* Add public folder to gitignore
Signed-off-by: Matt Stratton <matt.stratton@gmail.com>
* Remove markdownify from guest list
Fixes #240
Signed-off-by: Matt Stratton <matt.stratton@gmail.com>
* Replace media player
Fixes #241
Signed-off-by: Matt Stratton <matt.stratton@gmail.com>
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/episode/single.html | 10 | ||||
-rw-r--r-- | layouts/guest/list.html | 2 | ||||
-rw-r--r-- | layouts/partials/footer_scripts.html | 17 | ||||
-rw-r--r-- | layouts/partials/head_includes.html | 14 |
4 files changed, 27 insertions, 16 deletions
diff --git a/layouts/episode/single.html b/layouts/episode/single.html index 14bc2f6..374c3ad 100644 --- a/layouts/episode/single.html +++ b/layouts/episode/single.html @@ -46,12 +46,10 @@ {{- with .Params.podcast_file -}} <div class="row"> <div class="col-md-12 player_row"> - <audio src="{{ $.Site.Params.media_prefix }}{{ . }}" preload="auto"/> - </div> - </div> - <div class="row"> - <div class="col-md-11 col-md-offset-1"> - <a href="{{ $.Site.Params.media_prefix }}{{ . }}">Direct Download</a> + + <audio id="player2" style="width: 100%" controls preload="none"> + <source src="{{ $.Site.Params.media_prefix }}{{ . }}" type="audio/mp3"> + </audio> </div> </div> {{- end -}} diff --git a/layouts/guest/list.html b/layouts/guest/list.html index e76415f..0721771 100644 --- a/layouts/guest/list.html +++ b/layouts/guest/list.html @@ -31,7 +31,7 @@ </div> <div class= "col-md-6"> <h3><a href = "{{(printf "guest/%s" .File.BaseFileName) | absURL }}">{{ .Title }}</a></h3> - <p>{{ .Content | markdownify }}</p> + <p>{{ .Content }}</p> {{ with .Params.Website }} <a href = "{{ . }}"><i class="fas fa-home fa-2x"></i></a> {{ end }} diff --git a/layouts/partials/footer_scripts.html b/layouts/partials/footer_scripts.html index 5df9aa6..6801f86 100644 --- a/layouts/partials/footer_scripts.html +++ b/layouts/partials/footer_scripts.html @@ -1,5 +1,4 @@ <script src={{ "js/castanet-min.js" | absURL }}></script> -<script src="/audiojs/audio.min.js"></script> <script> $("#share").jsSocials({ shares: [ @@ -28,13 +27,15 @@ ], }); </script> + <script> -audiojs.events.ready(function() { - var as = audiojs.createAll({ - imageLocation: '{{"img/player-graphics.gif" | relURL}}', - retinaImageLocation: '{{"img/player-graphics@2x.gif" | relURL}}', - swfLocation: '{{"swf/audiojs.swf" | relURL}}' - }); - }); + var player = new MediaElementPlayer('player2', { + features: ['playpause', 'current', 'progress', 'duration', 'volume','speed'], + defaultSpeed: 1.0, + // other configuration elements + }); </script> + + + {{ template "_internal/google_analytics_async.html" . }} diff --git a/layouts/partials/head_includes.html b/layouts/partials/head_includes.html index fa2a583..58781b6 100644 --- a/layouts/partials/head_includes.html +++ b/layouts/partials/head_includes.html @@ -14,5 +14,17 @@ <link rel="stylesheet" href="{{ . | absURL }}"> {{ end }} <link href={{"css/all.css" | absURL }} rel="stylesheet"> - +<link href={{"css/mediaelementplayer.min.css" | absURL }} rel="stylesheet"> +<style> + .mejs__overlay-button { + background-image: url("/img/mejs-controls.svg"); + } + .mejs__overlay-loading-bg-img { + background-image: url("/img/mejs-controls.svg"); + } + .mejs__button > button { + background-image: url("/img/mejs-controls.svg"); + } + </style> +<link href={{"css/speed.min.css" | absURL }} rel="stylesheet"> |