UNPKG

@slashedcloud/player

Version:

A media player application utilizing Shaka Player for adaptive video streaming, capable of playing HLS, MPD and plain HTTP video streams.

49 lines (48 loc) 1.27 kB
var h = Object.defineProperty; var m = (i, a, s) => a in i ? h(i, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : i[a] = s; var l = (i, a, s) => m(i, typeof a != "symbol" ? a + "" : a, s); var u = (i, a, s) => new Promise((n, r) => { var p = (t) => { try { o(s.next(t)); } catch (e) { r(e); } }, c = (t) => { try { o(s.throw(t)); } catch (e) { r(e); } }, o = (t) => t.done ? n(t.value) : Promise.resolve(t.value).then(p, c); o((s = s.apply(i, a)).next()); }); import b from "./Base.js"; /*! * SlashedCloud v0.1.2 (https://github.com/SlashedCloud/player#readme) * Copyright 2024-2024 rogerio.jardim@fedrax.pt * Licensed under Apache (https://github.com/SlashedCloud/player/blob/develop/LICENSE) */ class T extends b { /** * Creates an instance of the PreviewThumbnailsFeature. * @param player The SlashedCloudPlayer instance. */ constructor(s, n) { super(s); l(this, "name", "ThumbnailsPlugin"); l(this, "options"); this.options = n; } /** * Sets up the preview thumbnails feature. */ setup() { return u(this, null, function* () { yield this.player.basePlayer.addThumbnailsTrack(this.options.src); }); } } export { T as default };