@clickview/player 0.0.0-rc.1 → 0.0.0-rc.12
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/.eslintrc.json +3 -0
- package/.storybook/main.js +22 -0
- package/.storybook/preview-head.html +3 -0
- package/.storybook/stories/Base.stories.tsx +132 -0
- package/.storybook/stories/Clips.stories.tsx +64 -0
- package/.storybook/stories/Interactives.stories.tsx +65 -0
- package/.storybook/stories/Subtitles.stories.tsx +22 -0
- package/.storybook/stories/assets/chapters.vtt +19 -0
- package/.storybook/stories/assets/en.vtt +8 -0
- package/.storybook/stories/assets/es.vtt +8 -0
- package/.storybook/stories/assets/fr.vtt +8 -0
- package/.storybook/stories/assets/interactive.json +451 -0
- package/.storybook/stories/assets/sample_1280x720.mp4.jpg +0 -0
- package/.storybook/stories/assets/sample_1280x720.mp4.vtx +0 -0
- package/.storybook/stories/assets/thumbnails.vtt +62 -0
- package/.storybook/stories/assets/vertical.mp4 +0 -0
- package/.storybook/stories/utils/Wrap.tsx +18 -0
- package/.storybook/stories/utils/mock-playerapi.ts +238 -0
- package/.storybook/stories/utils/mock-setup.ts +16 -0
- package/dist/libs/analytics/src/Analytics.d.ts +10 -0
- package/dist/libs/analytics/src/AnalyticsHelper.d.ts +30 -0
- package/dist/libs/analytics/src/clients/CollectionApiClient.d.ts +48 -0
- package/dist/libs/analytics/src/constants/CountryRegionMapping.d.ts +7 -0
- package/dist/libs/analytics/src/constants/EventFirehose.d.ts +4 -0
- package/dist/libs/analytics/src/constants/GlobalChannels.d.ts +3 -0
- package/dist/libs/analytics/src/constants/Regions.d.ts +6 -0
- package/dist/libs/analytics/src/constants/Services.d.ts +4 -0
- package/dist/libs/analytics/src/enums/CountryCode.d.ts +5 -0
- package/dist/libs/analytics/src/enums/RegionName.d.ts +5 -0
- package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +319 -0
- package/dist/libs/analytics/src/interfaces/Config.d.ts +3 -0
- package/dist/libs/analytics/src/interfaces/Folder.d.ts +3 -0
- package/dist/libs/analytics/src/interfaces/HashObject.d.ts +3 -0
- package/dist/libs/analytics/src/interfaces/Owner.d.ts +3 -0
- package/dist/libs/analytics/src/interfaces/Playlist.d.ts +3 -0
- package/dist/libs/analytics/src/interfaces/Rating.d.ts +4 -0
- package/dist/libs/analytics/src/interfaces/Region.d.ts +5 -0
- package/dist/libs/analytics/src/interfaces/RegionalUrl.d.ts +5 -0
- package/dist/libs/analytics/src/interfaces/Resource.d.ts +5 -0
- package/dist/libs/analytics/src/interfaces/Series.d.ts +3 -0
- package/dist/libs/analytics/src/interfaces/Subtitle.d.ts +4 -0
- package/dist/libs/analytics/src/interfaces/User.d.ts +17 -0
- package/dist/libs/analytics/src/interfaces/VersionData.d.ts +4 -0
- package/dist/libs/analytics/src/interfaces/Video.d.ts +16 -0
- package/dist/libs/analytics/src/interfaces/index.d.ts +15 -0
- package/dist/libs/analytics/src/interfaces/primitives/BaseObject.d.ts +7 -0
- package/dist/libs/analytics/src/models/AnalyticsEvent.d.ts +49 -0
- package/dist/libs/analytics/src/models/CollectionEvent.d.ts +61 -0
- package/dist/libs/analytics/src/services/ContextService.d.ts +19 -0
- package/dist/libs/analytics/src/utils/CollectionApiClientHelper.d.ts +6 -0
- package/dist/libs/analytics/src/utils/DataFormatHelper.d.ts +14 -0
- package/dist/libs/analytics/src/utils/EventWhitelistHelper.d.ts +19 -0
- package/dist/libs/analytics/src/utils/TypeHelper.d.ts +4 -0
- package/dist/libs/analytics/src/utils/UploadDataFormatHelper.d.ts +10 -0
- package/dist/libs/analytics/src/utils/UrlHelper.d.ts +3 -0
- package/dist/libs/analytics/src/utils/UserAgentHelper.d.ts +10 -0
- package/dist/libs/analytics/src/utils/VideoDataFormatHelper.d.ts +42 -0
- package/dist/libs/common/src/backbone/constants/CommonChannels.d.ts +5 -0
- package/dist/libs/common/src/backbone/core/AppLink.d.ts +37 -0
- package/dist/libs/common/src/backbone/core/BaseAppRouter.d.ts +103 -0
- package/dist/libs/common/src/backbone/core/BaseApplication.d.ts +76 -0
- package/dist/libs/common/src/backbone/core/BaseBehavior.d.ts +6 -0
- package/dist/libs/common/src/backbone/core/BaseCollection.d.ts +7 -0
- package/dist/libs/common/src/backbone/core/BaseCollectionView.d.ts +16 -0
- package/dist/libs/common/src/backbone/core/BaseError.d.ts +18 -0
- package/dist/libs/common/src/backbone/core/BaseLayoutView.d.ts +11 -0
- package/dist/libs/common/src/backbone/core/BaseModel.d.ts +27 -0
- package/dist/libs/common/src/backbone/core/BaseNestedModel.d.ts +21 -0
- package/dist/libs/common/src/backbone/core/BaseService.d.ts +10 -0
- package/dist/libs/common/src/backbone/core/BaseView.d.ts +131 -0
- package/dist/libs/common/src/backbone/core/EventNames.d.ts +16 -0
- package/dist/libs/common/src/backbone/core/LayoutService.d.ts +31 -0
- package/dist/libs/common/src/backbone/core/ListenToRadio.d.ts +3 -0
- package/dist/libs/common/src/backbone/core/LocationUtils.d.ts +23 -0
- package/dist/libs/common/src/backbone/core/Middleware.d.ts +10 -0
- package/dist/libs/common/src/backbone/core/Shell.d.ts +79 -0
- package/dist/libs/common/src/backbone/core/Types.d.ts +12 -0
- package/dist/libs/common/src/backbone/core/index.d.ts +27 -0
- package/dist/libs/common/src/backbone/enums/DataServiceErrorType.d.ts +8 -0
- package/dist/libs/common/src/backbone/enums/HttpVerbs.d.ts +6 -0
- package/dist/libs/common/src/backbone/errors/DevError.d.ts +4 -0
- package/dist/libs/common/src/backbone/index.d.ts +2 -0
- package/dist/libs/common/src/backbone/interfaces/BaseCollectionIdentifier.d.ts +19 -0
- package/dist/libs/common/src/backbone/interfaces/ChainableDataService.d.ts +9 -0
- package/dist/libs/common/src/backbone/interfaces/DataCache.d.ts +8 -0
- package/dist/libs/common/src/backbone/interfaces/DataProvider.d.ts +15 -0
- package/dist/libs/common/src/backbone/interfaces/DataServiceError.d.ts +7 -0
- package/dist/libs/common/src/backbone/interfaces/DataServiceRequests.d.ts +218 -0
- package/dist/libs/common/src/backbone/interfaces/Pagination.d.ts +33 -0
- package/dist/libs/common/src/backbone/interfaces/StickitBinding.d.ts +38 -0
- package/dist/libs/common/src/backbone/interfaces/Xhr.d.ts +9 -0
- package/dist/libs/common/src/backbone/interfaces/index.d.ts +9 -0
- package/dist/libs/common/src/backbone/services/EnvironmentVariables.d.ts +13 -0
- package/dist/libs/common/src/backbone/utils/UrlHelper.d.ts +14 -0
- package/dist/libs/common/src/react/flight/enums/RequestStatus.d.ts +6 -0
- package/dist/libs/common/src/react/flight/enums/index.d.ts +1 -0
- package/dist/libs/common/src/react/flight/interfaces/FlightState.d.ts +22 -0
- package/dist/libs/common/src/react/flight/interfaces/NormalizeOptions.d.ts +4 -0
- package/dist/libs/common/src/react/flight/interfaces/Request.d.ts +29 -0
- package/dist/libs/common/src/react/flight/interfaces/UpdateStateOptions.d.ts +15 -0
- package/dist/libs/common/src/react/interfaces/ApplicationData.d.ts +3 -0
- package/dist/libs/common/src/react/interfaces/ApplicationState.d.ts +8 -0
- package/dist/libs/common/src/react/interfaces/BaseReducerActions.d.ts +4 -0
- package/dist/libs/common/src/react/interfaces/HashObject.d.ts +3 -0
- package/dist/libs/common/src/react/interfaces/index.d.ts +4 -0
- package/dist/libs/common/src/react/utils/ObjectHelper.d.ts +10 -0
- package/dist/libs/common/src/react/utils/RandomHelper.d.ts +3 -0
- package/dist/libs/shared/src/apps/notifications/enums/NotificationType.d.ts +16 -0
- package/dist/libs/shared/src/components/app-link/AppLink.d.ts +13 -0
- package/dist/libs/shared/src/components/lazy-image/LazyImage.d.ts +7 -0
- package/dist/libs/shared/src/components/thumbnails/base/BaseThumbnail.d.ts +25 -0
- package/dist/libs/shared/src/components/tooltip/Tooltip.d.ts +16 -0
- package/dist/libs/shared/src/components/widgets/items/resource-widget-item/ResourceWidgetItem.d.ts +17 -0
- package/dist/libs/shared/src/constants/AppVariables.d.ts +5 -0
- package/dist/libs/shared/src/enums/ClassificationType.d.ts +4 -0
- package/dist/libs/shared/src/enums/CountryCode.d.ts +5 -0
- package/dist/libs/shared/src/enums/CurriculumType.d.ts +6 -0
- package/dist/libs/shared/src/enums/CustomerType.d.ts +11 -0
- package/dist/libs/shared/src/enums/GlanceFormat.d.ts +3 -0
- package/dist/libs/shared/src/enums/Images.d.ts +26 -0
- package/dist/libs/shared/src/enums/MasterType.d.ts +61 -0
- package/dist/libs/shared/src/enums/MediaQueries.d.ts +20 -0
- package/dist/libs/shared/src/enums/ObjectStatus.d.ts +5 -0
- package/dist/libs/shared/src/enums/PlaylistPrivacy.d.ts +5 -0
- package/dist/libs/shared/src/enums/PresentationType.d.ts +4 -0
- package/dist/libs/shared/src/enums/ResourceFileType.d.ts +9 -0
- package/dist/libs/shared/src/enums/SettingKind.d.ts +4 -0
- package/dist/libs/shared/src/enums/SettingName.d.ts +17 -0
- package/dist/libs/shared/src/enums/ThemeType.d.ts +3 -0
- package/dist/libs/shared/src/enums/UserGroup.d.ts +5 -0
- package/dist/libs/shared/src/enums/UserRole.d.ts +15 -0
- package/dist/libs/shared/src/enums/WidgetContents.d.ts +10 -0
- package/dist/libs/shared/src/hooks/UseGetMediaQueryString.d.ts +2 -0
- package/dist/libs/shared/src/hooks/UseLazyLoad.d.ts +6 -0
- package/dist/libs/shared/src/hooks/UseMediaQuery.d.ts +1 -0
- package/dist/libs/shared/src/interfaces/AppLinkWithLabel.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/DialogOptions.d.ts +13 -0
- package/dist/libs/shared/src/interfaces/ImageUrls.d.ts +16 -0
- package/dist/libs/shared/src/interfaces/QueryParams.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/RegionalUrl.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/WidgetContext.d.ts +9 -0
- package/dist/libs/shared/src/interfaces/app-variables/BaseNotificationsAppVariables.d.ts +16 -0
- package/dist/libs/shared/src/interfaces/app-variables/BaseSearchAppVariables.d.ts +17 -0
- package/dist/libs/shared/src/interfaces/app-variables/index.d.ts +2 -0
- package/dist/libs/shared/src/interfaces/collections/AudienceCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/CategoryCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/ClassificationCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/ClassroomCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/ClassroomGroupCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/ClipCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/CompanyCollection.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/collections/CustomerCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/FolderCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/InteractiveCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/LibraryCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/LinkCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/PersonCollection.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/collections/PlaylistCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/PresentationAudienceCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/ResourceCollection.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/collections/SeriesCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/SubtitleCollection.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/collections/TagCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/UserCollection.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/collections/VideoCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/VideoHistoryCollection.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/collections/WidgetCollection.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/collections/YearGroupCollection.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/collections/index.d.ts +26 -0
- package/dist/libs/shared/src/interfaces/collections/primitives/BasePaginatedCollection.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/collections/primitives/index.d.ts +1 -0
- package/dist/libs/shared/src/interfaces/index.d.ts +13 -0
- package/dist/libs/shared/src/interfaces/models/Audience.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Avatar.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Banner.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Category.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Channel.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Classification.d.ts +21 -0
- package/dist/libs/shared/src/interfaces/models/Classroom.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/models/ClassroomGroup.d.ts +17 -0
- package/dist/libs/shared/src/interfaces/models/Clip.d.ts +8 -0
- package/dist/libs/shared/src/interfaces/models/Company.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Config.d.ts +13 -0
- package/dist/libs/shared/src/interfaces/models/Cover.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Curriculum.d.ts +18 -0
- package/dist/libs/shared/src/interfaces/models/Customer.d.ts +6 -0
- package/dist/libs/shared/src/interfaces/models/EntitySetting.d.ts +9 -0
- package/dist/libs/shared/src/interfaces/models/FileUpload.d.ts +20 -0
- package/dist/libs/shared/src/interfaces/models/Folder.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/models/Following.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/models/Glance.d.ts +9 -0
- package/dist/libs/shared/src/interfaces/models/Group.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/HeroBanner.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Image.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/models/InteractiveMetadata.d.ts +14 -0
- package/dist/libs/shared/src/interfaces/models/Language.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/models/LanguageConfig.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/models/Library.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/models/Link.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/models/Organisation.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Pdf.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/models/Person.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/PlayerViewKey.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Playlist.d.ts +19 -0
- package/dist/libs/shared/src/interfaces/models/Poster.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Presentation.d.ts +6 -0
- package/dist/libs/shared/src/interfaces/models/PresentationAudience.d.ts +6 -0
- package/dist/libs/shared/src/interfaces/models/Rating.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/models/Resource.d.ts +17 -0
- package/dist/libs/shared/src/interfaces/models/Restriction.d.ts +6 -0
- package/dist/libs/shared/src/interfaces/models/Season.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/models/Series.d.ts +10 -0
- package/dist/libs/shared/src/interfaces/models/Share.d.ts +9 -0
- package/dist/libs/shared/src/interfaces/models/Subject.d.ts +13 -0
- package/dist/libs/shared/src/interfaces/models/Subtitle.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/models/Tag.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/TallPoster.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/models/Theme.d.ts +14 -0
- package/dist/libs/shared/src/interfaces/models/Thumbnail.d.ts +6 -0
- package/dist/libs/shared/src/interfaces/models/User.d.ts +63 -0
- package/dist/libs/shared/src/interfaces/models/UserChannel.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/models/Video.d.ts +34 -0
- package/dist/libs/shared/src/interfaces/models/VideoHistory.d.ts +12 -0
- package/dist/libs/shared/src/interfaces/models/Widget.d.ts +16 -0
- package/dist/libs/shared/src/interfaces/models/YearGroup.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/models/index.d.ts +57 -0
- package/dist/libs/shared/src/interfaces/models/interactive/ActionableItem.d.ts +6 -0
- package/dist/libs/shared/src/interfaces/models/interactive/Interaction.d.ts +16 -0
- package/dist/libs/shared/src/interfaces/models/interactive/InteractionType.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/models/interactive/InteractionTypeId.d.ts +8 -0
- package/dist/libs/shared/src/interfaces/models/interactive/Interactive.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/models/interactive/Timepoint.d.ts +9 -0
- package/dist/libs/shared/src/interfaces/models/interactive/index.d.ts +6 -0
- package/dist/libs/shared/src/interfaces/models/primitives/BaseObject.d.ts +10 -0
- package/dist/libs/shared/src/interfaces/models/primitives/VirtualObject.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/models/primitives/index.d.ts +2 -0
- package/dist/libs/shared/src/interfaces/props/ViewProps.d.ts +8 -0
- package/dist/libs/shared/src/interfaces/props/index.d.ts +1 -0
- package/dist/libs/shared/src/interfaces/requests/CreateOrUpdateClipRequest.d.ts +6 -0
- package/dist/libs/shared/src/interfaces/requests/CreateViewKeyRequest.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/requests/ReorderRequest.d.ts +12 -0
- package/dist/libs/shared/src/interfaces/requests/UpdateObjectChannel.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/requests/UpdateObjectRating.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/requests/UpdateResourceRequest.d.ts +3 -0
- package/dist/libs/shared/src/interfaces/requests/UpdateVideoRequest.d.ts +9 -0
- package/dist/libs/shared/src/interfaces/requests/index.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/services/BaseConfigDataService.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/services/BaseLibraryDataService.d.ts +10 -0
- package/dist/libs/shared/src/interfaces/services/BaseSeriesDataService.d.ts +4 -0
- package/dist/libs/shared/src/interfaces/services/BaseSettingsDataService.d.ts +7 -0
- package/dist/libs/shared/src/interfaces/services/BaseUserDataService.d.ts +6 -0
- package/dist/libs/shared/src/interfaces/services/BaseVideoDataService.d.ts +5 -0
- package/dist/libs/shared/src/interfaces/services/BaseVideoUploadDataService.d.ts +8 -0
- package/dist/libs/shared/src/interfaces/services/index.d.ts +7 -0
- package/dist/libs/shared/src/utils/ImageHelper.d.ts +32 -0
- package/dist/player-app.css +2375 -0
- package/dist/player-app.js +6715 -0
- package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-item.d.ts +79 -0
- package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-items.d.ts +55 -0
- package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-load-progress.d.ts +55 -0
- package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-play-progress.d.ts +55 -0
- package/dist/projects/player/src/components/chapter-seek-bar/chapter-seek-bar.d.ts +1 -0
- package/dist/projects/player/src/components/chapters-button/chapter-menu-item.d.ts +60 -0
- package/dist/projects/player/src/components/chapters-button/chapters-button.d.ts +1 -0
- package/dist/projects/player/src/components/cog-button/cog-button.d.ts +41 -0
- package/dist/projects/player/src/components/collapserator/collapserator.d.ts +4 -0
- package/dist/projects/player/src/components/mouse-time-display/mouse-time-display.d.ts +3 -0
- package/dist/projects/player/src/components/next-video-menu-item/next-video-menu-item.d.ts +1 -0
- package/dist/projects/player/src/components/playback-rate-button/playback-rate-button.d.ts +1 -0
- package/dist/projects/player/src/components/progress-control/progress-control.d.ts +12 -0
- package/dist/projects/player/src/components/quality-selector/quality-button.d.ts +1 -0
- package/dist/projects/player/src/components/quality-selector/quality-menu-item.d.ts +17 -0
- package/dist/projects/player/src/components/subs-caps-button/subs-caps-button.d.ts +1 -0
- package/dist/projects/player/src/components/thumbnail-display/thumbnail-display.d.ts +66 -0
- package/dist/projects/player/src/components/time-tooltip/time-tooltip.d.ts +15 -0
- package/dist/projects/player/src/components/time-wrapper/time-wrapper.d.ts +1 -0
- package/dist/projects/player/src/index.d.ts +11 -0
- package/dist/projects/player/src/interfaces/CollapsibleComponent.d.ts +10 -0
- package/dist/projects/player/src/interfaces/NextVideo.d.ts +4 -0
- package/dist/projects/player/src/interfaces/models/ApiError.d.ts +4 -0
- package/dist/projects/player/src/interfaces/models/ClipData.d.ts +4 -0
- package/dist/projects/player/src/interfaces/models/PlaybackObject.d.ts +40 -0
- package/dist/projects/player/src/players/base-player.d.ts +68 -0
- package/dist/projects/player/src/players/create-clip-player.d.ts +16 -0
- package/dist/projects/player/src/players/interactive-player.d.ts +16 -0
- package/dist/projects/player/src/players/player.d.ts +26 -0
- package/dist/projects/player/src/plugins/clip-plugin/clip-plugin.d.ts +50 -0
- package/dist/projects/player/src/plugins/create-clip-plugin/components/clip-timepoint-selector/clip-timepoint-selector-handle.d.ts +54 -0
- package/dist/projects/player/src/plugins/create-clip-plugin/components/clip-timepoint-selector/clip-timepoint-selector.d.ts +90 -0
- package/dist/projects/player/src/plugins/create-clip-plugin/components/create-clip-seek-bar/create-clip-seek-bar.d.ts +14 -0
- package/dist/projects/player/src/plugins/create-clip-plugin/create-clip-plugin.d.ts +14 -0
- package/dist/projects/player/src/plugins/example-plugin/components/example-button/example-button.d.ts +1 -0
- package/dist/projects/player/src/plugins/example-plugin/components/example-react-button/example-react-button.d.ts +1 -0
- package/dist/projects/player/src/plugins/example-plugin/example-plugin.d.ts +2 -0
- package/dist/projects/player/src/plugins/fullscreen-on-rotate-plugin/fullscreen-on-rotate-plugin.d.ts +1 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-components.d.ts +5 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-short-answer.ts/create-short-answer.d.ts +11 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-type-selector/create-type-selector.d.ts +8 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/feedback/feedback.d.ts +7 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/incomplete-alert/incomplete-alert.d.ts +2 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/interactive/interactive-component.d.ts +1 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-item.d.ts +21 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-items.d.ts +66 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/timepoint/timepoint-component.d.ts +22 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/annotation/annotation-interaction.d.ts +3 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/image/image-interaction.d.ts +4 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/missing-word/missing-word-interaction.d.ts +10 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/multiple-choice/multiple-choice-interaction.d.ts +10 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/short-answer/short-answer-interaction.d.ts +9 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/view-components.d.ts +5 -0
- package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/view-interaction-heading/view-interaction-heading.d.ts +8 -0
- package/dist/projects/player/src/plugins/interactive-plugin/interactive-plugin.d.ts +1 -0
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/InteractionComponent.d.ts +3 -0
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/InteractionProps.d.ts +8 -0
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/InteractiveMode.d.ts +4 -0
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/SubmissionFunction.d.ts +2 -0
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/ValidationFunction.d.ts +2 -0
- package/dist/projects/player/src/plugins/interactive-plugin/interfaces/index.d.ts +5 -0
- package/dist/projects/player/src/plugins/interactive-plugin/utils/getInteractionComponents.d.ts +3 -0
- package/dist/projects/player/src/plugins/interactive-plugin/utils/getInteractionStateId.d.ts +2 -0
- package/dist/projects/player/src/plugins/interactive-plugin/utils/getSubmissionFunction.d.ts +3 -0
- package/dist/projects/player/src/plugins/interactive-plugin/utils/getTimepointStateId.d.ts +2 -0
- package/dist/projects/player/src/plugins/interactive-plugin/utils/getValidationFunction.d.ts +3 -0
- package/dist/projects/player/src/plugins/interactive-plugin/utils/useInteractiveTrack.d.ts +18 -0
- package/dist/projects/player/src/plugins/localcache-plugin/LocalCache.d.ts +12 -0
- package/dist/projects/player/src/plugins/localcache-plugin/compontents/local-cache-indicator.d.ts +1 -0
- package/dist/projects/player/src/plugins/localcache-plugin/localcache-middleware.d.ts +1 -0
- package/dist/projects/player/src/plugins/localcache-plugin/localcache-plugin.d.ts +62 -0
- package/dist/projects/player/src/plugins/next-video-plugin/components/up-next/up-next.d.ts +1 -0
- package/dist/projects/player/src/plugins/next-video-plugin/next-video-plugin.d.ts +52 -0
- package/dist/projects/player/src/plugins/open-externally-plugin/components/open-externally-button.d.ts +1 -0
- package/dist/projects/player/src/plugins/open-externally-plugin/interfaces/ExternalLinkOptions.d.ts +3 -0
- package/dist/projects/player/src/plugins/open-externally-plugin/open-externally-plugin.d.ts +1 -0
- package/dist/projects/player/src/plugins/persist-volume-plugin/persist-volume-plugin.d.ts +1 -0
- package/dist/projects/player/src/plugins/persist-volume-plugin/persist-volume-plugin.test.d.ts +1 -0
- package/dist/projects/player/src/plugins/progress-reporter-plugin/progress-reporter-plugin.d.ts +9 -0
- package/dist/projects/player/src/plugins/progressive-files-plugin/ProgressiveFilesPluginOptions.d.ts +4 -0
- package/dist/projects/player/src/plugins/progressive-files-plugin/ProgressiveRepresentation.d.ts +10 -0
- package/dist/projects/player/src/plugins/progressive-files-plugin/interfaces/Source.d.ts +6 -0
- package/dist/projects/player/src/plugins/progressive-files-plugin/progressive-files-plugin.d.ts +38 -0
- package/dist/projects/player/src/plugins/resources-plugin/components/resource-menu-item/resource-menu-item.d.ts +30 -0
- package/dist/projects/player/src/plugins/resources-plugin/components/resources-button/resources-button.d.ts +1 -0
- package/dist/projects/player/src/plugins/resources-plugin/resources-plugin.d.ts +14 -0
- package/dist/projects/player/src/plugins/touch-controls-plugin/components/touch-controls/touch-controls.d.ts +59 -0
- package/dist/projects/player/src/plugins/touch-controls-plugin/touch-controls-plugin.d.ts +1 -0
- package/dist/projects/player/src/react/CreateClipPlayer.d.ts +3 -0
- package/dist/projects/player/src/react/InteractivePlayer.d.ts +9 -0
- package/dist/projects/player/src/react/Player.d.ts +10 -0
- package/dist/projects/player/src/react/react-component.d.ts +11 -0
- package/dist/projects/player/src/services/analytics-service.d.ts +15 -0
- package/dist/projects/player/src/utils/ajax-helper.d.ts +6 -0
- package/dist/projects/player/src/utils/fn.d.ts +14 -0
- package/dist/projects/player/src/utils/formatTime.d.ts +5 -0
- package/dist/projects/player/src/utils/hotkeys.d.ts +5 -0
- package/dist/projects/player/src/utils/quality-helper.d.ts +19 -0
- package/dist/projects/player/src/utils/quality-helper.test.d.ts +1 -0
- package/dist/projects/player/src/utils/scrollbar-helper.d.ts +6 -0
- package/dist/projects/player/src/utils/track-helper.d.ts +7 -0
- package/dist/projects/player/test/players/test-player.d.ts +17 -0
- package/dist/projects/player/test/setupTests.d.ts +0 -0
- package/dist/projects/player/test/utils/test-helpers.d.ts +8 -0
- package/jest.config.js +13 -0
- package/package.json +22 -6
- package/test/players/test-player.ts +31 -0
- package/test/setupTests.ts +8 -0
- package/test/utils/test-helpers.ts +22 -0
- package/typings/libs/videojs-contrib-quality-levels.d.ts +29 -0
- package/dist/index.html +0 -19
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { LocalCacheAddress } from 'projects/player/interfaces/models/PlaybackObject';
|
|
2
|
+
import videojs, { VideoJsPlayer } from 'video.js';
|
|
3
|
+
import { LocalCache } from './LocalCache';
|
|
4
|
+
import 'projects/player/plugins/localcache-plugin/localcache-middleware';
|
|
5
|
+
import 'projects/player/plugins/localcache-plugin/compontents/local-cache-indicator';
|
|
6
|
+
declare const Plugin: {
|
|
7
|
+
new (player: VideoJsPlayer, options?: any): videojs.Plugin;
|
|
8
|
+
prototype: videojs.Plugin;
|
|
9
|
+
BASE_PLUGIN_NAME: string;
|
|
10
|
+
deregisterPlugin(name: string): void;
|
|
11
|
+
getPlugin(name: string): any;
|
|
12
|
+
getPluginVersion(name: string): string;
|
|
13
|
+
getPlugins(names?: string[]): {
|
|
14
|
+
[name: string]: videojs.Plugin;
|
|
15
|
+
};
|
|
16
|
+
isBasic(plugin: string | (() => any)): boolean;
|
|
17
|
+
registerPlugin<T, K>(name: string, plugin: (this: VideoJsPlayer, ...options: K[]) => T): (...options: K[]) => T;
|
|
18
|
+
registerPlugin<T_1 extends any>(name: string, plugin: T_1): () => T_1;
|
|
19
|
+
};
|
|
20
|
+
interface LocalCachePluginOptions {
|
|
21
|
+
localCacheAddresses: LocalCacheAddress[];
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare class LocalCachePlugin extends Plugin {
|
|
25
|
+
private localCaches_;
|
|
26
|
+
private activeLocalCache_;
|
|
27
|
+
private enabled_;
|
|
28
|
+
private logger_;
|
|
29
|
+
constructor(player: VideoJsPlayer, options?: LocalCachePluginOptions);
|
|
30
|
+
get isEnabled(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Enable local cache support
|
|
33
|
+
*/
|
|
34
|
+
enable(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Disable local cache support
|
|
37
|
+
*/
|
|
38
|
+
disable(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Get the active local cache
|
|
41
|
+
*/
|
|
42
|
+
getActiveLocalCache(): Promise<LocalCache | null>;
|
|
43
|
+
/**
|
|
44
|
+
* Resets the active local cache and starts the checks to find a new active local cache
|
|
45
|
+
*/
|
|
46
|
+
resetActiveLocalCache(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Clears the active local cache
|
|
49
|
+
*/
|
|
50
|
+
clearActiveLocalCache(): void;
|
|
51
|
+
dispose(): void;
|
|
52
|
+
private initialize;
|
|
53
|
+
private onPlayerError;
|
|
54
|
+
private getActiveLocalCacheInternal;
|
|
55
|
+
private onLocalCacheChange;
|
|
56
|
+
}
|
|
57
|
+
declare module 'video.js' {
|
|
58
|
+
interface VideoJsPlayer {
|
|
59
|
+
localCache(options?: LocalCachePluginOptions): LocalCachePlugin;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './up-next.scss';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import videojs, { VideoJsPlayer } from 'video.js';
|
|
2
|
+
import { NextVideo } from 'projects/player/interfaces/NextVideo';
|
|
3
|
+
import 'projects/player/plugins/next-video-plugin/components/up-next/up-next';
|
|
4
|
+
declare const Plugin: {
|
|
5
|
+
new (player: VideoJsPlayer, options?: any): videojs.Plugin;
|
|
6
|
+
prototype: videojs.Plugin;
|
|
7
|
+
BASE_PLUGIN_NAME: string;
|
|
8
|
+
deregisterPlugin(name: string): void;
|
|
9
|
+
getPlugin(name: string): any;
|
|
10
|
+
getPluginVersion(name: string): string;
|
|
11
|
+
getPlugins(names?: string[]): {
|
|
12
|
+
[name: string]: videojs.Plugin;
|
|
13
|
+
};
|
|
14
|
+
isBasic(plugin: string | (() => any)): boolean;
|
|
15
|
+
registerPlugin<T, K>(name: string, plugin: (this: VideoJsPlayer, ...options: K[]) => T): (...options: K[]) => T;
|
|
16
|
+
registerPlugin<T_1 extends any>(name: string, plugin: T_1): () => T_1;
|
|
17
|
+
};
|
|
18
|
+
declare class NextVideoPlugin extends Plugin {
|
|
19
|
+
private shouldPlayNextVideo;
|
|
20
|
+
private hasLocalStorage;
|
|
21
|
+
private chapterTrack;
|
|
22
|
+
private upNextRendered;
|
|
23
|
+
private upNextTimepoint;
|
|
24
|
+
/**
|
|
25
|
+
* @Matt These values are intended to be used to render the up next widget
|
|
26
|
+
* and to be called when the up next widget is clicked on
|
|
27
|
+
* or the video ends.
|
|
28
|
+
*
|
|
29
|
+
* Note: Cam suggested we check if there is a chapter called "Credits"
|
|
30
|
+
* and trigger the up next widget then, rather than in the last 5 seconds
|
|
31
|
+
*/
|
|
32
|
+
private nextVideo;
|
|
33
|
+
private callback;
|
|
34
|
+
constructor(player: VideoJsPlayer);
|
|
35
|
+
private initialize;
|
|
36
|
+
setNextVideo(nextVideo: NextVideo, callback: () => void): void;
|
|
37
|
+
getShouldPlayNext(): boolean;
|
|
38
|
+
setShouldPlayNext(val: boolean): void;
|
|
39
|
+
private setChapterTrack;
|
|
40
|
+
private bindListeners;
|
|
41
|
+
private unbindListeners;
|
|
42
|
+
private onTimeUpdate;
|
|
43
|
+
private showUpNext;
|
|
44
|
+
private hideUpNext;
|
|
45
|
+
private testHasLocalStorage;
|
|
46
|
+
}
|
|
47
|
+
declare module 'video.js' {
|
|
48
|
+
interface VideoJsPlayer {
|
|
49
|
+
nextVideoPlugin(): NextVideoPlugin;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './open-externally-button.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'projects/player/plugins/open-externally-plugin/components/open-externally-button';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/projects/player/src/plugins/persist-volume-plugin/persist-volume-plugin.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../plugins/persist-volume-plugin/persist-volume-plugin';
|
package/dist/projects/player/src/plugins/progressive-files-plugin/ProgressiveRepresentation.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Representation } from 'videojs-contrib-quality-levels';
|
|
2
|
+
import { Source } from 'projects/player/plugins/progressive-files-plugin/interfaces/Source';
|
|
3
|
+
import { ProgressiveFilesPlugin } from 'projects/player/plugins/progressive-files-plugin/progressive-files-plugin';
|
|
4
|
+
export declare class ProgressiveRepresentation implements Representation {
|
|
5
|
+
id: string;
|
|
6
|
+
private plugin;
|
|
7
|
+
private source;
|
|
8
|
+
constructor(plugin: ProgressiveFilesPlugin, source: Source);
|
|
9
|
+
enabled(enabled: boolean): boolean;
|
|
10
|
+
}
|
package/dist/projects/player/src/plugins/progressive-files-plugin/progressive-files-plugin.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import videojs, { VideoJsPlayer } from 'video.js';
|
|
2
|
+
import { Source } from 'projects/player/plugins/progressive-files-plugin/interfaces/Source';
|
|
3
|
+
import { ProgressiveFilesPluginOptions } from 'projects/player/plugins/progressive-files-plugin/ProgressiveFilesPluginOptions';
|
|
4
|
+
declare const Plugin: {
|
|
5
|
+
new (player: VideoJsPlayer, options?: any): videojs.Plugin;
|
|
6
|
+
prototype: videojs.Plugin;
|
|
7
|
+
BASE_PLUGIN_NAME: string;
|
|
8
|
+
deregisterPlugin(name: string): void;
|
|
9
|
+
getPlugin(name: string): any;
|
|
10
|
+
getPluginVersion(name: string): string;
|
|
11
|
+
getPlugins(names?: string[]): {
|
|
12
|
+
[name: string]: videojs.Plugin;
|
|
13
|
+
};
|
|
14
|
+
isBasic(plugin: string | (() => any)): boolean;
|
|
15
|
+
registerPlugin<T, K>(name: string, plugin: (this: VideoJsPlayer, ...options: K[]) => T): (...options: K[]) => T;
|
|
16
|
+
registerPlugin<T_1 extends any>(name: string, plugin: T_1): () => T_1;
|
|
17
|
+
};
|
|
18
|
+
export declare class ProgressiveFilesPlugin extends Plugin {
|
|
19
|
+
private sources;
|
|
20
|
+
private _currentSource;
|
|
21
|
+
private qualityLevels;
|
|
22
|
+
constructor(player: VideoJsPlayer, options: ProgressiveFilesPluginOptions);
|
|
23
|
+
get currentSource(): Source;
|
|
24
|
+
/**
|
|
25
|
+
* Sets the current player source. If the id cannot be found, the current source is returned
|
|
26
|
+
* @param id the id of the source to set
|
|
27
|
+
*/
|
|
28
|
+
setSource(id: string): Source;
|
|
29
|
+
getSourceById(id: string): Source;
|
|
30
|
+
private populateSources;
|
|
31
|
+
private sourceChangeUpdateQualityLevels;
|
|
32
|
+
}
|
|
33
|
+
declare module 'video.js' {
|
|
34
|
+
interface VideoJsPlayer {
|
|
35
|
+
progressiveFiles(options: ProgressiveFilesPluginOptions): void;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import videojs, { VideoJsPlayer } from 'video.js';
|
|
2
|
+
import { Core } from 'libs/common/core';
|
|
3
|
+
import { Resource } from 'libs/shared/interfaces';
|
|
4
|
+
import './resource-menu-item.scss';
|
|
5
|
+
interface ResourceMenuItemProps {
|
|
6
|
+
resource: Resource;
|
|
7
|
+
imageCdnUrl: string;
|
|
8
|
+
appLink: Core.AppLink;
|
|
9
|
+
}
|
|
10
|
+
declare const ClickableComponent: {
|
|
11
|
+
new (player: VideoJsPlayer, options?: videojs.ComponentOptions): videojs.ClickableComponent;
|
|
12
|
+
prototype: videojs.ClickableComponent;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Until we update to React 17, we need to wrap the above React component
|
|
16
|
+
* in a videojs ClickableComponent so that a native browser event listener
|
|
17
|
+
* will be bound.
|
|
18
|
+
*
|
|
19
|
+
* This is necessary because the mechanism of event delegation in React 16
|
|
20
|
+
* allows native browser event listeners to be triggered before the React event
|
|
21
|
+
* listeners, regardless of their position in the DOM tree.
|
|
22
|
+
*
|
|
23
|
+
* All of this means that the Menu component's click handler will be receive
|
|
24
|
+
* the event before the React component, blocking it.
|
|
25
|
+
*/
|
|
26
|
+
export declare class ResourceMenuItem extends ClickableComponent {
|
|
27
|
+
constructor(player: VideoJsPlayer, options: ResourceMenuItemProps);
|
|
28
|
+
createEl(): Element;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './resources-button.scss';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Core } from 'libs/common/core';
|
|
2
|
+
import { Resource } from 'libs/shared/interfaces';
|
|
3
|
+
import 'projects/player/plugins/resources-plugin/components/resources-button/resources-button';
|
|
4
|
+
interface ResourcesPluginOptions {
|
|
5
|
+
resources: Resource[];
|
|
6
|
+
imageCdnUrl: string;
|
|
7
|
+
resourceAppLink?: Core.AppLink;
|
|
8
|
+
}
|
|
9
|
+
declare module 'video.js' {
|
|
10
|
+
interface VideoJsPlayer {
|
|
11
|
+
resourcesPlugin(options: ResourcesPluginOptions): void;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import videojs, { VideoJsPlayer } from 'video.js';
|
|
2
|
+
import './touch-controls.scss';
|
|
3
|
+
declare const Component: {
|
|
4
|
+
new (player: VideoJsPlayer, options?: videojs.ComponentOptions, ready?: videojs.Component.ReadyCallback): videojs.Component;
|
|
5
|
+
prototype: videojs.Component;
|
|
6
|
+
getComponent(name: "Button" | "button"): {
|
|
7
|
+
new (player: VideoJsPlayer, options?: videojs.ComponentOptions): videojs.Button;
|
|
8
|
+
prototype: videojs.Button;
|
|
9
|
+
};
|
|
10
|
+
getComponent(name: "ClickableComponent" | "clickablecomponent"): {
|
|
11
|
+
new (player: VideoJsPlayer, options?: videojs.ComponentOptions): videojs.ClickableComponent;
|
|
12
|
+
prototype: videojs.ClickableComponent;
|
|
13
|
+
};
|
|
14
|
+
getComponent(name: "ModalDialog" | "modaldialog"): {
|
|
15
|
+
new (player: VideoJsPlayer, options?: videojs.ModalDialogOptions): videojs.ModalDialog;
|
|
16
|
+
prototype: videojs.ModalDialog;
|
|
17
|
+
};
|
|
18
|
+
getComponent(name: "Menu" | "menu"): {
|
|
19
|
+
new (player: VideoJsPlayer, options?: videojs.MenuOptions): videojs.Menu;
|
|
20
|
+
prototype: videojs.Menu;
|
|
21
|
+
};
|
|
22
|
+
getComponent(name: "MenuButton" | "menubutton"): {
|
|
23
|
+
new (player: VideoJsPlayer, options?: videojs.MenuButtonOptions): videojs.MenuButton;
|
|
24
|
+
prototype: videojs.MenuButton;
|
|
25
|
+
};
|
|
26
|
+
getComponent(name: "MenuItem" | "menuitem"): {
|
|
27
|
+
new (player: VideoJsPlayer, options?: videojs.MenuItemOptions): videojs.MenuItem;
|
|
28
|
+
prototype: videojs.MenuItem;
|
|
29
|
+
};
|
|
30
|
+
getComponent(name: "MouseTimeDisplay" | "mouseTimeDisplay"): {
|
|
31
|
+
new (player: VideoJsPlayer, options?: videojs.ComponentOptions): videojs.MouseTimeDisplay;
|
|
32
|
+
prototype: videojs.MouseTimeDisplay;
|
|
33
|
+
};
|
|
34
|
+
getComponent(name: "Spacer" | "spacer"): {
|
|
35
|
+
new (player: VideoJsPlayer, options?: videojs.ComponentOptions, ready?: videojs.Component.ReadyCallback): videojs.Spacer;
|
|
36
|
+
prototype: videojs.Spacer;
|
|
37
|
+
};
|
|
38
|
+
getComponent(name: "Player" | "player"): {
|
|
39
|
+
new (player: VideoJsPlayer, options?: import("video.js").VideoJsPlayerOptions): VideoJsPlayer;
|
|
40
|
+
prototype: VideoJsPlayer;
|
|
41
|
+
getTagSettings(tag: Element): any;
|
|
42
|
+
};
|
|
43
|
+
getComponent(name: "timeTooltip" | "TimeTooltip"): {
|
|
44
|
+
new (player: VideoJsPlayer, options?: videojs.ComponentOptions): videojs.TimeToolTip;
|
|
45
|
+
prototype: videojs.TimeToolTip;
|
|
46
|
+
};
|
|
47
|
+
getComponent(name: string): any;
|
|
48
|
+
registerComponent(name: string, ComponentToRegister: any): any;
|
|
49
|
+
};
|
|
50
|
+
export declare class TouchControls extends Component {
|
|
51
|
+
private el_;
|
|
52
|
+
private timeoutId;
|
|
53
|
+
constructor(player: VideoJsPlayer, options?: videojs.ComponentOptions);
|
|
54
|
+
buildCSSClass(): string;
|
|
55
|
+
createEl(tagName?: string, properties?: any, attributes?: any): Element;
|
|
56
|
+
setUi(amount: number, timeout: number): void;
|
|
57
|
+
removeText(): void;
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './components/touch-controls/touch-controls';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InteractiveMode } from 'projects/player/plugins/interactive-plugin/interfaces';
|
|
3
|
+
import { InteractivePlayer, InteractivePlayerOptions } from 'projects/player/players/interactive-player';
|
|
4
|
+
interface ClickViewInteractivePlayerProps {
|
|
5
|
+
onReady?: (player: InteractivePlayer) => void;
|
|
6
|
+
mode?: InteractiveMode;
|
|
7
|
+
}
|
|
8
|
+
export declare function ClickViewInteractivePlayer(props: InteractivePlayerOptions & ClickViewInteractivePlayerProps): React.ReactElement;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Player, PlayerOptions } from 'projects/player/players/player';
|
|
3
|
+
export interface ClickViewPlayerProps extends Omit<PlayerOptions, 'playerApi'> {
|
|
4
|
+
playerApi?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
onReady?: (player: Player) => void;
|
|
7
|
+
onError?: (error: any) => void;
|
|
8
|
+
onDispose?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function ClickViewPlayer(props: ClickViewPlayerProps): React.ReactElement;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import videojs, { VideoJsPlayer } from 'video.js';
|
|
3
|
+
import { HashObject } from 'libs/common/react/interfaces';
|
|
4
|
+
declare type BaseReactComponentCtor<T> = new (player: VideoJsPlayer, options?: T) => videojs.Component;
|
|
5
|
+
interface RootNodeOptions {
|
|
6
|
+
tagName?: string;
|
|
7
|
+
properties?: any;
|
|
8
|
+
attributes?: any;
|
|
9
|
+
}
|
|
10
|
+
export declare function getReactComponent<T extends HashObject>(componentCtor: (player: VideoJsPlayer, options?: T) => React.ReactElement, options?: RootNodeOptions): BaseReactComponentCtor<T>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ProgressEvent } from 'projects/player/plugins/progress-reporter-plugin/progress-reporter-plugin';
|
|
2
|
+
declare class StaticAnalyticsService {
|
|
3
|
+
private static instance;
|
|
4
|
+
private collectionApiClient;
|
|
5
|
+
constructor();
|
|
6
|
+
static get Instance(): StaticAnalyticsService;
|
|
7
|
+
logStream(): void;
|
|
8
|
+
logVideoProgress(events: ProgressEvent[]): void;
|
|
9
|
+
private initialize;
|
|
10
|
+
private setupCollectionApiClient;
|
|
11
|
+
private getCurrentUser;
|
|
12
|
+
private getActionContext;
|
|
13
|
+
}
|
|
14
|
+
export declare const AnalyticsService: StaticAnalyticsService;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wraps the given function, `fn`, with a new function that only invokes `fn`
|
|
3
|
+
* at most once per every `wait` milliseconds.
|
|
4
|
+
*
|
|
5
|
+
* @function
|
|
6
|
+
* @param {Function} fn
|
|
7
|
+
* The function to be throttled.
|
|
8
|
+
*
|
|
9
|
+
* @param {number} wait
|
|
10
|
+
* The number of milliseconds by which to throttle.
|
|
11
|
+
*
|
|
12
|
+
* @return {Function}
|
|
13
|
+
*/
|
|
14
|
+
export declare const throttle: (fn: any, wait: any) => any;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { QualityLevel, QualityLevelList } from 'videojs-contrib-quality-levels';
|
|
2
|
+
export declare class QualityHelper {
|
|
3
|
+
/**
|
|
4
|
+
* Returns a list of known profiles, ordered from best to worst
|
|
5
|
+
*/
|
|
6
|
+
static getKnownProfiles(): string[];
|
|
7
|
+
/**
|
|
8
|
+
* Enables the provided profile, or the next best option
|
|
9
|
+
* @param qualities
|
|
10
|
+
* @param profile The profile which we want to select
|
|
11
|
+
*/
|
|
12
|
+
static enableProfileOrNextBest(qualities: QualityLevelList, profile: string): QualityLevel | null;
|
|
13
|
+
/**
|
|
14
|
+
* Gets the next best quality for the given profile
|
|
15
|
+
* @param qualities
|
|
16
|
+
* @param profile
|
|
17
|
+
*/
|
|
18
|
+
private static getNextBestQuality;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VideoJsPlayer } from 'video.js';
|
|
2
|
+
declare type TrackKind = 'metadata' | 'chapters';
|
|
3
|
+
declare type TrackLabel = 'interactive' | 'thumbnails' | false;
|
|
4
|
+
export declare const TrackHelper: {
|
|
5
|
+
useTrack(player: VideoJsPlayer, kind: TrackKind, label: TrackLabel, callback: (track: TextTrack) => void): void;
|
|
6
|
+
};
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { VideoJsPlayer } from 'video.js';
|
|
2
|
+
import { BasePlayer, BasePlayerOptions } from '../../src/players/base-player';
|
|
3
|
+
export interface TestPlayerOptions extends BasePlayerOptions {
|
|
4
|
+
configurePlugins?: (player: VideoJsPlayer) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare class TestPlayer extends BasePlayer {
|
|
7
|
+
protected options: TestPlayerOptions;
|
|
8
|
+
player: VideoJsPlayer;
|
|
9
|
+
constructor(id: string | Element, options: TestPlayerOptions);
|
|
10
|
+
/**
|
|
11
|
+
* TODO: Look at reimplementing this. At the moment it's causing
|
|
12
|
+
* problems because the test will dispose of the player before the
|
|
13
|
+
* fetch has completed.
|
|
14
|
+
*/
|
|
15
|
+
protected fetch(): Promise<void>;
|
|
16
|
+
protected configurePlugins(): void;
|
|
17
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TestPlayer, TestPlayerOptions } from '../players/test-player';
|
|
2
|
+
interface PlayerOptions extends Omit<TestPlayerOptions, 'viewKey'> {
|
|
3
|
+
}
|
|
4
|
+
export declare const TestHelpers: {
|
|
5
|
+
makeEl(): HTMLElement;
|
|
6
|
+
makePlayer(playerOptions?: PlayerOptions, containerEl?: HTMLElement): TestPlayer;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
package/jest.config.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const getBaseConfig = require('../../libs/testing/jest.base.config');
|
|
2
|
+
const { compilerOptions } = require('./tsconfig');
|
|
3
|
+
|
|
4
|
+
const paths = { ...compilerOptions.paths };
|
|
5
|
+
|
|
6
|
+
delete paths['*'];
|
|
7
|
+
|
|
8
|
+
const baseConfig = getBaseConfig(paths);
|
|
9
|
+
|
|
10
|
+
module.exports = {
|
|
11
|
+
...baseConfig,
|
|
12
|
+
setupFilesAfterEnv: [...baseConfig.setupFilesAfterEnv, './test/setupTests.ts'],
|
|
13
|
+
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clickview/player",
|
|
3
|
-
"version": "0.0.0-rc.
|
|
3
|
+
"version": "0.0.0-rc.12",
|
|
4
4
|
"description": "ClickView Player",
|
|
5
5
|
"main": "dist/player-app.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "set NODE_ENV=development&& webpack -w --config ./tooling/webpack.config.js",
|
|
8
|
-
"build": "set NODE_ENV=production&&
|
|
8
|
+
"build": "set NODE_ENV=production&& webpack --config ./tooling/webpack.config.js",
|
|
9
|
+
"build-font": "set NODE_ENV=development&& npm run start",
|
|
9
10
|
"dev-build": "set NODE_ENV=development&& webpack --config ./tooling/webpack.config.js",
|
|
10
|
-
"
|
|
11
|
+
"storybook": "start-storybook -s ./.storybook/stories/assets -p 6006",
|
|
12
|
+
"build-storybook": "build-storybook",
|
|
13
|
+
"test": "jest",
|
|
14
|
+
"test-watch": "jest --watch",
|
|
15
|
+
"webpack-dev-server": "set NODE_ENV=development&& webpack-dev-server --config ./tooling/webpack.config.js"
|
|
11
16
|
},
|
|
12
17
|
"repository": {
|
|
13
18
|
"type": "git",
|
|
@@ -20,13 +25,24 @@
|
|
|
20
25
|
"author": "Matt Trengrove, Cameron Hill, Shale Kuzmanovski",
|
|
21
26
|
"license": "ISC",
|
|
22
27
|
"devDependencies": {
|
|
23
|
-
"@
|
|
28
|
+
"@babel/core": "7.11.6",
|
|
29
|
+
"@clickview/eslint-config": "1.0.0",
|
|
30
|
+
"@clickview/player-font": "0.0.1",
|
|
31
|
+
"@clickview/tooling": "0.0.19-rc.1",
|
|
32
|
+
"@storybook/react": "6.0.26",
|
|
33
|
+
"@types/simplebar": "5.1.1",
|
|
24
34
|
"@types/video.js": "7.3.11",
|
|
35
|
+
"jest": "26.1.0",
|
|
36
|
+
"ts-jest": "26.1.4",
|
|
25
37
|
"webpack-dev-server": "3.11.0"
|
|
26
38
|
},
|
|
27
39
|
"dependencies": {
|
|
28
|
-
"@clickview/styles": "1.0.
|
|
29
|
-
"
|
|
40
|
+
"@clickview/styles": "1.0.12-rc.1",
|
|
41
|
+
"keycode": "2.2.0",
|
|
42
|
+
"simplebar": "5.3.0",
|
|
43
|
+
"simplebar-react": "2.3.0",
|
|
44
|
+
"video.js": "7.8.4",
|
|
45
|
+
"videojs-contrib-quality-levels": "2.0.9"
|
|
30
46
|
},
|
|
31
47
|
"babel": {
|
|
32
48
|
"presets": [
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { VideoJsPlayer } from 'video.js';
|
|
2
|
+
import { BasePlayer, BasePlayerOptions } from '../../src/players/base-player';
|
|
3
|
+
|
|
4
|
+
export interface TestPlayerOptions extends BasePlayerOptions {
|
|
5
|
+
configurePlugins?: (player: VideoJsPlayer) => void;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class TestPlayer extends BasePlayer {
|
|
9
|
+
protected options: TestPlayerOptions;
|
|
10
|
+
|
|
11
|
+
public player: VideoJsPlayer;
|
|
12
|
+
|
|
13
|
+
constructor(id: string | Element, options: TestPlayerOptions) {
|
|
14
|
+
super(id, options);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* TODO: Look at reimplementing this. At the moment it's causing
|
|
19
|
+
* problems because the test will dispose of the player before the
|
|
20
|
+
* fetch has completed.
|
|
21
|
+
*/
|
|
22
|
+
protected async fetch(): Promise<void> {
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
protected configurePlugins(): void {
|
|
26
|
+
if (!(typeof this.options.configurePlugins === 'function'))
|
|
27
|
+
return;
|
|
28
|
+
|
|
29
|
+
this.options.configurePlugins(this.player);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Media playback isn't supported by the DOM provided by Jest
|
|
3
|
+
* so we mock the following functions.
|
|
4
|
+
*/
|
|
5
|
+
window.HTMLMediaElement.prototype.load = () => { };
|
|
6
|
+
window.HTMLMediaElement.prototype.play = (() => { }) as any;
|
|
7
|
+
window.HTMLMediaElement.prototype.pause = () => { };
|
|
8
|
+
window.HTMLMediaElement.prototype.addTextTrack = (() => { }) as any;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TestPlayer, TestPlayerOptions } from '../players/test-player';
|
|
2
|
+
|
|
3
|
+
interface PlayerOptions extends Omit<TestPlayerOptions, 'viewKey'> { }
|
|
4
|
+
|
|
5
|
+
export const TestHelpers = {
|
|
6
|
+
makeEl(): HTMLElement {
|
|
7
|
+
const el = document.createElement('div');
|
|
8
|
+
el.id = 'test-player';
|
|
9
|
+
return el;
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
makePlayer(playerOptions?: PlayerOptions, containerEl?: HTMLElement): TestPlayer {
|
|
13
|
+
containerEl = containerEl || TestHelpers.makeEl();
|
|
14
|
+
|
|
15
|
+
document.body.innerHTML = '';
|
|
16
|
+
document.body.appendChild(containerEl);
|
|
17
|
+
|
|
18
|
+
playerOptions = playerOptions || {};
|
|
19
|
+
|
|
20
|
+
return new TestPlayer(containerEl, playerOptions as TestPlayerOptions);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import videojs from 'video.js';
|
|
2
|
+
|
|
3
|
+
declare module 'video.js' {
|
|
4
|
+
export interface VideoJsPlayer {
|
|
5
|
+
qualityLevels(): QualityLevelList;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare module 'videojs-contrib-quality-levels' {
|
|
10
|
+
export interface QualityLevelList extends videojs.EventTarget {
|
|
11
|
+
[id: string]: QualityLevel;
|
|
12
|
+
selectedIndex: number;
|
|
13
|
+
length: number;
|
|
14
|
+
addQualityLevel(representation: Representation): QualityLevel;
|
|
15
|
+
removeQualityLevel(qualityLevel: QualityLevel): QualityLevel;
|
|
16
|
+
getQualityLevelById(id: string): QualityLevel;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface QualityLevel {
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Representation {
|
|
26
|
+
id: string;
|
|
27
|
+
enabled(enabled: boolean): boolean;
|
|
28
|
+
}
|
|
29
|
+
}
|