@gcorevideo/player 2.18.3 → 2.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/audio-selector/style.scss +156 -0
- package/assets/audio-selector/track-selector.ejs +12 -0
- package/assets/big-mute-button/big-mute-button.ejs +3 -0
- package/assets/big-mute-button/big-mute-button.scss +57 -0
- package/assets/bottom-gear/bottomgear.ejs +12 -0
- package/assets/bottom-gear/gear-sub-menu.scss +95 -0
- package/assets/bottom-gear/gear.scss +79 -0
- package/assets/clappr-nerd-stats/button.ejs +4 -0
- package/assets/clappr-nerd-stats/clappr-nerd-stats.ejs +212 -0
- package/assets/clappr-nerd-stats/clappr-nerd-stats.scss +488 -0
- package/assets/clappr-nerd-stats/options-list.ejs +9 -0
- package/assets/clappr-nerd-stats/settings.ejs +12 -0
- package/assets/clappr-nerd-stats/speedtest/speedtest.worker.js +775 -0
- package/assets/clips/clips.scss +3 -0
- package/assets/context-menu/context_menu.ejs +8 -0
- package/assets/context-menu/context_menu.scss +31 -0
- package/assets/dvr-controls/dvr_controls.scss +136 -0
- package/assets/dvr-controls/index.ejs +2 -0
- package/assets/error-screen/error_screen.ejs +13 -0
- package/assets/error-screen/error_screen.scss +40 -0
- package/assets/icons/new/arrow-left.svg +5 -0
- package/assets/icons/new/arrow-right.svg +5 -0
- package/assets/icons/new/check.svg +5 -0
- package/assets/icons/new/close.svg +12 -0
- package/assets/icons/new/full.svg +8 -0
- package/assets/icons/new/fullscreen-off.svg +14 -0
- package/assets/icons/new/fullscreen-on.svg +14 -0
- package/assets/icons/new/gear-hd.svg +16 -0
- package/assets/icons/new/gear.svg +12 -0
- package/assets/icons/new/hd.svg +8 -0
- package/assets/icons/new/pause.svg +5 -0
- package/assets/icons/new/pip.svg +5 -0
- package/assets/icons/new/play.svg +10 -0
- package/assets/icons/new/replayleft.svg +5 -0
- package/assets/icons/new/replayright.svg +5 -0
- package/assets/icons/new/speed.svg +5 -0
- package/assets/icons/new/stats.svg +3 -0
- package/assets/icons/new/stop.svg +3 -0
- package/assets/icons/new/subtitles-off.svg +5 -0
- package/assets/icons/new/subtitles-on.svg +6 -0
- package/assets/icons/new/volume-max.svg +5 -0
- package/assets/icons/new/volume-min.svg +5 -0
- package/assets/icons/new/volume-off.svg +5 -0
- package/assets/icons/old/cardboard.svg +4 -0
- package/assets/icons/old/close-share.svg +13 -0
- package/assets/icons/old/close.svg +13 -0
- package/assets/icons/old/fb.svg +13 -0
- package/assets/icons/old/fullscreen.svg +12 -0
- package/assets/icons/old/language.svg +1 -0
- package/assets/icons/old/pause.svg +12 -0
- package/assets/icons/old/play.svg +12 -0
- package/assets/icons/old/quality-arrow.svg +13 -0
- package/assets/icons/old/reload.svg +4 -0
- package/assets/icons/old/share.svg +13 -0
- package/assets/icons/old/sound-off.svg +15 -0
- package/assets/icons/old/sound-on.svg +15 -0
- package/assets/icons/old/streams.svg +3 -0
- package/assets/icons/old/twitter.svg +13 -0
- package/assets/icons/old/wn.svg +15 -0
- package/assets/icons/standard/01-play.svg +3 -0
- package/assets/icons/standard/02-pause.svg +3 -0
- package/assets/icons/standard/03-stop.svg +3 -0
- package/assets/icons/standard/04-volume.svg +3 -0
- package/assets/icons/standard/05-mute.svg +3 -0
- package/assets/icons/standard/06-expand.svg +3 -0
- package/assets/icons/standard/07-shrink.svg +3 -0
- package/assets/icons/standard/08-hd.svg +3 -0
- package/assets/icons/standard/09-cc.svg +8 -0
- package/assets/icons/standard/10-reload.svg +4 -0
- package/assets/level-selector/button.ejs +8 -0
- package/assets/level-selector/list.ejs +22 -0
- package/assets/level-selector/style.scss +4 -0
- package/assets/logo/styles/logo.scss +10 -0
- package/assets/logo/templates/logo.ejs +3 -0
- package/assets/media-control/closed-hand.cur +0 -0
- package/assets/media-control/container.scss +57 -0
- package/assets/media-control/media-control.ejs +133 -0
- package/assets/media-control/media-control.scss +390 -0
- package/assets/media-control/plugins.scss +94 -0
- package/assets/media-control/width270.scss +50 -0
- package/assets/media-control/width370.scss +263 -0
- package/assets/multi-camera/multicamera.ejs +29 -0
- package/assets/multi-camera/style.scss +176 -0
- package/assets/picture-in-picture/button.ejs +3 -0
- package/assets/picture-in-picture/button.scss +11 -0
- package/assets/playback-rate/button.ejs +6 -0
- package/assets/playback-rate/list.ejs +14 -0
- package/assets/playback-rate/playback-rate-selector.ejs +9 -0
- package/assets/poster/poster.ejs +1 -0
- package/assets/poster/poster.scss +32 -0
- package/assets/seek-time/seek-time.html +2 -0
- package/assets/seek-time/seek-time.scss +38 -0
- package/assets/share/share.ejs +37 -0
- package/assets/share/style.scss +104 -0
- package/assets/skip-time/skip-time.ejs +8 -0
- package/assets/skip-time/style.scss +24 -0
- package/assets/spinner-three-bounce/spinner.ejs +3 -0
- package/assets/spinner-three-bounce/spinner.scss +44 -0
- package/assets/style/main.scss +50 -0
- package/assets/style/theme.scss +42 -0
- package/assets/style/variables.scss +7 -0
- package/assets/subtitles/combobox copy.ejs +16 -0
- package/assets/subtitles/combobox.ejs +16 -0
- package/assets/subtitles/string.ejs +3 -0
- package/assets/subtitles/style.scss +99 -0
- package/assets/thumbnails/scrub-thumbnails.ejs +10 -0
- package/assets/thumbnails/style.scss +75 -0
- package/assets/vast-ads/style.scss +112 -0
- package/assets/video360/button.ejs +1 -0
- package/assets/video360/style.scss +8 -0
- package/build/vite-raw-plugin.js +18 -0
- package/dist/index.js +1 -1
- package/dist/plugins/index.css +2164 -0
- package/dist/{index-C02TmVOf.js → plugins/index.js/index.plugins.js} +29283 -29567
- package/lib/index.core.d.ts +15 -0
- package/lib/index.core.d.ts.map +1 -0
- package/lib/index.core.js +14 -0
- package/lib/index.d.ts +2 -14
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -14
- package/lib/index.plugins.d.ts +37 -0
- package/lib/index.plugins.d.ts.map +1 -0
- package/lib/index.plugins.js +39 -0
- package/lib/plugins/audio-selector/AudioSelector.d.ts +3 -3
- package/lib/plugins/audio-selector/AudioSelector.d.ts.map +1 -1
- package/lib/plugins/audio-selector/AudioSelector.js +6 -12
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts +2 -2
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts.map +1 -1
- package/lib/plugins/big-mute-button/BigMuteButton.js +7 -12
- package/lib/plugins/bottom-gear/BottomGear.d.ts +4 -3
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +11 -16
- package/lib/plugins/build.d.ts +2 -0
- package/lib/plugins/build.d.ts.map +1 -0
- package/lib/plugins/build.js +1 -0
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts +44 -0
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts.map +1 -0
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.js +294 -0
- package/lib/plugins/clappr-nerd-stats/formatter.d.ts +8 -0
- package/lib/plugins/clappr-nerd-stats/formatter.d.ts.map +1 -0
- package/lib/plugins/clappr-nerd-stats/formatter.js +91 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/Speedtest.d.ts +54 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/Speedtest.d.ts.map +1 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/Speedtest.js +335 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/index.d.ts +9 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/index.d.ts.map +1 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/index.js +154 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/types.d.ts +6 -0
- package/lib/plugins/clappr-nerd-stats/speedtest/types.d.ts.map +1 -0
- package/lib/plugins/clappr-nerd-stats/types.d.ts +4 -0
- package/lib/plugins/clappr-nerd-stats/types.d.ts.map +1 -0
- package/lib/plugins/clappr-stats/ClapprStats.d.ts +56 -0
- package/lib/plugins/clappr-stats/ClapprStats.d.ts.map +1 -0
- package/lib/plugins/clappr-stats/ClapprStats.js +332 -0
- package/lib/plugins/clappr-stats/types.d.ts +50 -0
- package/lib/plugins/clappr-stats/types.d.ts.map +1 -0
- package/lib/plugins/clappr-stats/types.js +5 -0
- package/lib/plugins/clappr-stats/utils.d.ts +3 -0
- package/lib/plugins/clappr-stats/utils.d.ts.map +1 -0
- package/lib/plugins/clappr-stats/utils.js +40 -0
- package/lib/plugins/click-to-pause/ClickToPause.d.ts +2 -2
- package/lib/plugins/click-to-pause/ClickToPause.d.ts.map +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.js +4 -6
- package/lib/plugins/clips/Clips.d.ts +23 -0
- package/lib/plugins/clips/Clips.d.ts.map +1 -0
- package/lib/plugins/clips/Clips.js +109 -0
- package/lib/plugins/context-menu/ContextMenu.d.ts +36 -0
- package/lib/plugins/context-menu/ContextMenu.d.ts.map +1 -0
- package/lib/plugins/context-menu/ContextMenu.js +102 -0
- package/lib/plugins/disable-controls/DisableControls.d.ts +1 -1
- package/lib/plugins/disable-controls/DisableControls.d.ts.map +1 -1
- package/lib/plugins/disable-controls/DisableControls.js +3 -5
- package/lib/plugins/dvr-controls/{DVRControls.d.ts → DvrControls.d.ts} +4 -4
- package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -0
- package/lib/plugins/dvr-controls/{DVRControls.js → DvrControls.js} +5 -4
- package/lib/plugins/error-screen/ErrorScreen.d.ts +44 -0
- package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -0
- package/lib/plugins/error-screen/ErrorScreen.js +179 -0
- package/lib/plugins/favicon/Favicon.d.ts +24 -0
- package/lib/plugins/favicon/Favicon.d.ts.map +1 -0
- package/lib/plugins/favicon/Favicon.js +106 -0
- package/lib/plugins/google-analytics/GoogleAnalytics.d.ts +30 -0
- package/lib/plugins/google-analytics/GoogleAnalytics.d.ts.map +1 -0
- package/lib/plugins/google-analytics/GoogleAnalytics.js +114 -0
- package/lib/plugins/index.d.ts +38 -0
- package/lib/plugins/index.d.ts.map +1 -0
- package/lib/plugins/index.js +40 -0
- package/lib/plugins/kibo/index.d.ts +23 -0
- package/lib/plugins/kibo/index.d.ts.map +1 -0
- package/lib/plugins/kibo/index.js +199 -0
- package/lib/plugins/level-selector/LevelSelector.d.ts +48 -17
- package/lib/plugins/level-selector/LevelSelector.d.ts.map +1 -1
- package/lib/plugins/level-selector/LevelSelector.js +169 -155
- package/lib/plugins/logo/Logo.d.ts +29 -0
- package/lib/plugins/logo/Logo.d.ts.map +1 -0
- package/lib/plugins/logo/Logo.js +181 -0
- package/lib/plugins/logo/utils/index.d.ts +22 -0
- package/lib/plugins/logo/utils/index.d.ts.map +1 -0
- package/lib/plugins/logo/utils/index.js +32 -0
- package/lib/plugins/media-control/MediaControl.d.ts +20 -25
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +136 -106
- package/lib/plugins/multi-camera/MultiCamera.d.ts +59 -0
- package/lib/plugins/multi-camera/MultiCamera.d.ts.map +1 -0
- package/lib/plugins/multi-camera/MultiCamera.js +353 -0
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts +20 -0
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts.map +1 -0
- package/lib/plugins/picture-in-picture/PictureInPicture.js +68 -0
- package/lib/plugins/playback-rate/PlaybackRate.d.ts +42 -0
- package/lib/plugins/playback-rate/PlaybackRate.d.ts.map +1 -0
- package/lib/plugins/playback-rate/PlaybackRate.js +205 -0
- package/lib/plugins/poster/Poster.d.ts +18 -17
- package/lib/plugins/poster/Poster.d.ts.map +1 -1
- package/lib/plugins/poster/Poster.js +83 -37
- package/lib/plugins/seek-time/SeekTime.d.ts +38 -0
- package/lib/plugins/seek-time/SeekTime.d.ts.map +1 -0
- package/lib/plugins/seek-time/SeekTime.js +153 -0
- package/lib/plugins/share/Share.d.ts +38 -0
- package/lib/plugins/share/Share.d.ts.map +1 -0
- package/lib/plugins/share/Share.js +122 -0
- package/lib/plugins/skip-time/SkipTime.d.ts +28 -0
- package/lib/plugins/skip-time/SkipTime.d.ts.map +1 -0
- package/lib/plugins/skip-time/SkipTime.js +86 -0
- package/lib/plugins/source-controller/SourceController.d.ts +41 -0
- package/lib/plugins/source-controller/SourceController.d.ts.map +1 -0
- package/lib/plugins/source-controller/SourceController.js +199 -0
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts +26 -0
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts.map +1 -0
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +117 -0
- package/lib/plugins/statistics/Statistics.d.ts +52 -0
- package/lib/plugins/statistics/Statistics.d.ts.map +1 -0
- package/lib/plugins/statistics/Statistics.js +130 -0
- package/lib/plugins/subtitles/Subtitles.d.ts +61 -0
- package/lib/plugins/subtitles/Subtitles.d.ts.map +1 -0
- package/lib/plugins/subtitles/Subtitles.js +354 -0
- package/lib/plugins/thumbnails/Thumbnails.d.ts +47 -0
- package/lib/plugins/thumbnails/Thumbnails.d.ts.map +1 -0
- package/lib/plugins/thumbnails/Thumbnails.js +414 -0
- package/lib/plugins/types.d.ts +8 -0
- package/lib/plugins/types.d.ts.map +1 -0
- package/lib/plugins/types.js +1 -0
- package/lib/plugins/utils.d.ts +5 -0
- package/lib/plugins/utils.d.ts.map +1 -0
- package/lib/plugins/utils.js +68 -0
- package/lib/plugins/vast-ads/VastAds.d.ts +72 -0
- package/lib/plugins/vast-ads/VastAds.d.ts.map +1 -0
- package/lib/plugins/vast-ads/VastAds.js +686 -0
- package/lib/plugins/vast-ads/loaderxml.d.ts +32 -0
- package/lib/plugins/vast-ads/loaderxml.d.ts.map +1 -0
- package/lib/plugins/vast-ads/loaderxml.js +226 -0
- package/lib/plugins/vast-ads/roll.d.ts +60 -0
- package/lib/plugins/vast-ads/roll.d.ts.map +1 -0
- package/lib/plugins/vast-ads/roll.js +415 -0
- package/lib/plugins/vast-ads/rollmanager.d.ts +62 -0
- package/lib/plugins/vast-ads/rollmanager.d.ts.map +1 -0
- package/lib/plugins/vast-ads/rollmanager.js +347 -0
- package/lib/plugins/vast-ads/sctemanager.d.ts +18 -0
- package/lib/plugins/vast-ads/sctemanager.d.ts.map +1 -0
- package/lib/plugins/vast-ads/sctemanager.js +116 -0
- package/lib/plugins/vast-ads/types.d.ts +12 -0
- package/lib/plugins/vast-ads/types.d.ts.map +1 -0
- package/lib/plugins/vast-ads/types.js +1 -0
- package/lib/plugins/vast-ads/urlhandler.d.ts +4 -0
- package/lib/plugins/vast-ads/urlhandler.d.ts.map +1 -0
- package/lib/plugins/vast-ads/urlhandler.js +30 -0
- package/lib/plugins/vast-ads/xmlhttprequest.d.ts +6 -0
- package/lib/plugins/vast-ads/xmlhttprequest.d.ts.map +1 -0
- package/lib/plugins/vast-ads/xmlhttprequest.js +39 -0
- package/lib/plugins/vast-ads/xmlmerge.d.ts +12 -0
- package/lib/plugins/vast-ads/xmlmerge.d.ts.map +1 -0
- package/lib/plugins/vast-ads/xmlmerge.js +82 -0
- package/lib/plugins/volume-fade/VolumeFade.d.ts +21 -0
- package/lib/plugins/volume-fade/VolumeFade.d.ts.map +1 -0
- package/lib/plugins/volume-fade/VolumeFade.js +90 -0
- package/package.json +10 -2
- package/rollup.config.js +32 -2
- package/src/index.core.ts +15 -0
- package/src/index.plugins.ts +41 -0
- package/src/index.ts +2 -15
- package/src/plugins/audio-selector/AudioSelector.ts +370 -0
- package/src/plugins/big-mute-button/BigMuteButton.ts +187 -0
- package/src/plugins/bottom-gear/BottomGear.ts +122 -0
- package/src/plugins/build.ts +1 -0
- package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +369 -0
- package/src/plugins/clappr-nerd-stats/formatter.ts +109 -0
- package/src/plugins/clappr-nerd-stats/speedtest/Speedtest.ts +414 -0
- package/src/plugins/clappr-nerd-stats/speedtest/index.ts +183 -0
- package/src/plugins/clappr-nerd-stats/speedtest/types.ts +5 -0
- package/src/plugins/clappr-nerd-stats/types.ts +3 -0
- package/src/plugins/clappr-stats/ClapprStats.ts +441 -0
- package/src/plugins/clappr-stats/types.ts +52 -0
- package/src/plugins/clappr-stats/utils.ts +42 -0
- package/src/plugins/click-to-pause/ClickToPause.ts +93 -0
- package/src/plugins/clips/Clips.ts +152 -0
- package/src/plugins/context-menu/ContextMenu.ts +134 -0
- package/src/plugins/disable-controls/DisableControls.ts +81 -0
- package/src/plugins/dvr-controls/DvrControls.ts +131 -0
- package/src/plugins/error-screen/ErrorScreen.ts +241 -0
- package/src/plugins/favicon/Favicon.ts +137 -0
- package/src/plugins/ga-events/GaEvents.js +395 -0
- package/src/plugins/ga-events/ga-tracking.js +46 -0
- package/src/plugins/google-analytics/GoogleAnalytics.ts +147 -0
- package/src/plugins/index.ts +42 -0
- package/src/plugins/kibo/index.ts +244 -0
- package/src/plugins/level-selector/LevelSelector.ts +400 -0
- package/src/plugins/level-selector/__tests__/LevelSelector.test.ts +72 -0
- package/src/plugins/level-selector/__tests__/__snapshots__/LevelSelector.test.ts.snap +11 -0
- package/src/plugins/logo/Logo.ts +233 -0
- package/src/plugins/logo/utils/index.ts +46 -0
- package/src/plugins/media-control/MediaControl.ts +1383 -0
- package/src/plugins/multi-camera/MultiCamera copy.xts +414 -0
- package/src/plugins/multi-camera/MultiCamera.ts +426 -0
- package/src/plugins/picture-in-picture/PictureInPicture.ts +87 -0
- package/src/plugins/playback-rate/PlaybackRate.ts +269 -0
- package/src/plugins/poster/Poster.ts +298 -0
- package/src/plugins/seek-time/SeekTime.ts +191 -0
- package/src/plugins/share/Share.ts +148 -0
- package/src/plugins/skip-time/SkipTime.ts +109 -0
- package/src/plugins/source-controller/SourceController.ts +239 -0
- package/src/plugins/source-controller/__tests__/SourceController.test.ts +230 -0
- package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +135 -0
- package/src/plugins/statistics/Statistics copy.xts +296 -0
- package/src/plugins/statistics/Statistics.ts +207 -0
- package/src/plugins/subtitles/Subtitles.ts +505 -0
- package/src/plugins/thumbnails/Thumbnails.ts +530 -0
- package/src/plugins/types.ts +7 -0
- package/src/plugins/typings/globals.d.ts +10 -0
- package/src/plugins/typings/parse-srt.d.ts +14 -0
- package/src/plugins/typings/workers.d.ts +3 -0
- package/src/plugins/utils.ts +77 -0
- package/src/plugins/vast-ads/VastAds.ts +915 -0
- package/src/plugins/vast-ads/loaderxml.ts +260 -0
- package/src/plugins/vast-ads/roll.ts +492 -0
- package/src/plugins/vast-ads/rollmanager.ts +403 -0
- package/src/plugins/vast-ads/sctemanager.ts +134 -0
- package/src/plugins/vast-ads/types.ts +14 -0
- package/src/plugins/vast-ads/urlhandler.ts +37 -0
- package/src/plugins/vast-ads/xmlhttprequest.ts +44 -0
- package/src/plugins/vast-ads/xmlmerge.ts +96 -0
- package/src/plugins/video360/VRControls.js +104 -0
- package/src/plugins/video360/VREffect.js +422 -0
- package/src/plugins/video360/Video360.js +979 -0
- package/src/plugins/video360/orbit-oriention-controls.js +1002 -0
- package/src/plugins/video360/utils.js +49 -0
- package/src/plugins/volume-fade/VolumeFade.ts +109 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/HlsPlayback-D9EmONbV.js +0 -747
- package/dist/player.d.ts +0 -646
- package/lib/backend.d.ts +0 -3
- package/lib/backend.d.ts.map +0 -1
- package/lib/backend.js +0 -10
- package/lib/constants.d.ts +0 -1
- package/lib/constants.d.ts.map +0 -1
- package/lib/constants.js +0 -1
- package/lib/gcore.types.d.ts +0 -84
- package/lib/gcore.types.d.ts.map +0 -1
- package/lib/gcore.types.js +0 -9
- package/lib/plugins/dash-playback/DashPlayback.d.ts +0 -73
- package/lib/plugins/dash-playback/DashPlayback.d.ts.map +0 -1
- package/lib/plugins/dash-playback/DashPlayback.js +0 -455
- package/lib/plugins/dash-playback/types.d.ts +0 -6
- package/lib/plugins/dash-playback/types.d.ts.map +0 -1
- package/lib/plugins/dash-plugin/DashPlayback.d.ts +0 -86
- package/lib/plugins/dash-plugin/DashPlayback.d.ts.map +0 -1
- package/lib/plugins/dash-plugin/DashPlayback.js +0 -659
- package/lib/plugins/dvr-controls/DVRControls.d.ts.map +0 -1
- package/lib/plugins/hls-playback/HlsPlayback.d.ts +0 -102
- package/lib/plugins/hls-playback/HlsPlayback.d.ts.map +0 -1
- package/lib/plugins/hls-playback/HlsPlayback.js +0 -815
- package/lib/trace/LogTracer.d.ts +0 -12
- package/lib/trace/LogTracer.d.ts.map +0 -1
- package/lib/trace/LogTracer.js +0 -17
- package/lib/trace/SentryTracer.d.ts +0 -12
- package/lib/trace/SentryTracer.d.ts.map +0 -1
- package/lib/trace/SentryTracer.js +0 -23
- package/lib/trace/Tracer.d.ts +0 -13
- package/lib/trace/Tracer.d.ts.map +0 -1
- package/lib/trace/Tracer.js +0 -15
- package/lib/trace/index.d.ts +0 -18
- package/lib/trace/index.d.ts.map +0 -1
- package/lib/trace/index.js +0 -27
- package/lib/trace/types.d.ts +0 -8
- package/lib/trace/types.d.ts.map +0 -1
- package/lib/tsdoc-metadata.json +0 -11
- package/lib/utils/Logger.d.ts +0 -23
- package/lib/utils/Logger.d.ts.map +0 -1
- package/lib/utils/Logger.js +0 -81
- package/lib/utils/canAutoplay.d.ts +0 -6
- package/lib/utils/canAutoplay.d.ts.map +0 -1
- package/lib/utils/canAutoplay.js +0 -30
- package/lib/utils/queryParams.d.ts +0 -2
- package/lib/utils/queryParams.d.ts.map +0 -1
- package/lib/utils/queryParams.js +0 -4
- package/lib/utils/scripts-load.d.ts +0 -2
- package/lib/utils/scripts-load.d.ts.map +0 -1
- package/lib/utils/scripts-load.js +0 -20
- package/lib/utils/testUtils.d.ts +0 -3
- package/lib/utils/testUtils.d.ts.map +0 -1
- package/lib/utils/testUtils.js +0 -12
- package/lib/utils/utils.d.ts +0 -3
- package/lib/utils/utils.d.ts.map +0 -1
- package/lib/utils/utils.js +0 -31
- /package/lib/plugins/{dash-playback → clappr-nerd-stats/speedtest}/types.js +0 -0
- /package/lib/{trace → plugins/clappr-nerd-stats}/types.js +0 -0
package/lib/trace/LogTracer.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Tracer } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* A tracer that logs to the console
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
export declare class LogTracer implements Tracer {
|
|
7
|
-
private logger;
|
|
8
|
-
constructor(ns?: string);
|
|
9
|
-
reportError(e: Error): void;
|
|
10
|
-
trace(msg: string, data?: Record<string, unknown>): void;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=LogTracer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LogTracer.d.ts","sourceRoot":"","sources":["../../src/trace/LogTracer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIzC;;;GAGG;AACH,qBAAa,SAAU,YAAW,MAAM;IACtC,OAAO,CAAC,MAAM,CAAS;gBAEX,EAAE,SAAK;IAInB,WAAW,CAAC,CAAC,EAAE,KAAK;IAIpB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAGlD"}
|
package/lib/trace/LogTracer.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Logger } from "../utils/Logger.js";
|
|
2
|
-
/**
|
|
3
|
-
* A tracer that logs to the console
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
export class LogTracer {
|
|
7
|
-
logger;
|
|
8
|
-
constructor(ns = "") {
|
|
9
|
-
this.logger = new Logger(ns);
|
|
10
|
-
}
|
|
11
|
-
reportError(e) {
|
|
12
|
-
this.logger.error(e);
|
|
13
|
-
}
|
|
14
|
-
trace(msg, data) {
|
|
15
|
-
this.logger.debug(msg, data);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Client, Scope } from "@sentry/core";
|
|
2
|
-
/**
|
|
3
|
-
* @beta
|
|
4
|
-
*/
|
|
5
|
-
export declare class SentryTracer {
|
|
6
|
-
private client;
|
|
7
|
-
private scope;
|
|
8
|
-
constructor(client: Client, scope: Scope);
|
|
9
|
-
reportError(e: Error): void;
|
|
10
|
-
trace(message: string, data?: Record<string, unknown>): void;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=SentryTracer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SentryTracer.d.ts","sourceRoot":"","sources":["../../src/trace/SentryTracer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE7C;;GAEG;AACH,qBAAa,YAAY;IACX,OAAO,CAAC,MAAM;IAAU,OAAO,CAAC,KAAK;gBAA7B,MAAM,EAAE,MAAM,EAAU,KAAK,EAAE,KAAK;IAExD,WAAW,CAAC,CAAC,EAAE,KAAK;IAIpB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAQtD"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @beta
|
|
3
|
-
*/
|
|
4
|
-
export class SentryTracer {
|
|
5
|
-
client;
|
|
6
|
-
scope;
|
|
7
|
-
constructor(client, scope) {
|
|
8
|
-
this.client = client;
|
|
9
|
-
this.scope = scope;
|
|
10
|
-
}
|
|
11
|
-
reportError(e) {
|
|
12
|
-
this.client.captureException(e);
|
|
13
|
-
}
|
|
14
|
-
trace(message, data) {
|
|
15
|
-
this.scope.addBreadcrumb({
|
|
16
|
-
type: "default",
|
|
17
|
-
level: "info",
|
|
18
|
-
message,
|
|
19
|
-
data,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
;
|
package/lib/trace/Tracer.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
type TagValue = string | boolean | number | null | undefined;
|
|
2
|
-
export interface Tracer {
|
|
3
|
-
reportError(e: unknown): void;
|
|
4
|
-
trace(msg: string, data: Record<string, unknown>): void;
|
|
5
|
-
}
|
|
6
|
-
export declare class LogTracer implements Tracer {
|
|
7
|
-
private tags;
|
|
8
|
-
reportError(e: Error): void;
|
|
9
|
-
setTag(name: string, value: TagValue): void;
|
|
10
|
-
trace(msg: string, data?: Record<string, unknown>): void;
|
|
11
|
-
}
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=Tracer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tracer.d.ts","sourceRoot":"","sources":["../../src/trace/Tracer.ts"],"names":[],"mappings":"AAIA,KAAK,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAE7D,MAAM,WAAW,MAAM;IACrB,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACzD;AAED,qBAAa,SAAU,YAAW,MAAM;IACtC,OAAO,CAAC,IAAI,CAAgC;IAE5C,WAAW,CAAC,CAAC,EAAE,KAAK;IAIpB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ;IAIpC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAIlD"}
|
package/lib/trace/Tracer.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Logger } from "../utils/Logger.js";
|
|
2
|
-
const logger = new Logger("_");
|
|
3
|
-
export class LogTracer {
|
|
4
|
-
tags = {};
|
|
5
|
-
reportError(e) {
|
|
6
|
-
logger.error(e, this.tags);
|
|
7
|
-
}
|
|
8
|
-
setTag(name, value) {
|
|
9
|
-
this.tags[name] = value;
|
|
10
|
-
}
|
|
11
|
-
trace(msg, data) {
|
|
12
|
-
const fullData = Object.assign({}, this.tags, data);
|
|
13
|
-
logger.debug(msg, fullData);
|
|
14
|
-
}
|
|
15
|
-
}
|
package/lib/trace/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Tracer } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* @public
|
|
4
|
-
* Sets a tracer implementation, e.g., LogTracer or SentryTracer
|
|
5
|
-
*/
|
|
6
|
-
export declare function setTracer(t: Tracer): void;
|
|
7
|
-
/**
|
|
8
|
-
* @public
|
|
9
|
-
* @param e
|
|
10
|
-
*/
|
|
11
|
-
export declare function reportError(e: unknown): void;
|
|
12
|
-
/**
|
|
13
|
-
* @public
|
|
14
|
-
* @param msg
|
|
15
|
-
* @param data
|
|
16
|
-
*/
|
|
17
|
-
export declare function trace(msg: string, data?: Record<string, unknown>): void;
|
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/trace/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/trace/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAOzC;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,QAGlC;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,QAErC;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,QAEpE"}
|
package/lib/trace/index.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const tracer = {
|
|
2
|
-
trace: () => { },
|
|
3
|
-
reportError: () => { },
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* @public
|
|
7
|
-
* Sets a tracer implementation, e.g., LogTracer or SentryTracer
|
|
8
|
-
*/
|
|
9
|
-
export function setTracer(t) {
|
|
10
|
-
tracer.trace = t.trace.bind(t);
|
|
11
|
-
tracer.reportError = t.reportError.bind(t);
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @public
|
|
15
|
-
* @param e
|
|
16
|
-
*/
|
|
17
|
-
export function reportError(e) {
|
|
18
|
-
tracer.reportError(e);
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* @public
|
|
22
|
-
* @param msg
|
|
23
|
-
* @param data
|
|
24
|
-
*/
|
|
25
|
-
export function trace(msg, data = {}) {
|
|
26
|
-
tracer.trace(msg, data);
|
|
27
|
-
}
|
package/lib/trace/types.d.ts
DELETED
package/lib/trace/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/trace/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACzD"}
|
package/lib/tsdoc-metadata.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.49.2"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
package/lib/utils/Logger.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @beta
|
|
3
|
-
*/
|
|
4
|
-
export type WriteFn = (...args: any[]) => void;
|
|
5
|
-
/**
|
|
6
|
-
* Logging utility with [debug](https://www.npmjs.com/package/debug)-like API
|
|
7
|
-
* @beta
|
|
8
|
-
*/
|
|
9
|
-
export declare class Logger {
|
|
10
|
-
readonly info: WriteFn;
|
|
11
|
-
readonly warn: WriteFn;
|
|
12
|
-
readonly error: WriteFn;
|
|
13
|
-
readonly debug: WriteFn;
|
|
14
|
-
private static items;
|
|
15
|
-
constructor(namespace: string, appName?: string);
|
|
16
|
-
/**
|
|
17
|
-
* @param patterns - comma-separated list of patterns, can contain '*' as a wildcard
|
|
18
|
-
*/
|
|
19
|
-
static enable(patterns: string): void;
|
|
20
|
-
static disable(): void;
|
|
21
|
-
private static toggleItems;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=Logger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/utils/Logger.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AA2C/C;;;GAGG;AACH,qBAAa,MAAM;IACjB,SAAgB,IAAI,EAAE,OAAO,CAAC;IAC9B,SAAgB,IAAI,EAAE,OAAO,CAAC;IAC9B,SAAgB,KAAK,EAAE,OAAO,CAAC;IAC/B,SAAgB,KAAK,EAAE,OAAO,CAAC;IAE/B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAyB;gBAEjC,SAAS,EAAE,MAAM,EAAE,OAAO,SAAW;IAqBjD;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM;IAS9B,MAAM,CAAC,OAAO;IAId,OAAO,CAAC,MAAM,CAAC,WAAW;CAS3B"}
|
package/lib/utils/Logger.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
const APP_NAME = "gplayer";
|
|
2
|
-
class DebuggerWrapper {
|
|
3
|
-
writer;
|
|
4
|
-
namespace;
|
|
5
|
-
currentWriter;
|
|
6
|
-
constructor(writer, namespace, enabled = true) {
|
|
7
|
-
this.writer = writer;
|
|
8
|
-
this.namespace = namespace;
|
|
9
|
-
this.currentWriter = enabled ? writer : nullWriter;
|
|
10
|
-
}
|
|
11
|
-
enable() {
|
|
12
|
-
this.currentWriter = this.writer;
|
|
13
|
-
}
|
|
14
|
-
disable() {
|
|
15
|
-
this.currentWriter = nullWriter;
|
|
16
|
-
}
|
|
17
|
-
write = (m, ...args) => {
|
|
18
|
-
const tokens = args.map((_) => "%s");
|
|
19
|
-
if (typeof m === "string" || args.length > 0) {
|
|
20
|
-
tokens.unshift("%s");
|
|
21
|
-
}
|
|
22
|
-
this.currentWriter(`${this.namespace}: ${tokens.join(' ')}`, m, ...args.map(a => JSON.stringify(a)));
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
const currentPatterns = [];
|
|
26
|
-
function parsePattern(pattern) {
|
|
27
|
-
if (pattern === "*") {
|
|
28
|
-
return /.?/;
|
|
29
|
-
}
|
|
30
|
-
return new RegExp("^" + pattern.replace(/\*/g, "[@\\w-]+"), "i");
|
|
31
|
-
}
|
|
32
|
-
function pass(namespace) {
|
|
33
|
-
return currentPatterns.some((p) => p.test(namespace));
|
|
34
|
-
}
|
|
35
|
-
function nullWriter() { }
|
|
36
|
-
/**
|
|
37
|
-
* Logging utility with [debug](https://www.npmjs.com/package/debug)-like API
|
|
38
|
-
* @beta
|
|
39
|
-
*/
|
|
40
|
-
export class Logger {
|
|
41
|
-
info;
|
|
42
|
-
warn;
|
|
43
|
-
error;
|
|
44
|
-
debug;
|
|
45
|
-
static items = [];
|
|
46
|
-
constructor(namespace, appName = APP_NAME) {
|
|
47
|
-
const ns = namespace ? `:${namespace}` : "";
|
|
48
|
-
const info = new DebuggerWrapper(console.info.bind(console), `${appName}:INFO${ns}`, pass(namespace));
|
|
49
|
-
this.info = info.write;
|
|
50
|
-
const warn = new DebuggerWrapper(console.warn.bind(console), `${appName}:WARN${ns}`, pass(namespace));
|
|
51
|
-
this.warn = warn.write;
|
|
52
|
-
const error = new DebuggerWrapper(console.error.bind(console), `${appName}:ERROR${ns}`, pass(namespace));
|
|
53
|
-
this.error = error.write;
|
|
54
|
-
const debug = new DebuggerWrapper(console.debug.bind(console), `${appName}:DEBUG${ns}`, pass(namespace));
|
|
55
|
-
this.debug = debug.write;
|
|
56
|
-
Logger.items.push(warn);
|
|
57
|
-
Logger.items.push(info);
|
|
58
|
-
Logger.items.push(error);
|
|
59
|
-
Logger.items.push(debug);
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* @param patterns - comma-separated list of patterns, can contain '*' as a wildcard
|
|
63
|
-
*/
|
|
64
|
-
static enable(patterns) {
|
|
65
|
-
currentPatterns.splice(0, currentPatterns.length, ...patterns.split(",").filter(Boolean).map(parsePattern));
|
|
66
|
-
Logger.toggleItems();
|
|
67
|
-
}
|
|
68
|
-
static disable() {
|
|
69
|
-
currentPatterns.splice(0, currentPatterns.length);
|
|
70
|
-
}
|
|
71
|
-
static toggleItems() {
|
|
72
|
-
for (const w of Logger.items) {
|
|
73
|
-
if (pass(w.namespace)) {
|
|
74
|
-
w.enable();
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
w.disable();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"canAutoplay.d.ts","sourceRoot":"","sources":["../../src/utils/canAutoplay.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAA;AAED,4BAAkC,OAAO,CAAC,iBAAiB,CAAC,CA4B3D"}
|
package/lib/utils/canAutoplay.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Browser } from '@clappr/core';
|
|
2
|
-
import canAutoPlay from 'can-autoplay';
|
|
3
|
-
import { reportError, trace } from "../trace/index.js";
|
|
4
|
-
export default async function () {
|
|
5
|
-
let autoPlay = false;
|
|
6
|
-
let muted = false;
|
|
7
|
-
trace("canAutoplay enter");
|
|
8
|
-
try {
|
|
9
|
-
const autoplay = await canAutoPlay.video();
|
|
10
|
-
if (autoplay.result) {
|
|
11
|
-
autoPlay = true;
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
const checkObj = Browser.isiOS ? { muted: true, inline: true } : { muted: true };
|
|
15
|
-
const mute = await canAutoPlay.video(checkObj);
|
|
16
|
-
if (!mute.result) {
|
|
17
|
-
autoPlay = false;
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
muted = true;
|
|
21
|
-
autoPlay = true;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
catch (e) {
|
|
26
|
-
reportError(e);
|
|
27
|
-
}
|
|
28
|
-
trace("canAutoplay leave", { autoPlay, muted });
|
|
29
|
-
return { autoPlay, muted };
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queryParams.d.ts","sourceRoot":"","sources":["../../src/utils/queryParams.ts"],"names":[],"mappings":""}
|
package/lib/utils/queryParams.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scripts-load.d.ts","sourceRoot":"","sources":["../../src/utils/scripts-load.ts"],"names":[],"mappings":"AACA,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBnE"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export function request(url, timeout) {
|
|
2
|
-
return new Promise((resolve) => {
|
|
3
|
-
const win = window, doc = document, el = 'script';
|
|
4
|
-
let timer;
|
|
5
|
-
const onLoad = () => {
|
|
6
|
-
win.clearTimeout(timer);
|
|
7
|
-
resolve();
|
|
8
|
-
};
|
|
9
|
-
const first = doc.getElementsByTagName(el)[0];
|
|
10
|
-
const script = doc.createElement(el);
|
|
11
|
-
script.src = url;
|
|
12
|
-
script.async = true;
|
|
13
|
-
script.onload = onLoad;
|
|
14
|
-
script.onerror = onLoad; // TODO reject?
|
|
15
|
-
first?.parentNode?.insertBefore(script, first);
|
|
16
|
-
if (timeout) {
|
|
17
|
-
timer = win.setTimeout(onLoad, timeout);
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
package/lib/utils/testUtils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testUtils.d.ts","sourceRoot":"","sources":["../../src/utils/testUtils.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,WAK7D;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,WAO5D"}
|
package/lib/utils/testUtils.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export function isDashSource(source, mimeType) {
|
|
2
|
-
if (mimeType) {
|
|
3
|
-
return mimeType === 'application/dash+xml';
|
|
4
|
-
}
|
|
5
|
-
return source.endsWith('.mpd');
|
|
6
|
-
}
|
|
7
|
-
export function isHlsSource(source, mimeType) {
|
|
8
|
-
if (mimeType) {
|
|
9
|
-
return ['application/vnd.apple.mpegurl', 'application/x-mpegURL'].includes(mimeType);
|
|
10
|
-
}
|
|
11
|
-
return source.endsWith('.m3u8');
|
|
12
|
-
}
|
package/lib/utils/utils.d.ts
DELETED
package/lib/utils/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,qBAMvC;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAyBxD"}
|
package/lib/utils/utils.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export function getLocation(href) {
|
|
2
|
-
const l = document.createElement('a');
|
|
3
|
-
l.href = href;
|
|
4
|
-
return l;
|
|
5
|
-
}
|
|
6
|
-
export function strtimeToMiliseconds(str) {
|
|
7
|
-
if (!str) {
|
|
8
|
-
return 0;
|
|
9
|
-
}
|
|
10
|
-
const arr = str.split(/:/);
|
|
11
|
-
let h = 0, m = 0, s = 0;
|
|
12
|
-
if (arr.length >= 3) {
|
|
13
|
-
h = parseInt(arr[arr.length - 3]) * 60 * 60;
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
h = 0;
|
|
17
|
-
}
|
|
18
|
-
if (arr.length >= 2) {
|
|
19
|
-
m = parseInt(arr[arr.length - 2]) * 60;
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
m = 0;
|
|
23
|
-
}
|
|
24
|
-
if (arr.length >= 1) {
|
|
25
|
-
s = parseInt(arr[arr.length - 1]);
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
s = 0;
|
|
29
|
-
}
|
|
30
|
-
return (h + m + s);
|
|
31
|
-
}
|
|
File without changes
|
|
File without changes
|