diff --git a/package.json b/package.json index f848684..2685d1d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.0.8", + "version": "0.0.9", "name": "@stroeer/stroeer-videoplayer-livestream-ui", "description": "Ströer Videoplayer Livestream UI", "main": "dist/StroeerVideoplayer-livestream-ui.cjs.js", diff --git a/src/UI.ts b/src/UI.ts index b063c74..76e56a1 100644 --- a/src/UI.ts +++ b/src/UI.ts @@ -232,24 +232,30 @@ class UI { const showLoading = (modus: boolean): void => { if (modus) { + hideElement(overlayContainer) showElement(loadingSpinnerContainer) } else { hideElement(loadingSpinnerContainer) } } - StroeerVideoplayer.loading = (modus: boolean): void => { - showLoading(modus) - } - - StroeerVideoplayer.showBigPlayButton = (modus: boolean): void => { + const showBigPlayButton = (modus: boolean): void => { if (modus) { + hideElement(loadingSpinnerContainer) showElement(overlayContainer) } else { hideElement(overlayContainer) } } + StroeerVideoplayer.loading = (modus: boolean): void => { + showLoading(modus) + } + + StroeerVideoplayer.showBigPlayButton = (modus: boolean): void => { + showBigPlayButton(modus) + } + videoEl.addEventListener('waiting', () => { showLoading(true) })