Merge branch 'nodejs' of https://github.com/quoije/le-journal-d-un-podcast into nodejs
This commit is contained in:
@@ -60,6 +60,10 @@ body {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
#audioplayerdivstop {
|
||||
margin-bottom: 160px;
|
||||
}
|
||||
|
||||
#ws:link {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 10.334 10.334" style="enable-background:new 0 0 10.334 10.334;" xml:space="preserve">
|
||||
<g>
|
||||
<path style="fill:#030104;" d="M10.333,9.816c0,0.285-0.231,0.518-0.517,0.518H0.517C0.233,10.334,0,10.102,0,9.816V0.517
|
||||
C0,0.232,0.231,0,0.517,0h9.299c0.285,0,0.517,0.231,0.517,0.517V9.816z"/>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 750 B |
@@ -67,6 +67,10 @@ jQuery(function($) {
|
||||
var audio = document.getElementById('player');
|
||||
console.log(audio.src);
|
||||
|
||||
// check if ep is in cache
|
||||
|
||||
checkepcache();
|
||||
|
||||
// cookie last playback
|
||||
if (Cookies.get("lastep-title")) {
|
||||
console.log("playback function")
|
||||
@@ -78,13 +82,31 @@ jQuery(function($) {
|
||||
}
|
||||
|
||||
audio.addEventListener('timeupdate',function(){
|
||||
<<<<<<< HEAD
|
||||
var currentTime = audio.currentTime;
|
||||
Cookies.set("lastep-time", currentTime);
|
||||
=======
|
||||
var currentTime = audio.currentTime;
|
||||
Cookies.set("lastep-time", currentTime, { expires: 365 });
|
||||
>>>>>>> 9f36b512a893a4955dde67afea5f1b675cf31c05
|
||||
},false);
|
||||
});
|
||||
|
||||
function checkepcache(){
|
||||
if (Cookies.get("lastep-src")){
|
||||
console.log("yahh");
|
||||
const epstab = document.getElementById("epstab");
|
||||
epstab.innerHTML = "<img src='assets/img/spek.icon.svg' width='25px'></img>" + " épisodes";
|
||||
};
|
||||
}
|
||||
// player things
|
||||
|
||||
function stopplayer(){
|
||||
document.getElementById("lienep").innerHTML= title;
|
||||
document.getElementById("sbody").innerHTML= body + "....";
|
||||
document.getElementById("lienep").href= linkdec;
|
||||
}
|
||||
|
||||
function play(src, title, date, body) {
|
||||
var audio = document.getElementById('player');
|
||||
console.log(src);
|
||||
@@ -99,15 +121,12 @@ jQuery(function($) {
|
||||
document.getElementById("player").setAttribute('src', linkdec);
|
||||
document.getElementById("player").load();
|
||||
document.getElementById("player").play();
|
||||
Cookies.set("lastep-title", title)
|
||||
Cookies.set("lastep-src", audio.src);
|
||||
Cookies.set("lastep-body", body)
|
||||
Cookies.set("lastep-title", title, { expires: 365 });
|
||||
Cookies.set("lastep-src", audio.src, { expires: 365 });
|
||||
Cookies.set("lastep-body", body, { expires: 365 });
|
||||
checkepcache();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function switchTab() {
|
||||
$('[href="#ep"]').tab('show');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user