Skip to content

Commit

Permalink
Fix player not working error
Browse files Browse the repository at this point in the history
  • Loading branch information
guiqiqi committed Nov 22, 2022
1 parent 02d3b31 commit 4cc7884
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions layout/post.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@
<% } %>
<script>
window.addEventListener("load", () => {
if (chapters !== []) Shikwasa.use(Chapter);
const { Player } = window.Shikwasa;
// Check for local audio media url
let url = "<%= page.podcast.media.url %>";
if (!(url.startsWith("http://") || url.startsWith("https://")))
url = "<%= full_url_for(path, {relative: false}) %>".replace("index.html", '') + url;
const player = new Shikwasa({
const player = new Player({
container: () => document.querySelector('.post-podcast-player'),
audio: {
title: "<%= page.title %>",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-chromate",
"version": "0.0.2",
"version": "0.0.3",
"author": {
"name": "Doge-GUI",
"email": "guiqiqi187@gmail.com",
Expand Down

0 comments on commit 4cc7884

Please sign in to comment.