@gcorevideo/player 2.19.15 → 2.20.3
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/level-selector/list.ejs +1 -1
- package/dist/core.js +2 -2
- package/dist/index.css +966 -966
- package/dist/index.js +884 -627
- package/dist/player.d.ts +536 -122
- package/dist/plugins/index.css +1160 -1160
- package/dist/plugins/index.js +2006 -1725
- package/docs/api/player.audioselector.md +1 -251
- package/docs/api/player.bigmutebutton.md +1 -156
- package/docs/api/player.clapprnerdstats.md +12 -259
- package/docs/api/player.clapprstats.exportmetrics.md +4 -0
- package/docs/api/player.clapprstats.md +7 -223
- package/docs/api/player.clapprstats.setupdatemetrics.md +2 -0
- package/docs/api/player.clicktopause.md +5 -113
- package/docs/api/player.clipsplugin.gettext.md +9 -0
- package/docs/api/player.clipsplugin.md +10 -94
- package/docs/api/{player.playbackrate.setselectedrate.md → player.clipspluginsettings.md} +18 -10
- package/docs/api/player.clipspluginsettings.text.md +13 -0
- package/docs/api/player.contextmenu._constructor_.md +6 -3
- package/docs/api/player.contextmenu.md +13 -256
- package/docs/api/player.contextmenupluginsettings.label.md +11 -0
- package/docs/api/player.contextmenupluginsettings.md +93 -0
- package/docs/api/player.contextmenupluginsettings.preventshowcontextmenu.md +11 -0
- package/docs/api/player.contextmenupluginsettings.url.md +11 -0
- package/docs/api/player.dvrcontrols.md +5 -1
- package/docs/api/player.errorscreen.attributes.md +3 -0
- package/docs/api/player.errorscreen.bindevents.md +3 -0
- package/docs/api/player.errorscreen.container.md +3 -0
- package/docs/api/player.errorscreen.hide.md +3 -0
- package/docs/api/player.errorscreen.md +25 -0
- package/docs/api/player.errorscreen.name.md +3 -0
- package/docs/api/player.errorscreen.render.md +3 -0
- package/docs/api/player.errorscreen.show.md +3 -0
- package/docs/api/player.errorscreen.supportedversion.md +3 -0
- package/docs/api/player.errorscreen.template.md +3 -0
- package/docs/api/player.errorscreen.unbindevents.md +3 -0
- package/docs/api/player.favicon._constructor_.md +3 -0
- package/docs/api/player.favicon.bindevents.md +3 -0
- package/docs/api/player.favicon.configure.md +3 -0
- package/docs/api/player.favicon.destroy.md +3 -0
- package/docs/api/player.favicon.disable.md +3 -0
- package/docs/api/player.favicon.md +18 -1
- package/docs/api/player.favicon.name.md +3 -0
- package/docs/api/player.favicon.supportedversion.md +3 -0
- package/docs/api/player.gearevents.md +4 -1
- package/docs/api/player.googleanalytics._constructor_.md +3 -0
- package/docs/api/player.googleanalytics.addeventlisteners.md +3 -0
- package/docs/api/player.googleanalytics.embedscript.md +3 -0
- package/docs/api/player.googleanalytics.md +42 -1
- package/docs/api/player.googleanalytics.name.md +3 -0
- package/docs/api/player.googleanalytics.onbufferfull.md +3 -0
- package/docs/api/player.googleanalytics.onbuffering.md +3 -0
- package/docs/api/player.googleanalytics.ondvr.md +3 -0
- package/docs/api/player.googleanalytics.onended.md +3 -0
- package/docs/api/player.googleanalytics.onerror.md +3 -0
- package/docs/api/player.googleanalytics.onfullscreen.md +3 -0
- package/docs/api/player.googleanalytics.onhd.md +3 -0
- package/docs/api/player.googleanalytics.onpause.md +3 -0
- package/docs/api/player.googleanalytics.onplay.md +3 -0
- package/docs/api/player.googleanalytics.onready.md +3 -0
- package/docs/api/player.googleanalytics.onseek.md +3 -0
- package/docs/api/player.googleanalytics.onstop.md +3 -0
- package/docs/api/player.googleanalytics.onvolumechanged.md +3 -0
- package/docs/api/player.googleanalytics.push.md +3 -0
- package/docs/api/player.googleanalytics.supportedversion.md +3 -0
- package/docs/api/{player.clapprstats.name.md → player.initeventdata.event.md} +3 -3
- package/docs/api/player.initeventdata.md +60 -0
- package/docs/api/player.logo._constructor_.md +3 -0
- package/docs/api/player.logo.attributes.md +3 -0
- package/docs/api/player.logo.bindevents.md +3 -0
- package/docs/api/player.logo.md +20 -1
- package/docs/api/player.logo.name.md +3 -0
- package/docs/api/player.logo.render.md +3 -0
- package/docs/api/player.logo.stoplistening.md +3 -0
- package/docs/api/player.logo.supportedversion.md +3 -0
- package/docs/api/player.logo.template.md +3 -0
- package/docs/api/player.md +149 -18
- package/docs/api/player.mediacontrolelement.md +1 -1
- package/docs/api/player.multicamera.md +2 -0
- package/docs/api/player.pictureinpicture.md +9 -197
- package/docs/api/player.playbackrate.md +10 -314
- package/docs/api/player.seektime.attributes.md +3 -0
- package/docs/api/player.seektime.bindevents.md +3 -0
- package/docs/api/player.seektime.durationshown.md +3 -0
- package/docs/api/player.seektime.getseektime.md +3 -0
- package/docs/api/player.seektime.islivestreamwithdvr.md +3 -0
- package/docs/api/player.seektime.md +31 -0
- package/docs/api/player.seektime.mediacontrol.md +3 -0
- package/docs/api/player.seektime.mediacontrolcontainer.md +3 -0
- package/docs/api/player.seektime.name.md +3 -0
- package/docs/api/player.seektime.render.md +3 -0
- package/docs/api/player.seektime.shouldbevisible.md +3 -0
- package/docs/api/player.seektime.supportedversion.md +3 -0
- package/docs/api/player.seektime.template.md +3 -0
- package/docs/api/player.seektime.update.md +3 -0
- package/docs/api/player.share.md +2 -0
- package/docs/api/player.skiptime.md +2 -0
- package/docs/api/{player.clapprstats.destroy.md → player.stalleventdata.count.md} +5 -7
- package/docs/api/{player.bigmutebutton.template.md → player.stalleventdata.event.md} +3 -3
- package/docs/api/player.stalleventdata.md +117 -0
- package/docs/api/{player.audioselector.onshowlevelselectmenu.md → player.stalleventdata.time.md} +5 -7
- package/docs/api/{player.clapprstats.starttimers.md → player.stalleventdata.total_ms.md} +5 -7
- package/docs/api/{player.audioselector.template.md → player.starteventdata.event.md} +3 -3
- package/docs/api/player.starteventdata.md +60 -0
- package/docs/api/{player.clapprstats._defaultreport.md → player.telemetry._constructor_.md} +7 -9
- package/docs/api/player.telemetry.md +146 -0
- package/docs/api/{player.clapprnerdstats.name.md → player.telemetry.name.md} +4 -2
- package/docs/api/{player.clapprstats.supportedversion.md → player.telemetry.supportedversion.md} +4 -2
- package/docs/api/player.telemetryevent.md +100 -0
- package/docs/api/player.telemetryeventdata.md +18 -0
- package/docs/api/player.telemetrypluginsettings.md +60 -0
- package/docs/api/{player.audioselector.bindevents.md → player.telemetrypluginsettings.send.md} +5 -7
- package/docs/api/{player.audioselector.reload.md → player.telemetryrecord.md} +8 -6
- package/docs/api/player.thumbnails.md +21 -139
- package/docs/api/player.thumbnailspluginsettings.md +23 -0
- package/docs/api/player.volumefade.md +1 -93
- package/docs/api/{player.audioselector.name.md → player.watcheventdata.event.md} +3 -3
- package/docs/api/player.watcheventdata.md +60 -0
- package/lib/index.plugins.d.ts +2 -3
- package/lib/index.plugins.d.ts.map +1 -1
- package/lib/index.plugins.js +2 -3
- package/lib/playback/hls-playback/HlsPlayback.js +1 -1
- package/lib/plugins/audio-selector/AudioSelector.d.ts +28 -6
- package/lib/plugins/audio-selector/AudioSelector.d.ts.map +1 -1
- package/lib/plugins/audio-selector/AudioSelector.js +52 -22
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts +18 -2
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts.map +1 -1
- package/lib/plugins/big-mute-button/BigMuteButton.js +21 -16
- package/lib/plugins/bottom-gear/BottomGear.d.ts +1 -0
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +1 -0
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts +38 -5
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts.map +1 -1
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.js +63 -17
- package/lib/plugins/clappr-stats/ClapprStats.d.ts +31 -8
- package/lib/plugins/clappr-stats/ClapprStats.d.ts.map +1 -1
- package/lib/plugins/clappr-stats/ClapprStats.js +24 -0
- package/lib/plugins/clappr-stats/types.d.ts +12 -0
- package/lib/plugins/clappr-stats/types.d.ts.map +1 -1
- package/lib/plugins/clappr-stats/types.js +3 -0
- package/lib/plugins/click-to-pause/ClickToPause.d.ts +13 -1
- package/lib/plugins/click-to-pause/ClickToPause.d.ts.map +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.js +14 -4
- package/lib/plugins/clips/Clips.d.ts +34 -2
- package/lib/plugins/clips/Clips.d.ts.map +1 -1
- package/lib/plugins/clips/Clips.js +51 -22
- package/lib/plugins/context-menu/ContextMenu.d.ts +40 -13
- package/lib/plugins/context-menu/ContextMenu.d.ts.map +1 -1
- package/lib/plugins/context-menu/ContextMenu.js +48 -36
- package/lib/plugins/dvr-controls/DvrControls.d.ts +5 -4
- package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -1
- package/lib/plugins/dvr-controls/DvrControls.js +15 -29
- package/lib/plugins/error-screen/ErrorScreen.d.ts +4 -0
- package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -1
- package/lib/plugins/error-screen/ErrorScreen.js +4 -0
- package/lib/plugins/favicon/Favicon.d.ts +4 -0
- package/lib/plugins/favicon/Favicon.d.ts.map +1 -1
- package/lib/plugins/favicon/Favicon.js +4 -0
- package/lib/plugins/google-analytics/GoogleAnalytics.d.ts +4 -0
- package/lib/plugins/google-analytics/GoogleAnalytics.d.ts.map +1 -1
- package/lib/plugins/google-analytics/GoogleAnalytics.js +5 -1
- package/lib/plugins/index.d.ts +2 -4
- package/lib/plugins/index.d.ts.map +1 -1
- package/lib/plugins/index.js +2 -4
- package/lib/plugins/logo/Logo.d.ts +4 -0
- package/lib/plugins/logo/Logo.d.ts.map +1 -1
- package/lib/plugins/logo/Logo.js +4 -0
- package/lib/plugins/media-control/MediaControl.d.ts +1 -1
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +3 -1
- package/lib/plugins/multi-camera/MultiCamera.d.ts +3 -0
- package/lib/plugins/multi-camera/MultiCamera.d.ts.map +1 -1
- package/lib/plugins/multi-camera/MultiCamera.js +3 -0
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts +32 -4
- package/lib/plugins/picture-in-picture/PictureInPicture.d.ts.map +1 -1
- package/lib/plugins/picture-in-picture/PictureInPicture.js +30 -2
- package/lib/plugins/playback-rate/PlaybackRate.d.ts +47 -14
- package/lib/plugins/playback-rate/PlaybackRate.d.ts.map +1 -1
- package/lib/plugins/playback-rate/PlaybackRate.js +38 -9
- package/lib/plugins/seek-time/SeekTime.d.ts +4 -0
- package/lib/plugins/seek-time/SeekTime.d.ts.map +1 -1
- package/lib/plugins/seek-time/SeekTime.js +5 -1
- package/lib/plugins/share/Share.d.ts +3 -0
- package/lib/plugins/share/Share.d.ts.map +1 -1
- package/lib/plugins/share/Share.js +3 -0
- package/lib/plugins/skip-time/SkipTime.d.ts +3 -0
- package/lib/plugins/skip-time/SkipTime.d.ts.map +1 -1
- package/lib/plugins/skip-time/SkipTime.js +3 -0
- package/lib/plugins/statistics/Statistics.d.ts +38 -3
- package/lib/plugins/statistics/Statistics.d.ts.map +1 -1
- package/lib/plugins/statistics/Statistics.js +51 -9
- package/lib/plugins/telemetry/Telemetry.d.ts +153 -0
- package/lib/plugins/telemetry/Telemetry.d.ts.map +1 -0
- package/lib/plugins/telemetry/Telemetry.js +181 -0
- package/lib/plugins/thumbnails/Thumbnails.d.ts +48 -3
- package/lib/plugins/thumbnails/Thumbnails.d.ts.map +1 -1
- package/lib/plugins/thumbnails/Thumbnails.js +52 -18
- package/lib/plugins/volume-fade/VolumeFade.d.ts +8 -1
- package/lib/plugins/volume-fade/VolumeFade.d.ts.map +1 -1
- package/lib/plugins/volume-fade/VolumeFade.js +9 -1
- package/package.json +1 -1
- package/src/index.plugins.ts +2 -3
- package/src/playback/hls-playback/HlsPlayback.ts +1 -1
- package/src/plugins/audio-selector/AudioSelector.ts +227 -154
- package/src/plugins/big-mute-button/BigMuteButton.ts +100 -79
- package/src/plugins/bottom-gear/BottomGear.ts +1 -0
- package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +240 -173
- package/src/plugins/clappr-stats/ClapprStats.ts +32 -8
- package/src/plugins/clappr-stats/types.ts +13 -0
- package/src/plugins/click-to-pause/ClickToPause.ts +47 -36
- package/src/plugins/clips/Clips.ts +127 -71
- package/src/plugins/context-menu/ContextMenu.ts +105 -76
- package/src/plugins/dvr-controls/DvrControls.ts +15 -31
- package/src/plugins/error-screen/ErrorScreen.ts +4 -0
- package/src/plugins/favicon/Favicon.ts +4 -0
- package/src/plugins/google-analytics/GoogleAnalytics.ts +5 -1
- package/src/plugins/index.ts +2 -4
- package/src/plugins/level-selector/__tests__/LevelSelector.test.ts +47 -26
- package/src/plugins/level-selector/__tests__/__snapshots__/LevelSelector.test.ts.snap +18 -18
- package/src/plugins/logo/Logo.ts +4 -0
- package/src/plugins/media-control/MediaControl.ts +4 -1
- package/src/plugins/multi-camera/MultiCamera.ts +3 -0
- package/src/plugins/picture-in-picture/PictureInPicture.ts +35 -7
- package/src/plugins/playback-rate/PlaybackRate.ts +53 -24
- package/src/plugins/seek-time/SeekTime.ts +5 -1
- package/src/plugins/share/Share.ts +3 -0
- package/src/plugins/skip-time/SkipTime.ts +3 -0
- package/src/plugins/telemetry/Telemetry.ts +317 -0
- package/src/plugins/thumbnails/Thumbnails.ts +268 -194
- package/src/plugins/volume-fade/VolumeFade.ts +10 -2
- package/temp/player.api.json +2457 -5257
- package/tsconfig.tsbuildinfo +1 -1
- package/docs/api/player.audioselector.attributes.md +0 -17
- package/docs/api/player.audioselector.events.md +0 -17
- package/docs/api/player.audioselector.hideselecttrackmenu.md +0 -18
- package/docs/api/player.audioselector.render.md +0 -18
- package/docs/api/player.audioselector.supportedversion.md +0 -16
- package/docs/api/player.audioselector.togglecontextmenu.md +0 -18
- package/docs/api/player.audioselector.unbindevents.md +0 -18
- package/docs/api/player.audioselector.version.md +0 -14
- package/docs/api/player.bigmutebutton.bindevents.md +0 -18
- package/docs/api/player.bigmutebutton.events.md +0 -17
- package/docs/api/player.bigmutebutton.name.md +0 -14
- package/docs/api/player.bigmutebutton.render.md +0 -18
- package/docs/api/player.bigmutebutton.supportedversion.md +0 -16
- package/docs/api/player.clapprnerdstats.attributes.md +0 -17
- package/docs/api/player.clapprnerdstats.bindevents.md +0 -18
- package/docs/api/player.clapprnerdstats.events.md +0 -18
- package/docs/api/player.clapprnerdstats.playerheight.md +0 -14
- package/docs/api/player.clapprnerdstats.playerwidth.md +0 -14
- package/docs/api/player.clapprnerdstats.render.md +0 -18
- package/docs/api/player.clapprnerdstats.statsboxelem.md +0 -14
- package/docs/api/player.clapprnerdstats.statsboxwidththreshold.md +0 -14
- package/docs/api/player.clapprnerdstats.supportedversion.md +0 -16
- package/docs/api/player.clapprnerdstats.template.md +0 -14
- package/docs/api/player.clapprstats._buildreport.md +0 -18
- package/docs/api/player.clapprstats._playbackname.md +0 -14
- package/docs/api/player.clapprstats._playbacktype.md +0 -14
- package/docs/api/player.clapprstats.bindevents.md +0 -18
- package/docs/api/player.clapprstats.onfirstplaying.md +0 -18
- package/docs/api/player.clapprstats.playafterpause.md +0 -18
- package/docs/api/player.clapprstats.stopreporting.md +0 -18
- package/docs/api/player.clicktopause.bindevents.md +0 -15
- package/docs/api/player.clicktopause.config.md +0 -11
- package/docs/api/player.clicktopause.name.md +0 -11
- package/docs/api/player.clicktopause.supportedversion.md +0 -13
- package/docs/api/player.clipsplugin.attributes.md +0 -13
- package/docs/api/player.clipsplugin.bindevents.md +0 -15
- package/docs/api/player.clipsplugin.makesvg.md +0 -49
- package/docs/api/player.clipsplugin.name.md +0 -11
- package/docs/api/player.clipsplugin.unbindevents.md +0 -15
- package/docs/api/player.contextmenu.attributes.md +0 -13
- package/docs/api/player.contextmenu.bindevents.md +0 -15
- package/docs/api/player.contextmenu.destroy.md +0 -15
- package/docs/api/player.contextmenu.events.md +0 -13
- package/docs/api/player.contextmenu.exposeversion.md +0 -14
- package/docs/api/player.contextmenu.label.md +0 -11
- package/docs/api/player.contextmenu.mediacontrol.md +0 -11
- package/docs/api/player.contextmenu.name.md +0 -11
- package/docs/api/player.contextmenu.render.md +0 -15
- package/docs/api/player.contextmenu.supportedversion.md +0 -13
- package/docs/api/player.contextmenu.template.md +0 -11
- package/docs/api/player.contextmenu.url.md +0 -11
- package/docs/api/player.disablecontrols.bindevents.md +0 -15
- package/docs/api/player.disablecontrols.container.md +0 -11
- package/docs/api/player.disablecontrols.md +0 -138
- package/docs/api/player.disablecontrols.name.md +0 -11
- package/docs/api/player.disablecontrols.supportedversion.md +0 -13
- package/docs/api/player.disablecontrols.unbindevents.md +0 -15
- package/docs/api/player.pictureinpicture.bindevents.md +0 -15
- package/docs/api/player.pictureinpicture.events.md +0 -13
- package/docs/api/player.pictureinpicture.exitpictureinpicture.md +0 -15
- package/docs/api/player.pictureinpicture.name.md +0 -11
- package/docs/api/player.pictureinpicture.render.md +0 -15
- package/docs/api/player.pictureinpicture.requestpictureinpicture.md +0 -15
- package/docs/api/player.pictureinpicture.supportedversion.md +0 -13
- package/docs/api/player.pictureinpicture.togglepictureinpicture.md +0 -15
- package/docs/api/player.pictureinpicture.version.md +0 -11
- package/docs/api/player.pictureinpicture.videoelement.md +0 -11
- package/docs/api/player.playbackrate.attributes.md +0 -14
- package/docs/api/player.playbackrate.bindevents.md +0 -15
- package/docs/api/player.playbackrate.events.md +0 -15
- package/docs/api/player.playbackrate.gettitle.md +0 -15
- package/docs/api/player.playbackrate.goback.md +0 -15
- package/docs/api/player.playbackrate.highlightcurrentrate.md +0 -15
- package/docs/api/player.playbackrate.name.md +0 -11
- package/docs/api/player.playbackrate.onfinishad.md +0 -15
- package/docs/api/player.playbackrate.onplay.md +0 -15
- package/docs/api/player.playbackrate.onrateselect.md +0 -49
- package/docs/api/player.playbackrate.onshowmenu.md +0 -15
- package/docs/api/player.playbackrate.onstartad.md +0 -15
- package/docs/api/player.playbackrate.onstop.md +0 -15
- package/docs/api/player.playbackrate.reload.md +0 -15
- package/docs/api/player.playbackrate.render.md +0 -15
- package/docs/api/player.playbackrate.supportedversion.md +0 -13
- package/docs/api/player.playbackrate.template.md +0 -11
- package/docs/api/player.playbackrate.unbindevents.md +0 -15
- package/docs/api/player.playbackrate.updateplaybackrate.md +0 -49
- package/docs/api/player.pluginsettings.md +0 -13
- package/docs/api/player.statistics._constructor_.md +0 -47
- package/docs/api/player.statistics.bindevents.md +0 -15
- package/docs/api/player.statistics.md +0 -141
- package/docs/api/player.statistics.name.md +0 -11
- package/docs/api/player.statistics.supportedversion.md +0 -13
- package/docs/api/player.thumbnails.attributes.md +0 -13
- package/docs/api/player.thumbnails.bindevents.md +0 -15
- package/docs/api/player.thumbnails.name.md +0 -11
- package/docs/api/player.thumbnails.settext.md +0 -49
- package/docs/api/player.thumbnails.supportedversion.md +0 -13
- package/docs/api/player.thumbnails.template.md +0 -11
- package/docs/api/player.volumefade.bindevents.md +0 -18
- package/docs/api/player.volumefade.name.md +0 -14
- package/docs/api/player.volumefade.unbindevents.md +0 -18
- package/src/plugins/disable-controls/DisableControls.ts +0 -81
- package/src/plugins/ga-events/GaEvents.js +0 -395
- package/src/plugins/ga-events/ga-tracking.js +0 -46
- package/src/plugins/statistics/Statistics.ts +0 -207
- /package/src/plugins/{statistics → telemetry}/Statistics copy.xts +0 -0
|
@@ -8,7 +8,7 @@ exports[`LevelSelector > basically > auto > should render the proper level label
|
|
|
8
8
|
<ul class="gear-sub-menu">
|
|
9
9
|
|
|
10
10
|
<li class="current">
|
|
11
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color gcore-skin-active" data-id="-1">
|
|
11
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color gcore-skin-active" data-id="-1" id="level_selector_auto">
|
|
12
12
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
13
13
|
Auto
|
|
14
14
|
</a>
|
|
@@ -16,21 +16,21 @@ exports[`LevelSelector > basically > auto > should render the proper level label
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
<li class="">
|
|
19
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="2">
|
|
19
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="2" id="level_selector_1080">
|
|
20
20
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
21
21
|
1080p
|
|
22
22
|
</a>
|
|
23
23
|
</li>
|
|
24
24
|
|
|
25
25
|
<li class="">
|
|
26
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="1">
|
|
26
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="1" id="level_selector_720">
|
|
27
27
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
28
28
|
HD
|
|
29
29
|
</a>
|
|
30
30
|
</li>
|
|
31
31
|
|
|
32
32
|
<li class="">
|
|
33
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="0">
|
|
33
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="0" id="level_selector_360">
|
|
34
34
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
35
35
|
360p
|
|
36
36
|
</a>
|
|
@@ -48,7 +48,7 @@ exports[`LevelSelector > basically > custom label > should render the proper lev
|
|
|
48
48
|
<ul class="gear-sub-menu">
|
|
49
49
|
|
|
50
50
|
<li class="">
|
|
51
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="-1">
|
|
51
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="-1" id="level_selector_auto">
|
|
52
52
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
53
53
|
Auto
|
|
54
54
|
</a>
|
|
@@ -56,21 +56,21 @@ exports[`LevelSelector > basically > custom label > should render the proper lev
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
<li class="">
|
|
59
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="2">
|
|
59
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="2" id="level_selector_1080">
|
|
60
60
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
61
61
|
1080p
|
|
62
62
|
</a>
|
|
63
63
|
</li>
|
|
64
64
|
|
|
65
65
|
<li class="current">
|
|
66
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color gcore-skin-active" data-id="1">
|
|
66
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color gcore-skin-active" data-id="1" id="level_selector_720">
|
|
67
67
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
68
68
|
HD
|
|
69
69
|
</a>
|
|
70
70
|
</li>
|
|
71
71
|
|
|
72
72
|
<li class="">
|
|
73
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="0">
|
|
73
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="0" id="level_selector_360">
|
|
74
74
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
75
75
|
360p
|
|
76
76
|
</a>
|
|
@@ -88,7 +88,7 @@ exports[`LevelSelector > basically > standard label > should render the proper l
|
|
|
88
88
|
<ul class="gear-sub-menu">
|
|
89
89
|
|
|
90
90
|
<li class="">
|
|
91
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="-1">
|
|
91
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="-1" id="level_selector_auto">
|
|
92
92
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
93
93
|
Auto
|
|
94
94
|
</a>
|
|
@@ -96,21 +96,21 @@ exports[`LevelSelector > basically > standard label > should render the proper l
|
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
<li class="">
|
|
99
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="2">
|
|
99
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="2" id="level_selector_1080">
|
|
100
100
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
101
101
|
1080p
|
|
102
102
|
</a>
|
|
103
103
|
</li>
|
|
104
104
|
|
|
105
105
|
<li class="">
|
|
106
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="1">
|
|
106
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="1" id="level_selector_720">
|
|
107
107
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
108
108
|
HD
|
|
109
109
|
</a>
|
|
110
110
|
</li>
|
|
111
111
|
|
|
112
112
|
<li class="current">
|
|
113
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color gcore-skin-active" data-id="0">
|
|
113
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color gcore-skin-active" data-id="0" id="level_selector_360">
|
|
114
114
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
115
115
|
360p
|
|
116
116
|
</a>
|
|
@@ -139,21 +139,21 @@ exports[`LevelSelector > options.restrictResolution > given vertical video forma
|
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
<li class="level-disabled">
|
|
142
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="2">
|
|
142
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="2" id="level_selector_1080">
|
|
143
143
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
144
144
|
1080p
|
|
145
145
|
</a>
|
|
146
146
|
</li>
|
|
147
147
|
|
|
148
148
|
<li class="level-disabled">
|
|
149
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="1">
|
|
149
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="1" id="level_selector_1280">
|
|
150
150
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
151
151
|
720p
|
|
152
152
|
</a>
|
|
153
153
|
</li>
|
|
154
154
|
|
|
155
155
|
<li class="current">
|
|
156
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color gcore-skin-active" data-id="0">
|
|
156
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color gcore-skin-active" data-id="0" id="level_selector_640">
|
|
157
157
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
158
158
|
360p
|
|
159
159
|
</a>
|
|
@@ -172,21 +172,21 @@ exports[`LevelSelector > options.restrictResolution > given vertical video forma
|
|
|
172
172
|
|
|
173
173
|
|
|
174
174
|
<li class="level-disabled">
|
|
175
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="2">
|
|
175
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="2" id="level_selector_1080">
|
|
176
176
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
177
177
|
1080p
|
|
178
178
|
</a>
|
|
179
179
|
</li>
|
|
180
180
|
|
|
181
181
|
<li class="level-disabled">
|
|
182
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="1">
|
|
182
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="1" id="level_selector_1280">
|
|
183
183
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
184
184
|
720p
|
|
185
185
|
</a>
|
|
186
186
|
</li>
|
|
187
187
|
|
|
188
188
|
<li class="current">
|
|
189
|
-
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color gcore-skin-active" data-id="0">
|
|
189
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color gcore-skin-active" data-id="0" id="level_selector_640">
|
|
190
190
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
191
191
|
360p
|
|
192
192
|
</a>
|
package/src/plugins/logo/Logo.ts
CHANGED
|
@@ -20,6 +20,10 @@ type LogoOptions = {
|
|
|
20
20
|
objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* The plugin adds custom logo to the player.
|
|
25
|
+
* @beta
|
|
26
|
+
*/
|
|
23
27
|
export class Logo extends UIContainerPlugin {
|
|
24
28
|
private hasStartedPlaying = false;
|
|
25
29
|
|
|
@@ -39,6 +39,7 @@ import fullscreenOnIcon from '../../../assets/icons/new/fullscreen-on.svg'
|
|
|
39
39
|
* @beta
|
|
40
40
|
*/
|
|
41
41
|
export type MediaControlElement =
|
|
42
|
+
| 'audioTracksSelector'
|
|
42
43
|
| 'bottomGear' // an alias of gear
|
|
43
44
|
| 'clipText'
|
|
44
45
|
| 'gear'
|
|
@@ -198,7 +199,7 @@ export class MediaControl extends UICorePlugin {
|
|
|
198
199
|
|
|
199
200
|
private get disabled() {
|
|
200
201
|
const playbackIsNOOP =
|
|
201
|
-
this.
|
|
202
|
+
this.core.activeContainer && this.core.activeContainer.getPlaybackType() === Playback.NO_OP
|
|
202
203
|
|
|
203
204
|
return this.userDisabled || playbackIsNOOP
|
|
204
205
|
}
|
|
@@ -1083,6 +1084,8 @@ export class MediaControl extends UICorePlugin {
|
|
|
1083
1084
|
*/
|
|
1084
1085
|
getElement(name: MediaControlElement): ZeptoResult | null {
|
|
1085
1086
|
switch (name) {
|
|
1087
|
+
case 'audioTracksSelector':
|
|
1088
|
+
return this.$audioTracksSelector
|
|
1086
1089
|
case 'clipText':
|
|
1087
1090
|
return this.$clipText
|
|
1088
1091
|
case 'bottomGear':
|
|
@@ -25,6 +25,9 @@ const VERSION = '0.0.1';
|
|
|
25
25
|
|
|
26
26
|
const T = 'plugins.media_control_multicamera';
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* The plugin adds support for loading multiple streams and switching between them using the media control UI.
|
|
30
|
+
*/
|
|
28
31
|
export class MultiCamera extends UICorePlugin {
|
|
29
32
|
private currentCamera: MediaSourceInfo | null = null;
|
|
30
33
|
|
|
@@ -9,31 +9,56 @@ import '../../../assets/picture-in-picture/button.scss';
|
|
|
9
9
|
|
|
10
10
|
const VERSION = '0.0.1';
|
|
11
11
|
|
|
12
|
-
const T = `plugins.
|
|
13
|
-
|
|
12
|
+
const T = `plugins.pip`;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Enables picture in picture mode.
|
|
16
|
+
* @beta
|
|
17
|
+
* @remarks
|
|
18
|
+
* Depends on:
|
|
19
|
+
*
|
|
20
|
+
* - {@link MediaControl}
|
|
21
|
+
*
|
|
22
|
+
* It renders a button to toggle picture in picture mode in the media control UI.
|
|
23
|
+
*/
|
|
14
24
|
export class PictureInPicture extends UICorePlugin {
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
15
28
|
get name() {
|
|
16
|
-
return '
|
|
29
|
+
return 'pip';
|
|
17
30
|
}
|
|
18
31
|
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
19
35
|
get supportedVersion() {
|
|
20
36
|
return { min: CLAPPR_VERSION };
|
|
21
37
|
}
|
|
22
38
|
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
23
42
|
static get version() {
|
|
24
43
|
return VERSION;
|
|
25
44
|
}
|
|
26
45
|
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
27
49
|
override get events() {
|
|
28
50
|
return {
|
|
29
51
|
'click button': 'togglePictureInPicture',
|
|
30
52
|
};
|
|
31
53
|
}
|
|
32
54
|
|
|
33
|
-
get videoElement() {
|
|
55
|
+
private get videoElement() {
|
|
34
56
|
return this.core.activePlayback.el;
|
|
35
57
|
}
|
|
36
58
|
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
37
62
|
override bindEvents() {
|
|
38
63
|
this.listenTo(this.core.mediaControl, Events.MEDIACONTROL_RENDERED, this.render);
|
|
39
64
|
}
|
|
@@ -47,6 +72,9 @@ export class PictureInPicture extends UICorePlugin {
|
|
|
47
72
|
return document.pictureInPictureEnabled && !!HTMLVideoElement.prototype.requestPictureInPicture;
|
|
48
73
|
}
|
|
49
74
|
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
50
78
|
override render() {
|
|
51
79
|
if (!this.isPiPSupported()) {
|
|
52
80
|
return this;
|
|
@@ -64,7 +92,7 @@ export class PictureInPicture extends UICorePlugin {
|
|
|
64
92
|
return this;
|
|
65
93
|
}
|
|
66
94
|
|
|
67
|
-
togglePictureInPicture() {
|
|
95
|
+
private togglePictureInPicture() {
|
|
68
96
|
trace(`${T} togglePictureInPicture`);
|
|
69
97
|
if (this.videoElement !== document.pictureInPictureElement) {
|
|
70
98
|
this.requestPictureInPicture();
|
|
@@ -73,14 +101,14 @@ export class PictureInPicture extends UICorePlugin {
|
|
|
73
101
|
}
|
|
74
102
|
}
|
|
75
103
|
|
|
76
|
-
requestPictureInPicture() {
|
|
104
|
+
private requestPictureInPicture() {
|
|
77
105
|
trace(`${T} requestPictureInPicture`, {
|
|
78
106
|
videoElement: !!this.videoElement,
|
|
79
107
|
});
|
|
80
108
|
this.videoElement.requestPictureInPicture();
|
|
81
109
|
}
|
|
82
110
|
|
|
83
|
-
exitPictureInPicture() {
|
|
111
|
+
private exitPictureInPicture() {
|
|
84
112
|
trace(`${T} exitPictureInPicture`);
|
|
85
113
|
document.exitPictureInPicture();
|
|
86
114
|
}
|
|
@@ -31,6 +31,19 @@ const DEFAULT_PLAYBACK_RATE = '1.0';
|
|
|
31
31
|
// TODO
|
|
32
32
|
const MEDIACONTROL_PLAYBACKRATE = 'playbackRate';
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Allows changing the playback speed of the video.
|
|
36
|
+
* @beta
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* Depends on:
|
|
40
|
+
*
|
|
41
|
+
* - {@link MediaControl | media_control}
|
|
42
|
+
*
|
|
43
|
+
* - {@link BottomGear | bottom_gear}
|
|
44
|
+
*
|
|
45
|
+
* It renders a button in the gear menu, which opens a dropdown with the available playback rates.
|
|
46
|
+
*/
|
|
34
47
|
export class PlaybackRate extends UICorePlugin {
|
|
35
48
|
private currentPlayback: Playback | null = null;
|
|
36
49
|
|
|
@@ -40,18 +53,29 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
40
53
|
|
|
41
54
|
private selectedRate: string = DEFAULT_PLAYBACK_RATE;
|
|
42
55
|
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
43
59
|
get name() {
|
|
44
|
-
return '
|
|
60
|
+
return 'playback_rate';
|
|
45
61
|
}
|
|
46
62
|
|
|
63
|
+
/**
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
47
66
|
get supportedVersion() {
|
|
48
67
|
return { min: CLAPPR_VERSION };
|
|
49
68
|
}
|
|
50
69
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
70
|
+
private static readonly template = template(pluginHtml);
|
|
71
|
+
|
|
72
|
+
private static readonly buttonTemplate = template(buttonHtml);
|
|
73
|
+
|
|
74
|
+
private static readonly listTemplate = template(listHtml);
|
|
54
75
|
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
55
79
|
override get attributes() {
|
|
56
80
|
return {
|
|
57
81
|
'class': this.name,
|
|
@@ -59,6 +83,9 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
59
83
|
};
|
|
60
84
|
}
|
|
61
85
|
|
|
86
|
+
/**
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
62
89
|
override get events() {
|
|
63
90
|
return {
|
|
64
91
|
'click .gear-sub-menu_btn': 'onRateSelect',
|
|
@@ -67,8 +94,12 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
67
94
|
};
|
|
68
95
|
}
|
|
69
96
|
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
70
100
|
override bindEvents() {
|
|
71
101
|
this.listenTo(this.core, 'gear:rendered', this.render);
|
|
102
|
+
// TODO this.core.getPlugin('media_control'), bottom_gear
|
|
72
103
|
this.listenTo(this.core.mediaControl, Events.MEDIACONTROL_CONTAINERCHANGED, this.reload);
|
|
73
104
|
this.listenTo(this.core.mediaControl, MEDIACONTROL_PLAYBACKRATE, this.updatePlaybackRate);
|
|
74
105
|
|
|
@@ -87,7 +118,7 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
87
118
|
}
|
|
88
119
|
}
|
|
89
120
|
|
|
90
|
-
unBindEvents() {
|
|
121
|
+
private unBindEvents() {
|
|
91
122
|
this.stopListening(this.core, 'gear:rendered', this.render);
|
|
92
123
|
this.stopListening(this.core.mediaControl, Events.MEDIACONTROL_CONTAINERCHANGED, this.reload);
|
|
93
124
|
this.stopListening(this.core, 'core:advertisement:start', this.onStartAd);
|
|
@@ -121,7 +152,7 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
121
152
|
}
|
|
122
153
|
}
|
|
123
154
|
|
|
124
|
-
reload() {
|
|
155
|
+
private reload() {
|
|
125
156
|
this.unBindEvents();
|
|
126
157
|
this.bindEvents();
|
|
127
158
|
}
|
|
@@ -136,6 +167,9 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
136
167
|
return !(this.currentPlayback?.tagName !== 'video' && this.currentPlayback?.tagName !== 'audio');
|
|
137
168
|
}
|
|
138
169
|
|
|
170
|
+
/**
|
|
171
|
+
* @internal
|
|
172
|
+
*/
|
|
139
173
|
override render() {
|
|
140
174
|
const container = this.core.activeContainer;
|
|
141
175
|
|
|
@@ -153,9 +187,7 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
153
187
|
}
|
|
154
188
|
|
|
155
189
|
if (this.shouldRender()) {
|
|
156
|
-
const
|
|
157
|
-
// const html = t({ playbackRates: this.playbackRates, title: this.getTitle() });
|
|
158
|
-
const button = t({
|
|
190
|
+
const button = PlaybackRate.buttonTemplate({
|
|
159
191
|
title: this.getTitle(),
|
|
160
192
|
speedIcon,
|
|
161
193
|
arrowRightIcon,
|
|
@@ -177,19 +209,19 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
177
209
|
return this;
|
|
178
210
|
}
|
|
179
211
|
|
|
180
|
-
onStartAd() {
|
|
212
|
+
private onStartAd() {
|
|
181
213
|
this.prevSelectedRate = this.selectedRate;
|
|
182
214
|
this.setSelectedRate('1.0');
|
|
183
215
|
this.listenToOnce(this.currentPlayback, Events.PLAYBACK_PLAY, this.onFinishAd);
|
|
184
216
|
}
|
|
185
217
|
|
|
186
|
-
onFinishAd() {
|
|
218
|
+
private onFinishAd() {
|
|
187
219
|
if (this.prevSelectedRate) {
|
|
188
220
|
this.setSelectedRate(this.prevSelectedRate);
|
|
189
221
|
}
|
|
190
222
|
}
|
|
191
223
|
|
|
192
|
-
onPlay() {
|
|
224
|
+
private onPlay() {
|
|
193
225
|
if (!this.core.mediaControl.$el.hasClass('dvr')) {
|
|
194
226
|
if (this.core.getPlaybackType() === Playback.LIVE) {
|
|
195
227
|
this.updatePlaybackRate(DEFAULT_PLAYBACK_RATE);
|
|
@@ -200,11 +232,10 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
200
232
|
}
|
|
201
233
|
}
|
|
202
234
|
|
|
203
|
-
onStop() {
|
|
204
|
-
|
|
235
|
+
private onStop() {
|
|
205
236
|
}
|
|
206
237
|
|
|
207
|
-
onRateSelect(event: MouseEvent) {
|
|
238
|
+
private onRateSelect(event: MouseEvent) {
|
|
208
239
|
event.stopPropagation();
|
|
209
240
|
const rate = (event.currentTarget as HTMLElement).dataset.rate;
|
|
210
241
|
if (rate) {
|
|
@@ -215,10 +246,8 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
215
246
|
return false;
|
|
216
247
|
}
|
|
217
248
|
|
|
218
|
-
onShowMenu() {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
this.$el.html(t({
|
|
249
|
+
private onShowMenu() {
|
|
250
|
+
this.$el.html(PlaybackRate.listTemplate({
|
|
222
251
|
playbackRates: this.playbackRates,
|
|
223
252
|
arrowLeftIcon,
|
|
224
253
|
checkIcon,
|
|
@@ -228,15 +257,15 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
228
257
|
this.highlightCurrentRate();
|
|
229
258
|
}
|
|
230
259
|
|
|
231
|
-
goBack() {
|
|
260
|
+
private goBack() {
|
|
232
261
|
this.core.trigger('gear:refresh');
|
|
233
262
|
}
|
|
234
263
|
|
|
235
|
-
updatePlaybackRate(rate: string) {
|
|
264
|
+
private updatePlaybackRate(rate: string) {
|
|
236
265
|
this.setSelectedRate(rate);
|
|
237
266
|
}
|
|
238
267
|
|
|
239
|
-
setSelectedRate(rate: string) {
|
|
268
|
+
private setSelectedRate(rate: string) {
|
|
240
269
|
// Set <video playbackRate="..."
|
|
241
270
|
this.core.$el.find('video,audio').get(0).playbackRate = rate;
|
|
242
271
|
this.selectedRate = rate;
|
|
@@ -244,7 +273,7 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
244
273
|
// Player.player.trigger('playbackRateChanged', rate);
|
|
245
274
|
}
|
|
246
275
|
|
|
247
|
-
getTitle() {
|
|
276
|
+
private getTitle() {
|
|
248
277
|
let title = this.selectedRate;
|
|
249
278
|
|
|
250
279
|
this.playbackRates.forEach((r) => {
|
|
@@ -256,7 +285,7 @@ export class PlaybackRate extends UICorePlugin {
|
|
|
256
285
|
return title;
|
|
257
286
|
}
|
|
258
287
|
|
|
259
|
-
highlightCurrentRate() {
|
|
288
|
+
private highlightCurrentRate() {
|
|
260
289
|
this.allRateElements().removeClass('current');
|
|
261
290
|
this.allRateElements().find('a').removeClass('gcore-skin-active');
|
|
262
291
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright 2014 Globo.com Player authors. All rights reserved.
|
|
2
2
|
// Use of this source code is governed by a BSD-style
|
|
3
|
-
// license that can be found
|
|
3
|
+
// license that can be found at https://github.com/clappr/clappr-plugins/blob/master/LICENSE
|
|
4
4
|
|
|
5
5
|
import { Events, Playback, UICorePlugin, Utils, template } from '@clappr/core';
|
|
6
6
|
import { TimeUpdate } from '../../playback.types.js';
|
|
@@ -13,6 +13,10 @@ import { ZeptoResult } from '../../utils/types.js';
|
|
|
13
13
|
|
|
14
14
|
const { formatTime } = Utils;
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* The plugin adds a seek time indicator to the media control UI.
|
|
18
|
+
* @beta
|
|
19
|
+
*/
|
|
16
20
|
export class SeekTime extends UICorePlugin {
|
|
17
21
|
get name() {
|
|
18
22
|
return 'media_control_seek_time';
|
|
@@ -9,6 +9,9 @@ import closeIcon from '../../../assets/icons/old/close-share.svg';
|
|
|
9
9
|
import fbIcon from '../../../assets/icons/old/fb.svg';
|
|
10
10
|
import twIcon from '../../../assets/icons/old/twitter.svg';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* The plugin adds a share button to the media control UI.
|
|
14
|
+
*/
|
|
12
15
|
export class Share extends UICorePlugin {
|
|
13
16
|
private hide = false;
|
|
14
17
|
|