Send progress update to server when playing media #10

This commit is contained in:
prayag17 committed 2023-05-09 21:16:29 +05:30
1 parent 797c80b8cd
commit 97981c7d35
4 files changed
+237 -18

No files matched your search

+18 -1
View File
@@ -3,11 +3,28 @@
* @param {number} ticks - C# ticks of a particular item
* @return {number} Converted ticks to Milliseconds
*/
const ticksToMs = (ticks) => {
return Math.round(ticks / 10000);
};
/**
* @format
* @param {number} ticks - C# ticks of a particular item
* @return {number} Converted ticks to Seconds
*/
export const ticksToSec = (ticks) => {
return Math.round(ticksToMs(ticks) / 1000);
};
/**
* @format
* @param {number} sec - Sec of a particular item
* @return {number} Converted Seconds to C# ticks
*/
export const secToTicks = (ticks) => {
return Math.round(ticks * 10000000);
};
/**
* @format
* @param {number} ticks - C# ticks of a particular item