Send progress update to server when playing media #10
This commit is contained in:
4 files changed
+237
-18
No files matched your search
+18
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user