@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/dist/player.d.ts
DELETED
|
@@ -1,646 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Video player for the Gcore streaming platform
|
|
3
|
-
*
|
|
4
|
-
* @remarks
|
|
5
|
-
* This package provides a video player for the Gcore streaming platform.
|
|
6
|
-
* It is built on top of the Clappr library and provides a framework for building custom integrations.
|
|
7
|
-
*
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { Logger } from '@gcorevideo/utils';
|
|
12
|
-
import { LogTracer } from '@gcorevideo/utils';
|
|
13
|
-
import { reportError as reportError_2 } from '@gcorevideo/utils';
|
|
14
|
-
import { SentryTracer } from '@gcorevideo/utils';
|
|
15
|
-
import { setTracer } from '@gcorevideo/utils';
|
|
16
|
-
import { trace } from '@gcorevideo/utils';
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Dimensions of the player container DOM element.
|
|
20
|
-
* @beta
|
|
21
|
-
*/
|
|
22
|
-
export declare type ContainerSize = {
|
|
23
|
-
width: number;
|
|
24
|
-
height: number;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* A plain JS object that must conform to the DASH.js settings schema.
|
|
29
|
-
* @beta
|
|
30
|
-
* {@link https://cdn.dashjs.org/latest/jsdoc/module-Settings.html | DASH.js settings}
|
|
31
|
-
*/
|
|
32
|
-
export declare type DashSettings = Record<string, unknown>;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Levels of severity of errors. Non-fatal errors usually can be ignored.
|
|
36
|
-
* @beta
|
|
37
|
-
*/
|
|
38
|
-
export declare type ErrorLevel = 'FATAL' | 'WARN' | 'INFO';
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* An ISO 639-1 language code.
|
|
42
|
-
* @example `pt`
|
|
43
|
-
* @beta
|
|
44
|
-
*/
|
|
45
|
-
export declare type LangTag = string;
|
|
46
|
-
|
|
47
|
-
export { Logger }
|
|
48
|
-
|
|
49
|
-
export { LogTracer }
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Media delivery protocol
|
|
53
|
-
* @beta
|
|
54
|
-
*/
|
|
55
|
-
export declare type MediaTransport = 'dash' | 'hls';
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* An error occurred during the playback.
|
|
59
|
-
* @beta
|
|
60
|
-
*/
|
|
61
|
-
export declare interface PlaybackError {
|
|
62
|
-
/**
|
|
63
|
-
* Error code.
|
|
64
|
-
*/
|
|
65
|
-
code: PlaybackErrorCode;
|
|
66
|
-
/**
|
|
67
|
-
* Detailed description of the error.
|
|
68
|
-
*/
|
|
69
|
-
description: string;
|
|
70
|
-
/**
|
|
71
|
-
* Level of severity of the error.
|
|
72
|
-
*/
|
|
73
|
-
level: ErrorLevel;
|
|
74
|
-
/**
|
|
75
|
-
* Error message. Non-fatal usually can be ignored.
|
|
76
|
-
*/
|
|
77
|
-
message: string;
|
|
78
|
-
/**
|
|
79
|
-
* Exact component that originated the error.
|
|
80
|
-
* @example
|
|
81
|
-
* - 'core'
|
|
82
|
-
* - 'dash'
|
|
83
|
-
* - 'media_control'
|
|
84
|
-
*/
|
|
85
|
-
origin: string;
|
|
86
|
-
/**
|
|
87
|
-
* Component subsystem of the error origin
|
|
88
|
-
*/
|
|
89
|
-
scope: PlayerComponentType;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Codes of errors occurring within the playback component.
|
|
94
|
-
* @beta
|
|
95
|
-
*/
|
|
96
|
-
export declare enum PlaybackErrorCode {
|
|
97
|
-
/**
|
|
98
|
-
* An unknown or uncategorised error.
|
|
99
|
-
*/
|
|
100
|
-
Generic = 0,
|
|
101
|
-
/**
|
|
102
|
-
* The media source is not available. Typically a network error.
|
|
103
|
-
*/
|
|
104
|
-
MediaSourceUnavailable = 1,
|
|
105
|
-
/**
|
|
106
|
-
* The media source is not accessible due to some protection policy.
|
|
107
|
-
*/
|
|
108
|
-
MediaSourceAccessDenied = 3
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Module to perform the playback.
|
|
113
|
-
* @beta
|
|
114
|
-
*/
|
|
115
|
-
export declare type PlaybackModule = 'dash' | 'hls' | 'html5_video';
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Type of a stream playback
|
|
119
|
-
* @beta
|
|
120
|
-
*/
|
|
121
|
-
export declare type PlaybackType = 'live' | 'vod';
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* The main component to use in the application code.
|
|
125
|
-
* @beta
|
|
126
|
-
* @remarks
|
|
127
|
-
* The Player object provides very basic API to control playback.
|
|
128
|
-
* To build a sophisticated UI, use the plugins framework to tap into the Clappr core.
|
|
129
|
-
* {@link https://github.com/clappr/clappr/wiki/Architecture}
|
|
130
|
-
*/
|
|
131
|
-
export declare class Player {
|
|
132
|
-
private config;
|
|
133
|
-
private emitter;
|
|
134
|
-
private player;
|
|
135
|
-
private ready;
|
|
136
|
-
private rootNode;
|
|
137
|
-
private tuneInTimerId;
|
|
138
|
-
private tunedIn;
|
|
139
|
-
constructor(config: PlayerConfig);
|
|
140
|
-
/**
|
|
141
|
-
* Adds a listener to a player event
|
|
142
|
-
* @param event - event type, see {@link PlayerEvent}
|
|
143
|
-
* @param handler - a callback function to handle the event
|
|
144
|
-
*/
|
|
145
|
-
on<E extends PlayerEvent>(event: E, handler: PlayerEventHandler<E>): void;
|
|
146
|
-
/**
|
|
147
|
-
* Removes a previously added event listener
|
|
148
|
-
* @param event - See {@link PlayerEvent}
|
|
149
|
-
* @param handler - a callback attached earlier to that event type
|
|
150
|
-
*/
|
|
151
|
-
off<E extends PlayerEvent>(event: E, handler: PlayerEventHandler<E>): void;
|
|
152
|
-
/**
|
|
153
|
-
* Configures the player.
|
|
154
|
-
*
|
|
155
|
-
* @param config - complete or partial configuration
|
|
156
|
-
* @remarks
|
|
157
|
-
* Can be called multiple times.
|
|
158
|
-
* Each consequent call extends the previous configuration with only the new keys overridden.
|
|
159
|
-
*
|
|
160
|
-
* After a reconfiguration, if something significant has changed, it might make sense reinitialize the player (i.e, a `.destroy()` followed by an `.init()` call).
|
|
161
|
-
*/
|
|
162
|
-
configure(config: Partial<PlayerConfig>): void;
|
|
163
|
-
/**
|
|
164
|
-
* Initializes the player at the given container element.
|
|
165
|
-
* @param playerElement - DOM element to host the player
|
|
166
|
-
* @remarks
|
|
167
|
-
* The player will be initialized and attached to the given element.
|
|
168
|
-
*
|
|
169
|
-
* All the core plugins will be initialized at this point.
|
|
170
|
-
*
|
|
171
|
-
* If no sources were configured, it will trigger an error.
|
|
172
|
-
*
|
|
173
|
-
* The player container will be initialized and then all the registered UI plugins.
|
|
174
|
-
*
|
|
175
|
-
* If the `autoPlay` option is set, then it will trigger playback immediately.
|
|
176
|
-
*
|
|
177
|
-
* It is an error to call this method twice. If you need to attache player to another DOM element,
|
|
178
|
-
* first call {@link Player.destroy} and then {@link Player.attachTo}.
|
|
179
|
-
*
|
|
180
|
-
* @example
|
|
181
|
-
* ```ts
|
|
182
|
-
* const player = new Player({
|
|
183
|
-
* sources: [{ source: 'https://example.com/a.mpd', mimeType: 'application/dash+xml' }],
|
|
184
|
-
* })
|
|
185
|
-
* document.addEventListener('DOMContentLoaded', () => {
|
|
186
|
-
* player.attachTo(document.getElementById('video-container'))
|
|
187
|
-
* })
|
|
188
|
-
* ```
|
|
189
|
-
*/
|
|
190
|
-
attachTo(playerElement: HTMLElement): void;
|
|
191
|
-
/**
|
|
192
|
-
* Destroys the player, releasing all resources and unmounting its UI from the DOM.
|
|
193
|
-
*/
|
|
194
|
-
destroy(): void;
|
|
195
|
-
/**
|
|
196
|
-
* Current playback (time since the beginning of the stream), if appropriate.
|
|
197
|
-
*
|
|
198
|
-
* @returns Time in seconds
|
|
199
|
-
* @remarks
|
|
200
|
-
* For live streams, it returns the current time within the current segment.
|
|
201
|
-
*/
|
|
202
|
-
getCurrentTime(): number;
|
|
203
|
-
/**
|
|
204
|
-
* Duration of the current media in seconds, if appropriate.
|
|
205
|
-
*
|
|
206
|
-
* @returns Time in seconds
|
|
207
|
-
* @remarks
|
|
208
|
-
* For live streams, it returns the duration of the current segment.
|
|
209
|
-
*/
|
|
210
|
-
getDuration(): number;
|
|
211
|
-
/**
|
|
212
|
-
* Indicates whether DVR is enabled.
|
|
213
|
-
*/
|
|
214
|
-
isDvrEnabled(): boolean;
|
|
215
|
-
/**
|
|
216
|
-
* Indicates whether DVR is in use.
|
|
217
|
-
* @remarks
|
|
218
|
-
* DVR mode, if it is enabled, is triggered we a user seeks behind the live edge.
|
|
219
|
-
*/
|
|
220
|
-
isDvrInUse(): boolean;
|
|
221
|
-
/**
|
|
222
|
-
* Indicates muted state of the video.
|
|
223
|
-
* @remarks
|
|
224
|
-
* Note that muted state is independent from the volume level.
|
|
225
|
-
* See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/muted}
|
|
226
|
-
*/
|
|
227
|
-
isMuted(): boolean;
|
|
228
|
-
/**
|
|
229
|
-
* Indicates the playing state.
|
|
230
|
-
*/
|
|
231
|
-
isPlaying(): boolean;
|
|
232
|
-
/**
|
|
233
|
-
* Mutes the sound of the video.
|
|
234
|
-
*/
|
|
235
|
-
mute(): void;
|
|
236
|
-
/**
|
|
237
|
-
* Unmutes the video sound.
|
|
238
|
-
*/
|
|
239
|
-
unmute(): void;
|
|
240
|
-
/**
|
|
241
|
-
* Pauses playback.
|
|
242
|
-
*/
|
|
243
|
-
pause(): void;
|
|
244
|
-
/**
|
|
245
|
-
* Starts playback.
|
|
246
|
-
*/
|
|
247
|
-
play(): void;
|
|
248
|
-
/**
|
|
249
|
-
* Resizes the player container element and everything within it.
|
|
250
|
-
* @param newSize - new size of the player
|
|
251
|
-
* @remarks
|
|
252
|
-
* Use this method when the player itself does not detect properly the change in size of its container element.
|
|
253
|
-
* It can be a case for orientation change on some mobile devices.
|
|
254
|
-
*/
|
|
255
|
-
resize(newSize: ContainerSize): void;
|
|
256
|
-
/**
|
|
257
|
-
* Seeks to the given time.
|
|
258
|
-
* @param time - time to seek to in seconds (since the beginning of the stream)
|
|
259
|
-
*/
|
|
260
|
-
seek(time: number): void;
|
|
261
|
-
/**
|
|
262
|
-
* Gets the current volume of the media content being played.
|
|
263
|
-
* @returns a number between 0 and 1
|
|
264
|
-
*/
|
|
265
|
-
getVolume(): number;
|
|
266
|
-
/**
|
|
267
|
-
* Sets the current volume of the media content being played.
|
|
268
|
-
* @param volume - a number between 0 and 1
|
|
269
|
-
*/
|
|
270
|
-
setVolume(volume: number): void;
|
|
271
|
-
/**
|
|
272
|
-
* Stops playback.
|
|
273
|
-
*/
|
|
274
|
-
stop(): void;
|
|
275
|
-
/**
|
|
276
|
-
* Registers a plugin.
|
|
277
|
-
* @param plugin - a plugin class
|
|
278
|
-
* @remarks
|
|
279
|
-
* Use this method to extend the player with custom behavior.
|
|
280
|
-
* The plugin class must inherit from one of the Clappr UIPlugin, UIContainerPlugin or CorePlugin classes.
|
|
281
|
-
* A core plugin will be initialized and attached to the player when the player is initialized.
|
|
282
|
-
* A UI plugin will be initialized and attached to the player container is initialized.
|
|
283
|
-
*
|
|
284
|
-
* @see {@link https://github.com/clappr/clappr/wiki/Architecture}
|
|
285
|
-
* @example
|
|
286
|
-
* ```ts
|
|
287
|
-
* import MyPlugin from './MyPlugin.js'
|
|
288
|
-
*
|
|
289
|
-
* Player.registerPlugin(MyPlugin)
|
|
290
|
-
* ```
|
|
291
|
-
*/
|
|
292
|
-
static registerPlugin(plugin: PlayerPlugin): void;
|
|
293
|
-
/**
|
|
294
|
-
* Unregisters a plugin registered earlier with {@link Player.registerPlugin}.
|
|
295
|
-
* @param plugin - a plugin class
|
|
296
|
-
*/
|
|
297
|
-
static unregisterPlugin(plugin: PlayerPlugin): void;
|
|
298
|
-
private setConfig;
|
|
299
|
-
private initPlayer;
|
|
300
|
-
private tuneIn;
|
|
301
|
-
private safeTriggerEvent;
|
|
302
|
-
private events;
|
|
303
|
-
private buildCoreOptions;
|
|
304
|
-
private configurePlaybacks;
|
|
305
|
-
private buildMediaSourcesList;
|
|
306
|
-
private bindContainerEventListeners;
|
|
307
|
-
private bindSizeManagementListeners;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* Subsystems of a player component.
|
|
312
|
-
* @beta
|
|
313
|
-
*/
|
|
314
|
-
export declare type PlayerComponentType = 'container' | 'core' | 'playback';
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* Configuration options for the player
|
|
318
|
-
*
|
|
319
|
-
* @remarks
|
|
320
|
-
* You can specify multiple sources, each in two forms: just a plain URL or a full object with `source` and `mimeType` fields {@link PlayerMediaSource}.
|
|
321
|
-
* The player will pick the first viable media source according to the source availability, and either the transport preference or standard transport selection order.
|
|
322
|
-
*
|
|
323
|
-
* `priorityTransport` is used to specify the preferred transport protocol
|
|
324
|
-
* when multiple sources are available.
|
|
325
|
-
* It will first try to use the transport specified if it's supported (by a playback engine) and the source is available.
|
|
326
|
-
* Otherwise it will try the other transports in the regular order (dash, hls, mpegts).
|
|
327
|
-
*
|
|
328
|
-
* The `autoPlay` option should be used together with the {@link PlayerConfig.mute | mute} to avoid issues with the browsers' autoplay policies.
|
|
329
|
-
*
|
|
330
|
-
* Note that the `playbackType` is specified explicitly in the examle below, but a playback engine might be able to detect the type of the stream automatically.
|
|
331
|
-
*
|
|
332
|
-
* A plugin options can be specified in the configuration object under a unique key, typically corresponding to the plugin name.
|
|
333
|
-
* The plugin object will have access to the internal normalized configuration object that contains all the custom options.
|
|
334
|
-
* in the examle below, the `poster` field is the `Poster` plugin configuration options.
|
|
335
|
-
*
|
|
336
|
-
* @example
|
|
337
|
-
* ```ts
|
|
338
|
-
* {
|
|
339
|
-
* autoPlay: true,
|
|
340
|
-
* mute: true,
|
|
341
|
-
* playbackType: 'live',
|
|
342
|
-
* priorityTransport: 'dash',
|
|
343
|
-
* sources: [{
|
|
344
|
-
* source: 'https://example.com/myownair66.mpd',
|
|
345
|
-
* mimeType: 'application/dash+xml',
|
|
346
|
-
* }, {
|
|
347
|
-
* source: 'https://example.com/myownair66.m3u8',
|
|
348
|
-
* mimeType: 'application/x-mpegURL',
|
|
349
|
-
* }],
|
|
350
|
-
* poster: {
|
|
351
|
-
* url: settings.poster,
|
|
352
|
-
* },
|
|
353
|
-
* }
|
|
354
|
-
* ```
|
|
355
|
-
* @beta
|
|
356
|
-
*/
|
|
357
|
-
export declare interface PlayerConfig extends Record<string, unknown> {
|
|
358
|
-
/**
|
|
359
|
-
* Start playback automatically when the player is ready
|
|
360
|
-
* @defaultValue false
|
|
361
|
-
*/
|
|
362
|
-
autoPlay?: boolean;
|
|
363
|
-
/**
|
|
364
|
-
* Configuration settings for the DASH playback engine
|
|
365
|
-
* @defaultValue \{\}
|
|
366
|
-
* {@link https://cdn.dashjs.org/latest/jsdoc/module-Settings.html}
|
|
367
|
-
*/
|
|
368
|
-
dash?: DashSettings;
|
|
369
|
-
/**
|
|
370
|
-
* Controls the debug output level
|
|
371
|
-
* @defaultValue 'none'
|
|
372
|
-
*/
|
|
373
|
-
debug?: PlayerDebugSettings;
|
|
374
|
-
/**
|
|
375
|
-
* A language code for the player UI, for example, `es`. Must reference a key in the {@link PlayerConfig.strings | strings} record.
|
|
376
|
-
* @defaultValue 'en'
|
|
377
|
-
*/
|
|
378
|
-
language?: string;
|
|
379
|
-
/**
|
|
380
|
-
* Repeat playback when the media ends.
|
|
381
|
-
* Is used with the `vod` {@link PlayerConfig.playbackType | playbackType}
|
|
382
|
-
* @defaultValue false
|
|
383
|
-
*/
|
|
384
|
-
loop?: boolean;
|
|
385
|
-
/**
|
|
386
|
-
* Mute the audio output in order to comply with browsers' autoplay policy.
|
|
387
|
-
* @defaultValue false
|
|
388
|
-
*/
|
|
389
|
-
mute?: boolean;
|
|
390
|
-
/**
|
|
391
|
-
* The type of playback (live stream or video on demand).
|
|
392
|
-
*
|
|
393
|
-
* @defaultValue 'vod'
|
|
394
|
-
*/
|
|
395
|
-
playbackType?: PlaybackType;
|
|
396
|
-
/**
|
|
397
|
-
* Preferred transport protocol when multiple sources are available.
|
|
398
|
-
* @defaultValue 'dash'
|
|
399
|
-
*/
|
|
400
|
-
priorityTransport?: TransportPreference;
|
|
401
|
-
/**
|
|
402
|
-
* List of media sources, at least one is required.
|
|
403
|
-
*/
|
|
404
|
-
sources: PlayerMediaSource[];
|
|
405
|
-
/**
|
|
406
|
-
* Localization strings for the player UI.
|
|
407
|
-
*/
|
|
408
|
-
strings?: TranslationSettings;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* @remarks `true` is equivalent to `'all'`, `false` is equivalent to `'none'`
|
|
413
|
-
* @beta
|
|
414
|
-
*/
|
|
415
|
-
export declare type PlayerDebugSettings = PlayerDebugTag | boolean;
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* Debug output category selector
|
|
419
|
-
* @beta
|
|
420
|
-
*/
|
|
421
|
-
export declare type PlayerDebugTag = 'all' | 'clappr' | 'dash' | 'hls' | 'none';
|
|
422
|
-
|
|
423
|
-
/**
|
|
424
|
-
* A top-level event on the player object
|
|
425
|
-
* @beta
|
|
426
|
-
*/
|
|
427
|
-
export declare enum PlayerEvent {
|
|
428
|
-
/**
|
|
429
|
-
* Playback has reached the end of the media.
|
|
430
|
-
*/
|
|
431
|
-
Ended = "ended",
|
|
432
|
-
/**
|
|
433
|
-
* An error occurred.
|
|
434
|
-
* Parameters: {@link PlaybackError}
|
|
435
|
-
*/
|
|
436
|
-
Error = "error",
|
|
437
|
-
/**
|
|
438
|
-
* The player has switched to or from the fullscreen mode.
|
|
439
|
-
* Parameters:`boolean` isFullscreen
|
|
440
|
-
*/
|
|
441
|
-
Fullscreen = "fullscreen",
|
|
442
|
-
/**
|
|
443
|
-
* The player is ready to use.
|
|
444
|
-
*/
|
|
445
|
-
Ready = "ready",
|
|
446
|
-
/**
|
|
447
|
-
* Playback has started.
|
|
448
|
-
*/
|
|
449
|
-
Play = "play",
|
|
450
|
-
/**
|
|
451
|
-
* Playback has been paused.
|
|
452
|
-
*/
|
|
453
|
-
Pause = "pause",
|
|
454
|
-
/**
|
|
455
|
-
* The player's container has been resized.
|
|
456
|
-
* Parameters: {@link ContainerSize}
|
|
457
|
-
*/
|
|
458
|
-
Resize = "resize",
|
|
459
|
-
/**
|
|
460
|
-
* The player is seeking to a new position.
|
|
461
|
-
*/
|
|
462
|
-
Seek = "seek",
|
|
463
|
-
/**
|
|
464
|
-
* Playback has been stopped.
|
|
465
|
-
*/
|
|
466
|
-
Stop = "stop",
|
|
467
|
-
/**
|
|
468
|
-
* The current playback time has changed.
|
|
469
|
-
* Parameters: {@link TimePosition}
|
|
470
|
-
*/
|
|
471
|
-
TimeUpdate = "timeupdate",
|
|
472
|
-
/**
|
|
473
|
-
* The volume has changed.
|
|
474
|
-
* Parameters: `number` volume in the range 0..1
|
|
475
|
-
*/
|
|
476
|
-
VolumeUpdate = "volumeupdate"
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
* Type of a listener callback function for a player event.
|
|
481
|
-
* See the description of the event parameters in {@link PlayerEvent}.
|
|
482
|
-
* @beta
|
|
483
|
-
*/
|
|
484
|
-
export declare type PlayerEventHandler<E extends PlayerEvent> = (...args: PlayerEventParams<E>) => void;
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
* @beta
|
|
488
|
-
*/
|
|
489
|
-
export declare type PlayerEventParams<E extends PlayerEvent> = E extends PlayerEvent.Seek ? [number] : E extends PlayerEvent.VolumeUpdate ? [number] : E extends PlayerEvent.TimeUpdate ? [TimePosition] : E extends PlayerEvent.Resize ? [{
|
|
490
|
-
width: number;
|
|
491
|
-
height: number;
|
|
492
|
-
}] : E extends PlayerEvent.Fullscreen ? [boolean] : E extends PlayerEvent.Error ? [PlaybackError] : [];
|
|
493
|
-
|
|
494
|
-
/**
|
|
495
|
-
* A media source to fetch the media data from
|
|
496
|
-
* @beta
|
|
497
|
-
*/
|
|
498
|
-
export declare type PlayerMediaSource = string | PlayerMediaSourceDesc;
|
|
499
|
-
|
|
500
|
-
/**
|
|
501
|
-
* Describes a media source with its MIME type and URL.
|
|
502
|
-
*
|
|
503
|
-
* @remarks
|
|
504
|
-
* When the MIME type is provided, it helps the player determine the appropriate playback engine.
|
|
505
|
-
* If omitted, the player will attempt to detect the type from the source URL extension.
|
|
506
|
-
* @beta
|
|
507
|
-
*/
|
|
508
|
-
export declare interface PlayerMediaSourceDesc {
|
|
509
|
-
/**
|
|
510
|
-
* The MIME type of the media source (e.g. `"video/mp4"`, `"application/x-mpegURL"`).
|
|
511
|
-
* Necessary if the type cannot be detected from file extension of the source URL.
|
|
512
|
-
*/
|
|
513
|
-
mimeType?: string;
|
|
514
|
-
/**
|
|
515
|
-
* URL of the media source
|
|
516
|
-
*/
|
|
517
|
-
source: string;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
/**
|
|
521
|
-
* @beta
|
|
522
|
-
* @see {@link https://clappr.github.io/classes/UIContainerPlugin.html}, {@link https://clappr.github.io/classes/ContainerPlugin.html}
|
|
523
|
-
*/
|
|
524
|
-
export declare type PlayerPlugin = {
|
|
525
|
-
new (...args: any[]): unknown;
|
|
526
|
-
name: string;
|
|
527
|
-
};
|
|
528
|
-
|
|
529
|
-
/**
|
|
530
|
-
* A level of quality within a media source.
|
|
531
|
-
* @beta
|
|
532
|
-
*/
|
|
533
|
-
export declare interface QualityLevel {
|
|
534
|
-
/**
|
|
535
|
-
* Zero-based index of the quality level.
|
|
536
|
-
*/
|
|
537
|
-
level: number;
|
|
538
|
-
/**
|
|
539
|
-
* Width of the video, pixels.
|
|
540
|
-
*/
|
|
541
|
-
width: number;
|
|
542
|
-
/**
|
|
543
|
-
* Height of the video, pixels.
|
|
544
|
-
*/
|
|
545
|
-
height: number;
|
|
546
|
-
/**
|
|
547
|
-
* Bitrate of the video, bps.
|
|
548
|
-
*/
|
|
549
|
-
bitrate: number;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
export { reportError_2 as reportError }
|
|
553
|
-
|
|
554
|
-
export { SentryTracer }
|
|
555
|
-
|
|
556
|
-
export { setTracer }
|
|
557
|
-
|
|
558
|
-
/**
|
|
559
|
-
* Current playback time and total duration of the media.
|
|
560
|
-
* @beta
|
|
561
|
-
*/
|
|
562
|
-
export declare interface TimePosition {
|
|
563
|
-
/**
|
|
564
|
-
* Current playback time, 0..duration, seconds.
|
|
565
|
-
*/
|
|
566
|
-
current: TimeValue;
|
|
567
|
-
/**
|
|
568
|
-
* Total duration of the media, seconds.
|
|
569
|
-
*/
|
|
570
|
-
total: TimeValue;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
/**
|
|
574
|
-
* For the plugin development
|
|
575
|
-
* @beta
|
|
576
|
-
*/
|
|
577
|
-
export declare type TimeProgress = TimePosition & {
|
|
578
|
-
start: number;
|
|
579
|
-
};
|
|
580
|
-
|
|
581
|
-
/**
|
|
582
|
-
* For the plugin development
|
|
583
|
-
* @beta
|
|
584
|
-
*/
|
|
585
|
-
export declare type TimeUpdate = TimePosition & {
|
|
586
|
-
firstFragDateTime: number;
|
|
587
|
-
};
|
|
588
|
-
|
|
589
|
-
/**
|
|
590
|
-
* Playback time in seconds since the beginning of the stream (or a segment for the live streams)
|
|
591
|
-
* @beta
|
|
592
|
-
*/
|
|
593
|
-
export declare type TimeValue = number;
|
|
594
|
-
|
|
595
|
-
export { trace }
|
|
596
|
-
|
|
597
|
-
/**
|
|
598
|
-
* @beta
|
|
599
|
-
*/
|
|
600
|
-
export declare type TranslationKey = string;
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* Localization strings for the player UI.
|
|
604
|
-
* @remarks
|
|
605
|
-
* The keys are language codes, and the values are objects with keys being the translation keys and values being the translations.
|
|
606
|
-
*
|
|
607
|
-
* This dictionary is used to localize the player UI, including the error messages and is shared across all the player components (including the plugins).
|
|
608
|
-
*
|
|
609
|
-
* @example
|
|
610
|
-
* ```
|
|
611
|
-
* {
|
|
612
|
-
* en: {
|
|
613
|
-
* play: 'Play',
|
|
614
|
-
* ...
|
|
615
|
-
* },
|
|
616
|
-
* es: {
|
|
617
|
-
* play: 'Reproducir',
|
|
618
|
-
* ...
|
|
619
|
-
* },
|
|
620
|
-
* ...
|
|
621
|
-
* }
|
|
622
|
-
* ```
|
|
623
|
-
*
|
|
624
|
-
* @beta
|
|
625
|
-
*/
|
|
626
|
-
export declare type TranslationSettings = Partial<Record<LangTag, Record<TranslationKey, string>>>;
|
|
627
|
-
|
|
628
|
-
/**
|
|
629
|
-
* Preferred media delivery protocol
|
|
630
|
-
* @beta
|
|
631
|
-
*/
|
|
632
|
-
export declare type TransportPreference = MediaTransport;
|
|
633
|
-
|
|
634
|
-
/**
|
|
635
|
-
* Version information about the gplayer and its main dependencies
|
|
636
|
-
* @returns Version information about the gplayer and its main dependencies
|
|
637
|
-
* @beta
|
|
638
|
-
*/
|
|
639
|
-
export declare function version(): {
|
|
640
|
-
gplayer: string;
|
|
641
|
-
clappr: string;
|
|
642
|
-
dashjs: string;
|
|
643
|
-
hlsjs: string;
|
|
644
|
-
};
|
|
645
|
-
|
|
646
|
-
export { }
|
package/lib/backend.d.ts
DELETED
package/lib/backend.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAElE,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,oBAAoB,GAAG,iBAAiB,CASnF"}
|
package/lib/backend.js
DELETED
package/lib/constants.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=constants.d.ts.map
|
package/lib/constants.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":""}
|
package/lib/constants.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|