@bitmovin/player-web-x 10.0.0-beta.16 → 10.0.0-beta.18
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/README.md +44 -135
- package/bundles/playerx-bitmovin-v8-core.js +2 -2
- package/bundles/playerx-bitmovin-v8.js +2 -2
- package/bundles/playerx-core.js +2 -2
- package/bundles/playerx-dash.js +2 -2
- package/bundles/playerx-hls.js +2 -2
- package/bundles/playerx-tv.js +2 -2
- package/package.json +2 -2
- package/packages/playerx-adaptation.package.d.ts +1 -1
- package/packages/playerx-adaptation.package.js +2 -2
- package/packages/playerx-bitmovin-source-api.package.d.ts +1 -1
- package/packages/playerx-bitmovin-source-api.package.js +2 -2
- package/packages/playerx-bitmovin-ui.package.d.ts +1 -1
- package/packages/playerx-bitmovin-ui.package.js +2 -2
- package/packages/playerx-bitmovin-v8-core.package.d.ts +1 -1
- package/packages/playerx-bitmovin-v8-core.package.js +2 -2
- package/packages/playerx-bitmovin-v8-static-api.package.d.ts +1 -1
- package/packages/playerx-bitmovin-v8-static-api.package.js +2 -2
- package/packages/playerx-bitmovin-video-element-utils.package.d.ts +1 -1
- package/packages/playerx-bitmovin-video-element-utils.package.js +2 -2
- package/packages/playerx-capabilities.package.d.ts +1 -1
- package/packages/playerx-capabilities.package.js +2 -2
- package/packages/playerx-container-mp4.package.d.ts +1 -1
- package/packages/playerx-container-mp4.package.js +2 -2
- package/packages/playerx-container-ts.package.d.ts +1 -1
- package/packages/playerx-container-ts.package.js +2 -2
- package/packages/playerx-core.package.d.ts +1 -1
- package/packages/playerx-core.package.js +2 -2
- package/packages/playerx-dash-parsing.package.d.ts +1 -1
- package/packages/playerx-dash-parsing.package.js +2 -2
- package/packages/playerx-dash-translation.package.d.ts +1 -1
- package/packages/playerx-dash-translation.package.js +2 -2
- package/packages/playerx-dash.package.d.ts +1 -1
- package/packages/playerx-dash.package.js +2 -2
- package/packages/playerx-data.package.d.ts +1 -1
- package/packages/playerx-data.package.js +2 -2
- package/packages/playerx-event-bus.package.d.ts +1 -1
- package/packages/playerx-event-bus.package.js +2 -2
- package/packages/playerx-hls-parsing.package.d.ts +1 -1
- package/packages/playerx-hls-parsing.package.js +2 -2
- package/packages/playerx-hls-translation.package.d.ts +1 -1
- package/packages/playerx-hls-translation.package.js +2 -2
- package/packages/playerx-hls.package.d.ts +1 -1
- package/packages/playerx-hls.package.js +2 -2
- package/packages/playerx-network.package.d.ts +1 -1
- package/packages/playerx-network.package.js +2 -2
- package/packages/playerx-player-api.package.d.ts +1 -1
- package/packages/playerx-player-api.package.js +2 -2
- package/packages/playerx-presentation.package.d.ts +1 -1
- package/packages/playerx-presentation.package.js +2 -2
- package/packages/playerx-segment-processing.package.d.ts +1 -1
- package/packages/playerx-segment-processing.package.js +2 -2
- package/packages/playerx-source.package.d.ts +1 -1
- package/packages/playerx-source.package.js +2 -2
- package/packages/playerx-sources-api.package.d.ts +1 -1
- package/packages/playerx-sources-api.package.js +2 -2
- package/packages/playerx-trick-play.package.d.ts +1 -1
- package/packages/playerx-trick-play.package.js +2 -2
- package/packages/playerx-ts-transmuxer.package.d.ts +1 -1
- package/packages/playerx-ts-transmuxer.package.js +2 -2
- package/packages/playerx-tv.package.d.ts +1 -1
- package/packages/playerx-tv.package.js +2 -2
- package/packages/playerx-view-mode.package.d.ts +1 -1
- package/packages/playerx-view-mode.package.js +2 -2
- package/playerx-framework-utils.d.ts +1 -1
- package/playerx-framework-utils.js +1 -1
- package/types/FrameworkUtils.d.ts +3 -0
- package/types/{BaseTypes.d.ts → Types.d.ts} +0 -3
- package/types/bundles/BitmovinV8.bundle.d.ts +2 -2
- package/types/bundles/BitmovinV8Core.bundle.d.ts +2 -2
- package/types/bundles/Core.bundle.d.ts +1 -1
- package/types/bundles/Dash.bundle.d.ts +7 -8
- package/types/bundles/Hls.bundle.d.ts +7 -8
- package/types/bundles/Types.d.ts +5 -1
- package/types/{framework/core → packages}/Types.d.ts +2 -2
- package/types/packages/adaptation/Adaptation.package.d.ts +33 -0
- package/types/{framework/core → packages}/adaptation/AdaptationStateAtom.d.ts +4 -4
- package/types/packages/adaptation/AdaptationTask.d.ts +5 -0
- package/types/packages/adaptation/Types.d.ts +37 -0
- package/types/{framework/core → packages}/adaptation/WishConfigAtom.d.ts +4 -4
- package/types/{framework/core → packages}/capabilities/Capabilities.package.d.ts +4 -4
- package/types/packages/container/container-mp4/ContainerMp4.package.d.ts +35 -0
- package/types/packages/container/container-ts/ContainerTs.package.d.ts +32 -0
- package/types/packages/container/ts-transmuxer/TsTransmuxer.package.d.ts +33 -0
- package/types/{framework/core/source/Source.package.d.ts → packages/core/Core.package.d.ts} +8 -18
- package/types/packages/core/Types.d.ts +133 -0
- package/types/{framework/core → packages}/core/effects/EventListenerEffectFactory.d.ts +4 -4
- package/types/{framework/core → packages}/core/metrics/MetricsAtom.d.ts +4 -5
- package/types/{framework/core → packages}/core/network/NetworkAtom.d.ts +1 -1
- package/types/{framework/core → packages}/core/state/ArrayStateAtom.d.ts +1 -1
- package/types/{framework/core → packages}/core/state/QueueAtom.d.ts +1 -1
- package/types/packages/core/state/StoreEffectFactory.d.ts +5 -0
- package/types/{framework/core → packages}/core/state/Types.d.ts +1 -1
- package/types/{framework/core → packages}/core/state/codec-map/CodecMapAtom.d.ts +5 -5
- package/types/{framework/core → packages}/core/state/data-ranges/DataRangesAtom.d.ts +4 -4
- package/types/{framework/core → packages}/core/state/segment/SegmentAtom.d.ts +1 -1
- package/types/{framework/core → packages}/core/state/segment/SegmentDataAtom.d.ts +6 -7
- package/types/{framework/core → packages}/core/state/segment/SegmentTimingAtom.d.ts +1 -1
- package/types/{framework/core → packages}/core/state/segment/SegmentUtils.d.ts +4 -4
- package/types/{framework/core → packages}/core/state/selection-group/SelectionGroupAtom.d.ts +5 -5
- package/types/{framework/core → packages}/core/state/state-effect/StateEffectFactory.d.ts +4 -4
- package/types/{framework/core → packages}/core/state/state-effect/Types.d.ts +3 -3
- package/types/{framework/core → packages}/core/state/stream-timeline/StreamSectionAtom.d.ts +6 -6
- package/types/{framework/core → packages}/core/state/track/TrackAtom.d.ts +8 -8
- package/types/{framework/core → packages}/core/utils/CodecStringHelper.d.ts +6 -6
- package/types/{framework/core → packages}/core/utils/StateUtils.d.ts +6 -6
- package/types/packages/data/Data.package.d.ts +15 -0
- package/types/packages/data/Types.d.ts +46 -0
- package/types/packages/event-bus/EventBus.package.d.ts +16 -0
- package/types/{framework/core → packages}/event-bus/Types.d.ts +5 -5
- package/types/{framework/core → packages}/manifest/dash/parsing/DashParsing.package.d.ts +8 -7
- package/types/packages/manifest/dash/parsing/DashParsingTask.d.ts +2 -0
- package/types/packages/manifest/dash/root/Dash.package.d.ts +15 -0
- package/types/packages/manifest/dash/root/Types.d.ts +38 -0
- package/types/{framework/core → packages}/manifest/dash/translation/DashTranslation.package.d.ts +3 -22
- package/types/packages/manifest/dash/translation/Types.d.ts +22 -0
- package/types/packages/manifest/dash/translation/manifests/DashPlaylistTranslatorTask.d.ts +3 -0
- package/types/{framework/core → packages}/manifest/hls/parsing/HlsParsing.package.d.ts +8 -7
- package/types/packages/manifest/hls/parsing/HlsParsingTask.d.ts +2 -0
- package/types/packages/manifest/hls/root/Hls.package.d.ts +56 -0
- package/types/{framework/core → packages}/manifest/hls/translation/HlsTranslation.package.d.ts +11 -10
- package/types/{framework/core → packages}/manifest/hls/translation/manifests/HlsMultivariantPlaylistTranslatorTask.d.ts +1 -1
- package/types/{framework/core → packages}/manifest/hls/translation/manifests/HlsVariantTranslationTask.d.ts +1 -1
- package/types/packages/network/FetchTask.d.ts +4 -0
- package/types/packages/network/Network.package.d.ts +12 -0
- package/types/{framework/core → packages}/network/NetworkTask.d.ts +2 -3
- package/types/{framework/core → packages}/network/Types.d.ts +29 -2
- package/types/packages/player-api/PlayerApi.package.d.ts +29 -0
- package/types/packages/presentation/Presentation.package.d.ts +62 -0
- package/types/packages/segment-processing/SegmentProcessing.package.d.ts +28 -0
- package/types/{framework/core → packages}/segment-processing/Types.d.ts +9 -9
- package/types/packages/source/Source.package.d.ts +25 -0
- package/types/{framework/core → packages}/source/SourceReference.d.ts +9 -8
- package/types/{framework/core → packages}/source/Types.d.ts +12 -11
- package/types/{framework/core → packages}/source/atoms/BufferConfigAtom.d.ts +5 -5
- package/types/{framework/core → packages}/source/atoms/MediaTypeMapAtom.d.ts +5 -5
- package/types/{framework/core → packages}/source/atoms/PlaybackConfigAtom.d.ts +1 -1
- package/types/{framework/core → packages}/source/atoms/SourceStateAtom.d.ts +8 -8
- package/types/packages/sources-api/SourcesApi.package.d.ts +12 -0
- package/types/packages/sources-api/Types.d.ts +102 -0
- package/types/{framework/core → packages}/sources-api/VideoElementUtils.d.ts +1 -1
- package/types/packages/trick-play/TrickPlay.package.d.ts +37 -0
- package/types/packages/tv/Tv.package.d.ts +28 -0
- package/types/packages/v8-compat/BitmovinUi.package.d.ts +20 -0
- package/types/{framework/player/bitmovin-v8-compat → packages/v8-compat}/BitmovinV8Core.package.d.ts +2 -2
- package/types/packages/v8-compat/BitmovinV8StaticApi.package.d.ts +49 -0
- package/types/{framework/player/bitmovin-v8-compat → packages/v8-compat}/event-handling/EventListenerAtom.d.ts +2 -2
- package/types/packages/v8-compat/source-api/BitmovinSourceApi.package.d.ts +39 -0
- package/types/{framework/player/bitmovin-v8-compat → packages/v8-compat}/types/Types.d.ts +1 -1
- package/types/{framework/player/bitmovin-v8-compat → packages/v8-compat}/video-element/BitmovinVideoElementUtils.package.d.ts +12 -10
- package/types/packages/view-mode/ViewMode.package.d.ts +36 -0
- package/bundles/playerx-playlist.d.ts +0 -1
- package/bundles/playerx-playlist.js +0 -10
- package/packages/playerx-playback-state.package.d.ts +0 -1
- package/packages/playerx-playback-state.package.js +0 -10
- package/packages/playerx-playlist.package.d.ts +0 -1
- package/packages/playerx-playlist.package.js +0 -10
- package/packages/playerx-resize-tracker.package.d.ts +0 -1
- package/packages/playerx-resize-tracker.package.js +0 -10
- package/types/bundles/Playlist.bundle.d.ts +0 -23
- package/types/framework/FrameworkUtils.d.ts +0 -3
- package/types/framework/Types.d.ts +0 -50
- package/types/framework/core/adaptation/Adaptation.package.d.ts +0 -64
- package/types/framework/core/container/container-mp4/ContainerMp4.package.d.ts +0 -34
- package/types/framework/core/container/container-ts/ContainerTs.package.d.ts +0 -31
- package/types/framework/core/container/ts-transmuxer/TsTransmuxer.package.d.ts +0 -32
- package/types/framework/core/core/Core.package.d.ts +0 -138
- package/types/framework/core/core/state/StoreEffectFactory.d.ts +0 -5
- package/types/framework/core/data/Data.package.d.ts +0 -53
- package/types/framework/core/event-bus/EventBus.package.d.ts +0 -8
- package/types/framework/core/manifest/dash/parsing/DashParsingTask.d.ts +0 -2
- package/types/framework/core/manifest/dash/root/Dash.package.d.ts +0 -47
- package/types/framework/core/manifest/dash/root/Types.d.ts +0 -3
- package/types/framework/core/manifest/dash/translation/Types.d.ts +0 -3
- package/types/framework/core/manifest/dash/translation/manifests/DashPlaylistTranslatorTask.d.ts +0 -3
- package/types/framework/core/manifest/hls/parsing/HlsParsingTask.d.ts +0 -2
- package/types/framework/core/manifest/hls/root/Hls.package.d.ts +0 -52
- package/types/framework/core/network/FetchTask.d.ts +0 -5
- package/types/framework/core/network/Network.package.d.ts +0 -33
- package/types/framework/core/player-api/PlayerApi.package.d.ts +0 -19
- package/types/framework/core/presentation/Presentation.package.d.ts +0 -59
- package/types/framework/core/segment-processing/SegmentProcessing.package.d.ts +0 -28
- package/types/framework/core/sources-api/SourcesApi.package.d.ts +0 -63
- package/types/framework/core/sources-api/Types.d.ts +0 -68
- package/types/framework/core/trick-play/TrickPlay.package.d.ts +0 -35
- package/types/framework/core/view-mode/ViewMode.package.d.ts +0 -23
- package/types/framework/player/bitmovin-v8-compat/BitmovinUi.package.d.ts +0 -20
- package/types/framework/player/bitmovin-v8-compat/BitmovinV8StaticApi.package.d.ts +0 -47
- package/types/framework/player/bitmovin-v8-compat/source-api/BitmovinSourceApi.package.d.ts +0 -37
- package/types/framework/player/playback-state/PlaybackState.package.d.ts +0 -40
- package/types/framework/player/playback-state/PlaybackStateAtom.d.ts +0 -40
- package/types/framework/player/playback-state/Types.d.ts +0 -7
- package/types/framework/player/playback-state/VideoElementStateAtom.d.ts +0 -9
- package/types/framework/player/playlist/Playlist.package.d.ts +0 -31
- package/types/framework/player/playlist/Types.d.ts +0 -13
- package/types/framework/player/resize-tracker/ResizeObserverEffectFactory.d.ts +0 -11
- package/types/framework/player/resize-tracker/ResizeTracker.package.d.ts +0 -38
- package/types/framework/player/resize-tracker/ResizeTrackerStateAtom.d.ts +0 -9
- package/types/framework/player/resize-tracker/VideoElementStateAtom.d.ts +0 -9
- package/types/framework/player/tv/Tv.package.d.ts +0 -26
- /package/types/{framework/core → packages}/adaptation/RingBufferAtom.d.ts +0 -0
- /package/types/{framework/core → packages}/adaptation/WishDataAtom.d.ts +0 -0
- /package/types/{framework/core → packages}/capabilities/Types.d.ts +0 -0
- /package/types/{framework/core → packages}/container/container-ts/processors/Constants.d.ts +0 -0
- /package/types/{framework/core → packages}/container/container-ts/processors/Types.d.ts +0 -0
- /package/types/{framework/core → packages}/container/container-ts/processors/packet-parsing/PacketParserData.d.ts +0 -0
- /package/types/{framework/core → packages}/container/container-ts/processors/payload-parsing/Types.d.ts +0 -0
- /package/types/{framework/core → packages}/container/container-ts/processors/readers/ChunkCursor.d.ts +0 -0
- /package/types/{framework/core → packages}/container/container-ts/processors/readers/PacketCursor.d.ts +0 -0
- /package/types/{framework/core → packages}/core/Constants.d.ts +0 -0
- /package/types/{framework/core → packages}/core/FrameworkError.d.ts +0 -0
- /package/types/{framework/core → packages}/core/metrics/network/NetworkSampleAtom.d.ts +0 -0
- /package/types/{framework/core → packages}/core/state/MapStateAtom.d.ts +0 -0
- /package/types/{framework/core → packages}/core/state/PrimitiveAtom.d.ts +0 -0
- /package/types/{framework/core → packages}/core/state/Symbols.d.ts +0 -0
- /package/types/{framework/core → packages}/core/state/data-stream/DataStreamAtom.d.ts +0 -0
- /package/types/{framework/core → packages}/core/state/segment/SegmentTypeGuards.d.ts +0 -0
- /package/types/{framework/core → packages}/core/state/selection-group/SelectionGroupTypeGuards.d.ts +0 -0
- /package/types/{framework/core → packages}/core/state/selection-group/SelectionGroupUtils.d.ts +0 -0
- /package/types/{framework/core → packages}/core/state/stream/StreamAtom.d.ts +0 -0
- /package/types/{framework/core → packages}/core/state/stream-timeline/StreamSequenceMapAtom.d.ts +0 -0
- /package/types/{framework/core → packages}/core/state/stream-timeline/StreamTimelineMapAtom.d.ts +0 -0
- /package/types/{framework/core → packages}/core/state/track/TrackTypeGuards.d.ts +0 -0
- /package/types/{framework/core → packages}/core/utils/ArrayHelper.d.ts +0 -0
- /package/types/{framework/core → packages}/core/utils/FormatError.d.ts +0 -0
- /package/types/{framework/core → packages}/core/utils/Logger.d.ts +0 -0
- /package/types/{framework/core → packages}/core/utils/RangesHelper.d.ts +0 -0
- /package/types/{framework/core → packages}/core/utils/StringHelper.d.ts +0 -0
- /package/types/{framework/core → packages}/core/utils/TypedArrayHelper.d.ts +0 -0
- /package/types/{framework/core → packages}/core/utils/Types.d.ts +0 -0
- /package/types/{framework/core → packages}/core/utils/UrlHelper.d.ts +0 -0
- /package/types/{framework/core → packages}/event-bus/EventBus.d.ts +0 -0
- /package/types/{framework/core → packages}/manifest/dash/parsing/Errors.d.ts +0 -0
- /package/types/{framework/core → packages}/manifest/dash/parsing/Types.d.ts +0 -0
- /package/types/{framework/core → packages}/manifest/hls/parsing/Errors.d.ts +0 -0
- /package/types/{framework/core → packages}/manifest/hls/parsing/HlsParsingFunctions.d.ts +0 -0
- /package/types/{framework/core → packages}/manifest/hls/parsing/Types.d.ts +0 -0
- /package/types/{framework/core → packages}/manifest/hls/parsing/m3u8/AbstractStream.d.ts +0 -0
- /package/types/{framework/core → packages}/manifest/hls/parsing/m3u8/DefaultTagParsers.d.ts +0 -0
- /package/types/{framework/core → packages}/manifest/hls/parsing/m3u8/TranslatorStream.d.ts +0 -0
- /package/types/{framework/core → packages}/manifest/hls/root/Types.d.ts +0 -0
- /package/types/{framework/core → packages}/manifest/hls/translation/Types.d.ts +0 -0
- /package/types/{framework/core → packages}/network/NetworkMessageTypes.d.ts +0 -0
- /package/types/{framework/core → packages}/player-api/Types.d.ts +0 -0
- /package/types/{framework/core → packages}/presentation/Types.d.ts +0 -0
- /package/types/{framework/core → packages}/presentation/cache/Types.d.ts +0 -0
- /package/types/{framework/core → packages}/segment-processing/Errors.d.ts +0 -0
- /package/types/{framework/core → packages}/segment-processing/SegmentProcessingComponent.d.ts +0 -0
- /package/types/{framework/core → packages}/source/atoms/PlaybackAtom.d.ts +0 -0
- /package/types/{framework/core → packages}/source/atoms/PlayheadAtom.d.ts +0 -0
- /package/types/{framework/core → packages}/source/atoms/SourceConfigAtom.d.ts +0 -0
- /package/types/{framework/core → packages}/source/atoms/StartupOptionsAtom.d.ts +0 -0
- /package/types/{framework/core → packages}/source/atoms/VideoElementAtom.d.ts +0 -0
- /package/types/{framework/player/bitmovin-v8-compat → packages/v8-compat}/apis/BufferApi.d.ts +0 -0
- /package/types/{framework/player/bitmovin-v8-compat → packages/v8-compat}/apis/DrmApi.d.ts +0 -0
- /package/types/{framework/player/bitmovin-v8-compat → packages/v8-compat}/apis/ManifestApi.d.ts +0 -0
- /package/types/{framework/player/bitmovin-v8-compat → packages/v8-compat}/apis/SubtitleApi.d.ts +0 -0
- /package/types/{framework/player/bitmovin-v8-compat → packages/v8-compat}/enums/PlayerExports.d.ts +0 -0
- /package/types/{framework/player/bitmovin-v8-compat → packages/v8-compat}/types/AdvertisingConfig.d.ts +0 -0
- /package/types/{framework/player/bitmovin-v8-compat → packages/v8-compat}/types/DrmConfig.d.ts +0 -0
- /package/types/{framework/player/bitmovin-v8-compat → packages/v8-compat}/types/NetworkConfig.d.ts +0 -0
- /package/types/{framework/player/bitmovin-v8-compat → packages/v8-compat}/types/PlayerConfig.d.ts +0 -0
- /package/types/{framework/core → packages}/view-mode/Types.d.ts +0 -0
- /package/types/{framework/core → packages}/view-mode/ViewModeAtom.d.ts +0 -0
package/README.md
CHANGED
|
@@ -2,141 +2,51 @@
|
|
|
2
2
|
|
|
3
3
|
The next-gen Bitmovin web player.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Player Web X (PWX for short) is a new video player for the web that we at Bitmovin developed. It is based on an in-house developed library that we call the Phoenix Framework.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The Phoenix Framework is built from the ground up with fundamentals such as structured concurrency, an effect system and a package first architecture in mind that facilitates extensibility. Player Web X is built on a state-driven architecture that is built on top of the framework. Player Web X is developed with focus on making a highly performant player, with different, smaller and purpose built bundles comprised of different packages, as well as a Package API. Package API allows custom behaviours and functionalities to be built externally to the player, enabling our customers to support their own use cases without ever needing our help.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Currently, Player Web X has support for HLS streams that use the fMP4 and TS segment formats and partial support for DASH streams and muxed content. For a more detailed and complete listing of supported features, please refer to the [Support Matrix](https://developer.bitmovin.com/playback/docs/player-web-x-support-matrix).
|
|
10
10
|
|
|
11
|
-
If that's what you need, you are in luck, as it's a high performance player. So let's dive into how to implement it in your web application or page.
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
To learn more about the framework and the player, checkout our [full documentation](https://developer.bitmovin.com/playback/docs/about-player-web-x).
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
## Getting started
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
The easiest way of getting started with Player Web X is to use our bundles from cdn and a simple HTML page to embed the player on.
|
|
17
|
+
You can read more about different approaches in our [getting started page](https://developer.bitmovin.com/playback/docs/player-web-x-getting-started).
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
But here we will cover only be covering the use of npm package to bundle the player into your app.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
### Using the npm package
|
|
22
22
|
|
|
23
|
-
This
|
|
23
|
+
This example shows how to use the monolithic player from npm. First you will need to install the player to your project
|
|
24
24
|
|
|
25
|
-
```html
|
|
26
|
-
<!DOCTYPE html>
|
|
27
|
-
<html lang="en">
|
|
28
|
-
<head>
|
|
29
|
-
<title>Bitmovin Player Web X Demo</title>
|
|
30
|
-
<script type="text/javascript" src="./bundles/playerx-hls.js"></script>
|
|
31
|
-
<style>
|
|
32
|
-
#player-container {
|
|
33
|
-
width: 95%;
|
|
34
|
-
margin: 20px auto;
|
|
35
|
-
}
|
|
36
|
-
video {
|
|
37
|
-
display: block;
|
|
38
|
-
}
|
|
39
|
-
</style>
|
|
40
|
-
</head>
|
|
41
|
-
<body>
|
|
42
|
-
<div id="player-container"></div>
|
|
43
|
-
|
|
44
|
-
<script type="text/javascript">
|
|
45
|
-
const player = bitmovin.playerx.Player({
|
|
46
|
-
key: 'YOUR-PLAYER-KEY',
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const source = player.sources.add('https://cdn.bitmovin.com/content/assets/streams-sample-video/tos/m3u8/index.m3u8');
|
|
50
|
-
</script>
|
|
51
|
-
</body>
|
|
52
|
-
</html>
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
The following example, by contrast, loads the packages one by one, effectively building a player out of its constituent parts. This would allow you to build targeted players for streams with different formats or features for example, while remaining as lightweight as possible.
|
|
56
|
-
|
|
57
|
-
All our packages are connected to the `bitmovin.playerx` namespace here, but that is a configuration choice. Third-party package authors can use different namespaces without a problem.
|
|
58
|
-
|
|
59
|
-
### Package Example
|
|
60
|
-
```html
|
|
61
|
-
<!DOCTYPE html>
|
|
62
|
-
<html lang="en">
|
|
63
|
-
<head>
|
|
64
|
-
<title>Bitmovin Player Web X Demo</title>
|
|
65
|
-
<meta charset="UTF-8"/>
|
|
66
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
67
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
68
|
-
<script type="text/javascript" src="./bundles/playerx-core.js"></script>
|
|
69
|
-
<script type="text/javascript" src="./packages/playerx-capabilities.package.js"></script>
|
|
70
|
-
<script type="text/javascript" src="./packages/playerx-segment-processing.package.js"></script>
|
|
71
|
-
<script type="text/javascript" src="./packages/playerx-container-mp4.package.js"></script>
|
|
72
|
-
<script type="text/javascript" src="./packages/playerx-data.package.js"></script>
|
|
73
|
-
<script type="text/javascript" src="./packages/playerx-network.package.js"></script>
|
|
74
|
-
<script type="text/javascript" src="./packages/playerx-hls-translation.package.js"></script>
|
|
75
|
-
<script type="text/javascript" src="./packages/playerx-hls-parsing.package.js"></script>
|
|
76
|
-
<script type="text/javascript" src="./packages/playerx-hls.package.js"></script>
|
|
77
|
-
<script type="text/javascript" src="./packages/playerx-presentation.package.js"></script>
|
|
78
|
-
<script type="text/javascript" src="./packages/playerx-source.package.js"></script>
|
|
79
|
-
<script type="text/javascript" src="./packages/playerx-sources-api.package.js"></script>
|
|
80
|
-
<script type="text/javascript" src="./packages/playerx-adaptation.package.js"></script>
|
|
81
|
-
|
|
82
|
-
<style>
|
|
83
|
-
#player-container {
|
|
84
|
-
width: 95%;
|
|
85
|
-
margin: 20px auto;
|
|
86
|
-
box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
|
|
87
|
-
}
|
|
88
|
-
video {
|
|
89
|
-
display: block;
|
|
90
|
-
}
|
|
91
|
-
</style>
|
|
92
|
-
</head>
|
|
93
|
-
<body>
|
|
94
|
-
<div id="player-container"></div>
|
|
95
|
-
<script type="text/javascript">
|
|
96
|
-
const player = bitmovin.playerx.Player({
|
|
97
|
-
key: 'YOUR-PLAYER-KEY',
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
player.packages.add(bitmovin.playerx['capabilities'].default);
|
|
101
|
-
player.packages.add(bitmovin.playerx['segment-processing'].default);
|
|
102
|
-
player.packages.add(bitmovin.playerx['container-mp4'].default);
|
|
103
|
-
player.packages.add(bitmovin.playerx['data'].default);
|
|
104
|
-
player.packages.add(bitmovin.playerx['network'].default);
|
|
105
|
-
player.packages.add(bitmovin.playerx['hls-translation'].default);
|
|
106
|
-
player.packages.add(bitmovin.playerx['hls-parsing'].default);
|
|
107
|
-
player.packages.add(bitmovin.playerx['hls'].default);
|
|
108
|
-
player.packages.add(bitmovin.playerx['presentation'].default);
|
|
109
|
-
player.packages.add(bitmovin.playerx['source'].default);
|
|
110
|
-
player.packages.add(bitmovin.playerx['sources-api'].default);
|
|
111
|
-
player.packages.add(bitmovin.playerx['adaptation'].default);
|
|
112
|
-
|
|
113
|
-
player.sources.add('https://cdn.bitmovin.com/content/assets/streams-sample-video/sintel/m3u8/index.m3u8');
|
|
114
|
-
</script>
|
|
115
|
-
</body>
|
|
116
|
-
</html>
|
|
117
25
|
```
|
|
118
|
-
### Simple TypeScript Usage Example
|
|
119
|
-
|
|
120
|
-
This example shows how to use the monolithic player from npm. First you will need to install the player (this package) to your project:
|
|
121
|
-
|
|
122
|
-
```shell
|
|
123
26
|
npm install @bitmovin/player-web-x
|
|
124
27
|
```
|
|
125
28
|
|
|
126
29
|
```typescript
|
|
127
30
|
import { Player } from '@bitmovin/player-web-x/bundles/playerx-hls';
|
|
128
|
-
import type { PlayerAndSourcesApi } from '@bitmovin/player-web-x/types/framework/core/sources-api/Types';
|
|
129
31
|
|
|
130
|
-
const player = Player({
|
|
32
|
+
const player = Player({
|
|
33
|
+
key: 'YOUR-PLAYER-KEY',
|
|
34
|
+
defaultContainer: document.getElementById('player-container')
|
|
35
|
+
});
|
|
131
36
|
|
|
132
|
-
|
|
133
|
-
|
|
37
|
+
const sourceConfig = {
|
|
38
|
+
resources: [{
|
|
39
|
+
url: 'https://cdn.bitmovin.com/content/assets/streams-sample-video/tos/m3u8/index.m3u8',
|
|
40
|
+
}]
|
|
41
|
+
}
|
|
134
42
|
|
|
135
|
-
|
|
43
|
+
player.sources.add(sourceConfig);
|
|
44
|
+
```
|
|
136
45
|
|
|
137
|
-
|
|
46
|
+
Or using the packages. In this case, you need to merge the API type yourself.
|
|
138
47
|
|
|
139
48
|
```typescript
|
|
49
|
+
|
|
140
50
|
import { Player } from '@bitmovin/player-web-x/bundles/playerx-core';
|
|
141
51
|
import { AdaptationPackage } from '@bitmovin/player-web-x/packages/playerx-adaptation.package';
|
|
142
52
|
import { CapabilitiesPackage } from '@bitmovin/player-web-x/packages/playerx-capabilities.package';
|
|
@@ -149,10 +59,19 @@ import { NetworkPackage } from '@bitmovin/player-web-x/packages/playerx-network.
|
|
|
149
59
|
import { PresentationPackage } from '@bitmovin/player-web-x/packages/playerx-presentation.package';
|
|
150
60
|
import { SegmentProcessingPackage } from '@bitmovin/player-web-x/packages/playerx-segment-processing.package';
|
|
151
61
|
import { SourcePackage } from '@bitmovin/player-web-x/packages/playerx-source.package';
|
|
152
|
-
import { SourcesApiPackage }
|
|
153
|
-
import
|
|
62
|
+
import { SourcesApiPackage } from '@bitmovin/player-web-x/packages/playerx-sources-api.package';
|
|
63
|
+
import { ViewModePackage } from '@bitmovin/player-web-x/packages/playerx-view-mode.package';
|
|
64
|
+
import type { ViewModeApi } from '@bitmovin/player-web-x/types/framework/core/view-mode/Types'
|
|
65
|
+
import type { SourceApiBase, SourcesApi } from '@bitmovin/player-web-x/types/framework/core/sources-api/Types'
|
|
66
|
+
import type { PlayerApi } from '@bitmovin/player-web-x/types/framework/core/player-api/Types'
|
|
67
|
+
|
|
68
|
+
type SourceApi = SourceApiBase & ViewModeApi;
|
|
69
|
+
type MyApi = PlayerApi & SourcesApi<SourceApi>;
|
|
154
70
|
|
|
155
|
-
const player = Player({
|
|
71
|
+
const player = Player({
|
|
72
|
+
key: 'YOUR-PLAYER-KEY',
|
|
73
|
+
defaultContainer: document.getElementById('player-container')
|
|
74
|
+
}) as MyApi
|
|
156
75
|
|
|
157
76
|
player.packages.add(CapabilitiesPackage);
|
|
158
77
|
player.packages.add(SegmentProcessingPackage);
|
|
@@ -166,31 +85,21 @@ player.packages.add(PresentationPackage);
|
|
|
166
85
|
player.packages.add(SourcePackage);
|
|
167
86
|
player.packages.add(AdaptationPackage);
|
|
168
87
|
player.packages.add(SourcesApiPackage);
|
|
88
|
+
player.packages.add(ViewModePackage);
|
|
169
89
|
|
|
170
|
-
|
|
90
|
+
const sourceConfig = {
|
|
91
|
+
resources: [{
|
|
92
|
+
url: 'https://cdn.bitmovin.com/content/assets/streams-sample-video/tos/m3u8/index.m3u8',
|
|
93
|
+
}]
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
player.sources.add(sourceConfig);
|
|
171
97
|
```
|
|
172
98
|
|
|
173
99
|
## Bitmovin Player V8 compatibility
|
|
174
100
|
|
|
175
|
-
To avoid disruption, we have also built a compatibility layer to allow you to use this player as a dropin for v8.
|
|
176
|
-
|
|
177
|
-
> [!CAUTION]
|
|
178
|
-
> This Player is not yet feature complete. Only use it as a replacement for V8 if it covers your use case.
|
|
179
|
-
>
|
|
180
|
-
> To find out how to use this compatibility mode, please see [COMPAT.md](/COMPAT.md).
|
|
101
|
+
To avoid disruption, we have also built a compatibility layer to allow you to use this player as a dropin for v8 - read more about it in our [documentation](https://developer.bitmovin.com/playback/docs/player-web-x-v8-compatibility)
|
|
181
102
|
|
|
182
103
|
## Package template repository
|
|
183
104
|
|
|
184
105
|
To find out more about packages and how to build them, please check out our [package template repository](https://github.com/bitmovin/pwx-package-template). It includes examples of packages of various types, and also functions as a package build system.
|
|
185
|
-
|
|
186
|
-
## Why is this player different?
|
|
187
|
-
|
|
188
|
-
Above, it was mentioned that this package is several things. Let's return to that statement a bit. More than just being a player, PWX can also be seen as a playback platform.
|
|
189
|
-
This is because it is built using our custom framework, Phoenix (now you know where that namespace comes from).
|
|
190
|
-
The framework is a structured concurrency implementation which is designed to be plugin first: on its own it doesn't implement any business logic, which is all loaded via packages.
|
|
191
|
-
That is what the call to `bitmovin.playerx.Player` does in fact, it just loads the framework. You can see that all functionality, even network requests, are added subsequently.
|
|
192
|
-
What this means for our users is that by using packages, any conceivable integration is possible (and usually fairly easy) to accomplish. We will soon release some examples of adding functionality via packages.
|
|
193
|
-
|
|
194
|
-
That is what is meant by playback platform. If your app or website is based around playback, Player Web X will allow you to build a tailored, powerful and performant integration to support your business needs.
|
|
195
|
-
|
|
196
|
-
We're very excited about that.
|