Hello! I would like to add the AblePlayer JavaScript media player to my Logseq graph so that I can play audio using its custom player.
However, I’m not sure how or where to add the Javascript. I’ve tried using the /html and also downloaded the custom.js plugin.
Typically, when I use AblePlayer on a website, I have to load the following scripts in the head:
<!-- Dependencies -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/js-cookie@3.0.1/dist/js.cookie.min.js"></script>
<!-- CSS -->
<link rel="stylesheet" href="build/ableplayer.min.css" type="text/css"/>
<!-- JavaScript -->
<script src="build/ableplayer.min.js"></script>
Then, in the page itself, I add the following code for audio:
<audio id="audio1" data-able-player preload="auto">
<source type="audio/ogg" src="path_to_audio_file.ogg"/>
<source type="audio/mpeg" src="path_to_audio_file.mp3"/>
</audio>
OR for video:
<video id="video1" data-able-player preload="auto" width="480" height="360" poster="path_to_image.jpg">
<source type="video/webm" src="path_to_video.webm" data-desc-src="path_to_described_video.webm"/>
<source type="video/mp4" src="path_to_video.mp4" data-desc-src="path_to_described_video.mp4"/>
<track kind="captions" src="path_to_captions.vtt"/>
<track kind="descriptions" src="path_to_descriptions.vtt"/>
</video>
How can I translate this code for Logseq?