const player = flowplayer("#player",
{ src: ""
})
const innerText = Object.getOwnPropertyDescriptor(HTMLElement.prototype, "innerText")
const timestampEle = player.root.querySelector(".fp-timestamp")
Object.defineProperty(timestampEle, "innerText", {
get: ()=> innerText.get.call(timestampEle)
, set: (args)=> {
if(!player.opts.live) return innerText.set.call(timestampEle, args)
let timestamp = 0
args.substring(1).split(":").reverse().forEach((value, index)=> {
switch (index) {
case 0: return timestamp += parseFloat(value) * 1000
case 1: return timestamp += parseFloat(value) * 60000
case 2: return timestamp += parseFloat(value) * 3600000
}
})
innerText?.set?.call(timestampEle, new Date(Date.now() - timestamp).toLocaleTimeString())
}
})
I am working with HLS live stream and code above displays the local time instead of time duration covered, I want to configure the timeline of the video such that there is a mark at 0th second of every minute (i.e. XX:XX:00). As the stream is live and the playback of the stream has fixed duration, the 0th second of the time will keep shifting towards left because the older stream is getting lost and new stream is getting added.
How could I create marks at 0th second of every minute?