Files
shaka-player/lib/util/time_utils.js
T
Álvaro Velad Galván 4f62ce8b24 build: Reduce bundle size by deduplicating license headers (#10182)
Ensure generated bundles contain a single license header instead of
repeating the same notice across bundled modules.

Normalize all copyright years to 2016 and remove
duplicate license headers from generated bundles.

This reduces the final bundle size while preserving license information
in the distributed artifacts.
2026-06-05 12:43:28 +02:00

22 lines
444 B
JavaScript

/*! @license
* Shaka Player
* Copyright 2016 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
goog.provide('shaka.util.TimeUtils');
shaka.util.TimeUtils = class {
/**
* Convert Ntp ntpTimeStamp to UTC Time
*
* @param {number} ntpTimeStamp
* @return {number} utcTime
*/
static convertNtp(ntpTimeStamp) {
const start = Date.UTC(1900, 0, 1, 0, 0, 0, 0);
return new Date(start + ntpTimeStamp).getTime();
}
};