From aba5e2583cf0075d0657ac5543f0c8e5ddfa0037 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Thu, 28 May 2020 16:24:41 -0700 Subject: [PATCH] Rename v2.6 to v3.0 and v2.7 to v3.1 We have decided to bump the major version number instead of the minor number, based primarily on the fact that this release breaks compatibility with our previous manifest structure. Change-Id: I67e4c8267c6e103cfc7278e09daac186ae5cbbc6 --- CHANGELOG.md | 4 +- README.md | 4 +- demo/service_worker.js | 2 +- docs/tutorials/ad_monetization.md | 4 +- docs/tutorials/index.json | 4 +- docs/tutorials/manifest-parser.md | 2 +- docs/tutorials/upgrade-manifest.md | 16 ++--- docs/tutorials/upgrade-v2-4.md | 74 ++++++++++---------- docs/tutorials/upgrade-v2-5.md | 78 +++++++++++----------- lib/media/segment_index.js | 2 +- lib/net/networking_engine.js | 2 +- lib/offline/indexeddb/v2_storage_cell.js | 2 +- lib/offline/indexeddb/v5_storage_cell.js | 2 +- lib/offline/storage.js | 6 +- lib/player.js | 4 +- lib/util/error.js | 2 +- lib/util/functional.js | 2 +- lib/util/periods.js | 4 +- lib/util/uint8array_utils.js | 2 +- roadmap.md | 2 +- test/offline/storage_compatibility_unit.js | 4 +- ui/controls.js | 2 +- ui/externs/ui.js | 2 +- 23 files changed, 113 insertions(+), 113 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c0f90fff..77fb1fd19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -885,11 +885,11 @@ New Features: Deprecated: - Passing a ManifestParser factory to Player.load is deprecated and support - will be removed in v2.6. Instead, please register any custom parsers with a + will be removed in v3.0. Instead, please register any custom parsers with a MIME type, and pass a MIME type instead. MIME types can also be used to force the selection of any built-in manifest parsers. - The |manifestUri| method on Player was changed to |assetUri|. The old method - is deprecated and will be removed in v2.6. + is deprecated and will be removed in v3.0. ## 2.4.4 (2018-08-23) diff --git a/README.md b/README.md index 48908045f..8795372a2 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ NOTES: team. Tizen 2016 model is community-supported and untested by us. - ⁴: IE 11 offers PlayReady support on Windows 8.1 and Windows 10 only. IE 11 can play clear content on Windows 8.0. IE 11 does not support adaptive - playback on Windows 7 and under. (IE support will stop in v2.7: + playback on Windows 7 and under. (IE support will stop in v3.1: https://github.com/google/shaka-player/issues/2339) - ⁵: These are expected to work, but are not actively tested by the Shaka Player team. @@ -152,7 +152,7 @@ NOTES: site with encrypted media, the user will be prompted to enable DRM. - ³: PlayReady in Edge does not seem to work on a VM or over Remote Desktop. - ⁴: IE 11 offers PlayReady support on Windows 8.1 and Windows 10 only. (IE - support will stop in v2.7: + support will stop in v3.1: https://github.com/google/shaka-player/issues/2339) - ⁵: These are expected to work, but are not actively tested by the Shaka Player team. diff --git a/demo/service_worker.js b/demo/service_worker.js index 8ee476b22..0565f1b34 100644 --- a/demo/service_worker.js +++ b/demo/service_worker.js @@ -15,7 +15,7 @@ * * @const {string} */ -const CACHE_NAME = 'shaka-player-v2.6+'; +const CACHE_NAME = 'shaka-player-v3.0+'; /** diff --git a/docs/tutorials/ad_monetization.md b/docs/tutorials/ad_monetization.md index d4bad32fc..ab6c23231 100644 --- a/docs/tutorials/ad_monetization.md +++ b/docs/tutorials/ad_monetization.md @@ -3,7 +3,7 @@ Shaka Player provides an API for serving ads to make monetization easier for apps. Our current API is tailored for our integration with the [Interactive Media Ads][] SDKs, but we plan to extend our support to -other ad providers in v2.7+. +other ad providers in v3.1+. Please note that the current API is likely to undergo significant changes as our support extends. @@ -158,4 +158,4 @@ shaka.Player.setAdManagerFactory(() => new myapp.CustomAdManager()); #### Continue the Tutorials -Next, check out {@tutorial plugins}. \ No newline at end of file +Next, check out {@tutorial plugins}. diff --git a/docs/tutorials/index.json b/docs/tutorials/index.json index ef039cf77..a66cadead 100644 --- a/docs/tutorials/index.json +++ b/docs/tutorials/index.json @@ -21,8 +21,8 @@ { "upgrade": { "title": "Upgrade Guide", "children": { - "upgrade-v2-4": { "title": "Upgrade Guide, v2.4 => v2.6" }, - "upgrade-v2-5": { "title": "Upgrade Guide, v2.5 => v2.6" }, + "upgrade-v2-4": { "title": "Upgrade Guide, v2.4 => v3.0" }, + "upgrade-v2-5": { "title": "Upgrade Guide, v2.5 => v3.0" }, "upgrade-manifest": { "title": "Shaka Player Manifest Upgrade Guide" } } } } diff --git a/docs/tutorials/manifest-parser.md b/docs/tutorials/manifest-parser.md index c779a218b..0db40a160 100644 --- a/docs/tutorials/manifest-parser.md +++ b/docs/tutorials/manifest-parser.md @@ -91,7 +91,7 @@ assets together seamlessly with little effort. All media times in the manifest are relative to the presentation, *not* the Period. This means that you must account for period start times in your segment -references. (This changed in Shaka Player v2.6.) +references. (This changed in Shaka Player v3.0.) **Note**: Because of browser requirements regarding MSE, we don't support changing MIME types or codecs after starting. This means that all Periods must diff --git a/docs/tutorials/upgrade-manifest.md b/docs/tutorials/upgrade-manifest.md index f658f733b..fed30a8a4 100644 --- a/docs/tutorials/upgrade-manifest.md +++ b/docs/tutorials/upgrade-manifest.md @@ -1,10 +1,10 @@ -# Shaka Player Manifest Upgrade Guide (v2.6) +# Shaka Player Manifest Upgrade Guide (v3.0) -v2.6 introduced many changes to the `shaka.extern.Manifest` structure. +v3.0 introduced many changes to the `shaka.extern.Manifest` structure. This is a detailed guide for upgrading `ManifestParser` plugins or applications using `Player.getManifest()` to extract information about content. Any application with a custom `ManifestParser` or which uses `Player.getManifest()` -MUST be upgraded for compatibility with v2.6. +MUST be upgraded for compatibility with v3.0. #### Registration @@ -57,7 +57,7 @@ this.playerInterface_.filterAllPeriods(periods); // Call this after any new periods are added this.playerInterface_.filterNewPeriod(someNewPeriod); -// v2.6: +// v3.0: // Call this after the initial parsing or after any new streams are added this.playerInterface_.filter(manifest); ``` @@ -79,7 +79,7 @@ timeline.notifySegments(segmentList, /* periodStart= */ 0); // v2.5: timeline.notifySegments(segmentList, /* isFirstPeriod= */ true); -// v2.6: +// v3.0: timeline.notifySegments(segmentList); ``` @@ -192,7 +192,7 @@ const ref = new shaka.media.SegmentReference( /* startByte= */ 0, /* endByte= */ null); -// v2.6 +// v3.0 const ref = new shaka.media.SegmentReference( /* startTime= */ 100, // <-- period start 100 + period-relative timestamp 0 /* endTime= */ 110, @@ -215,7 +215,7 @@ updated to account for all changes below. The asynchronous `destroy` method has been replaced with the synchronous `release` method. Applications which destroy `SegmentIndex` objects SHOULD be updated to call `release` instead. Backward compatibility will be removed in -v2.7. +v3.1. The `find` method still returns a position which can be passed to `get`, but this position is no longer part of the underlying `SegmentReference` object. @@ -230,7 +230,7 @@ implementation. If your custom `ManifestParser` plugin was relying on the old merge behavior rather than its documentation, you MUST update your plugin. See also the `replace` method. -The `replace` method was present in v2.5, but has only in v2.6 been exported to +The `replace` method was present in v2.5, but has only in v3.0 been exported to applications. It will allow a `ManifestParser` plugin to completely replace the reference array without merging. Whereas `merge` is O(N), `replace` is O(1). diff --git a/docs/tutorials/upgrade-v2-4.md b/docs/tutorials/upgrade-v2-4.md index 68f6e34a9..3a7289744 100644 --- a/docs/tutorials/upgrade-v2-4.md +++ b/docs/tutorials/upgrade-v2-4.md @@ -1,13 +1,13 @@ -# Shaka Upgrade Guide, v2.4 => v2.6 +# Shaka Upgrade Guide, v2.4 => v3.0 -This is a detailed guide for upgrading from Shaka Player v2.4 to v2.6. +This is a detailed guide for upgrading from Shaka Player v2.4 to v3.0. Feel free to skim or to search for the class and method names you are using in your application. -#### What's New in v2.6? +#### What's New in v3.0? -Shaka v2.6 introduces several improvements over v2.4, including: +Shaka v3.0 introduces several improvements over v2.4, including: - An official Shaka Player UI library to provide customizable and styleable video controls - Load dist/shaka-player.ui.js @@ -39,7 +39,7 @@ Shaka v2.6 introduces several improvements over v2.4, including: #### Extern namespace change -If you use the Closure Compiler in your own project, you need to know that v2.6 +If you use the Closure Compiler in your own project, you need to know that v3.0 changes the namespace for our externs, such as plugin interfaces and manifest types. The namespace has changed from `shakaExtern` to `shaka.extern`. You MUST update any references to `shakaExtern`. @@ -53,7 +53,7 @@ MUST update any references to `shakaExtern`. */ function myFilter(type, request) { /* ... */ } -// v2.6: +// v3.0: /** * @param {shaka.net.NetworkingEngine.RequestType} type * @param {shaka.extern.Request} request @@ -67,7 +67,7 @@ function myFilter(type, request) { /* ... */ } The optional `Factory` parameter in `Player.load()` and `Storage.store()` has been changed to a MIME type string. The `Factory` parameter was deprecated in -v2.5 and removed in v2.6. Applications MUST update to use MIME types instead of +v2.5 and removed in v3.0. Applications MUST update to use MIME types instead of explicit factories. Any registered factory can be referenced by its registered MIME type. @@ -76,7 +76,7 @@ MIME type. player.load('foo.mpd', /* startTime= */ 0, /* factory= */ shaka.dash.DashParser); -// v2.6: +// v3.0: player.load('foo.mpd', /* startTime= */ 0, /* mimeType= */ 'application/dash+xml'); ``` @@ -87,7 +87,7 @@ See {@link shaka.Player#load} for details. #### Manifest URI API change The method `Player.getManifestUri()` has been renamed to `Player.getAssetUri()`. -The older method was deprecated in v2.5 and was removed in v2.6. Applications +The older method was deprecated in v2.5 and was removed in v3.0. Applications MUST update to the new method, whose name more accurately reflects our support for non-manifest content. @@ -95,7 +95,7 @@ for non-manifest content. // v2.4: const uri = player.getManifestUri(); -// v2.6: +// v3.0: const uri = player.getAssetUri(); ``` @@ -104,7 +104,7 @@ const uri = player.getAssetUri(); The CEA-specific methods `Player.selectEmbeddedTextTrack()` and `Player.usingEmbeddedTextTrack()` were deprecated in v2.5 and were removed in -v2.6. CEA captions now show up in the standard text track APIs: +v3.0. CEA captions now show up in the standard text track APIs: `getTextTracks()`, `selectTextTrack()`, `getTextLanguages()`, `getTextLanguagesAndRoles()`, and `selectTextLanguage()`. Applications MUST update to using the track APIs. If you have content with VTT or TTML subtitles, @@ -114,7 +114,7 @@ you should already be using these APIs. // v2.4: player.selectEmbeddedTextTrack(); -// v2.6: +// v3.0: const tracks = player.getTextTracks(); const desiredTrack = someProcessToChooseOne(tracks); player.selectTextTrack(desiredTrack); @@ -123,18 +123,18 @@ player.selectTextTrack(desiredTrack); #### Utility method changes -In v2.6, the method `shaka.util.Uint8ArrayUtils.equal` has been moved to +In v3.0, the method `shaka.util.Uint8ArrayUtils.equal` has been moved to `shaka.util.BufferUtils.equal`. The new method supports both `ArrayBuffer` and subclasses of `ArrayBufferView` like `Uint8Array`. -Backward compatibility will be provided until v2.7. Applications SHOULD update +Backward compatibility will be provided until v3.1. Applications SHOULD update to use the new location. ```js // v2.4: if (shaka.util.Uint8ArrayUtils.equal(array1, array2) { ... -// v2.6: +// v3.0: if (shaka.util.BufferUtils.equal(array1, array2) { ... ``` @@ -142,12 +142,12 @@ if (shaka.util.BufferUtils.equal(array1, array2) { ... #### Configurable factory changes All configuration fields and plugin registration interfaces that accept -factories have been changed in v2.6. These factories SHOULD now be functions +factories have been changed in v3.0. These factories SHOULD now be functions that return an object and MAY be arrow functions. This makes our configuration and plugin registration interfaces consistent and improves usability in some cases. -Backward compatibility is provided until v2.7. If we detect that a factory +Backward compatibility is provided until v3.1. If we detect that a factory needs to be called with `new`, we will do so and log a deprecation warning. Applications SHOULD update their factories. @@ -170,7 +170,7 @@ class MyManifestParser { } shaka.media.ManifestParser.registerParserByMime('text/foo', MyManifestParser); -// v2.6: +// v3.0: player.configure('abrFactory', () => new MyAbrManager()); shaka.media.ManifestParser.registerParserByMime( 'text/foo', () => new MyManifestParser()); @@ -179,12 +179,12 @@ shaka.media.ManifestParser.registerParserByMime( #### Misc configuration changes -The configurable callback `manifest.dash.customScheme` has been removed in v2.6 +The configurable callback `manifest.dash.customScheme` has been removed in v3.0 and is no longer supported. The config field `manifest.dash.defaultPresentationDelay` has been moved to `manifest.defaultPresentationDelay`. Backward compatibility is provided until -v2.7. Applications using this field SHOULD update to use the new location. +v3.1. Applications using this field SHOULD update to use the new location. The `manifest.defaultPresentationDelay` field now affects both DASH and HLS content. The default value is `0`, which is interpretted differently for DASH @@ -209,14 +209,14 @@ See {@link shaka.extern.ManifestConfiguration} and #### Offline API changes -In v2.6, there is no longer any restriction on concurrent operations. +In v3.0, there is no longer any restriction on concurrent operations. The method `Storage.store()` now returns an instance of `IAbortableOperation` instead of `Promise`. This allows applications to call `op.abort()` to stop an operation in progress. The operation `Promise` can now be found on -`op.promise`. Backward compatibility is provided until v2.7; these operations -will work like `Promise`s in v2.6. (Applications MAY `await` them or call -`.then()` on them.) In v2.7, these returned operations will no longer be +`op.promise`. Backward compatibility is provided until v3.1; these operations +will work like `Promise`s in v3.0. (Applications MAY `await` them or call +`.then()` on them.) In v3.1, these returned operations will no longer be `Promise`-like, so applications SHOULD update at this time to use `op.promise`. ```js @@ -227,7 +227,7 @@ try { // Store failed! } -// v2.6: +// v3.0: const op = storage.store(); cancelButton.onclick = async () => { await op.abort(); @@ -244,11 +244,11 @@ try { } ``` -In v2.6, `shaka.offline.Storage.configure()` now takes a complete `Player` +In v3.0, `shaka.offline.Storage.configure()` now takes a complete `Player` configuration object instead of a separate one. The fields that were previously part of the `Storage` config (`trackSelectionCallback`, `progressCallback`, and `usePersistentLicense`) have been moved inside the `offline` field. The old -field locations were deprecated in v2.5 and removed in v2.6. Applications MUST +field locations were deprecated in v2.5 and removed in v3.0. Applications MUST update to use the new field locations. ```js @@ -257,7 +257,7 @@ storage.configure({ trackSelectionCallback: myTrackSelectionCallback, }); -// v2.6: +// v3.0: const storage = new shaka.offline.Storage(); storage.configure({ offline: { @@ -335,7 +335,7 @@ ideal bandwidth estimate. Applications SHOULD update their custom network scheme plugins to provide progress events if feasible. ```js -// v2.6: +// v3.0: function mySchemePlugin(uri, request, requestType, progressUpdated) { /// ... @@ -382,7 +382,7 @@ try { // Request failed! } -// v2.6: +// v3.0: const operation = player.getNetworkingEngine().request(type, request); // The operation can also be aborted on some condition. @@ -407,11 +407,11 @@ See {@link shaka.net.NetworkingEngine} for details. #### AbrManager plugin changes -In v2.6, we added a method to the `shaka.extern.AbrManager` interface called +In v3.0, we added a method to the `shaka.extern.AbrManager` interface called `playbackRateChanged(rate)`. This allows implementations to consider the current playback rate in their ABR decisions. -Backward compatibility will be provided until v2.7. Applications with custom +Backward compatibility will be provided until v3.1. Applications with custom `AbrManager` plugins SHOULD update to add this method to their implementations. See {@link shaka.extern.AbrManager} for details. @@ -419,7 +419,7 @@ See {@link shaka.extern.AbrManager} for details. #### TextDisplayer plugin changes -The `Cue` objects consumed by `TextDisplayer` have changed in v2.5 and v2.6. +The `Cue` objects consumed by `TextDisplayer` have changed in v2.5 and v3.0. - `Cue.writingDirection` has been split into `Cue.writingMode` and `Cue.direction` to fix bugs in the handling of these attributes @@ -427,7 +427,7 @@ The `Cue` objects consumed by `TextDisplayer` have changed in v2.5 and v2.6. to text). All application-specific TextDisplayer plugins MUST be updated. -v2.6 does not have backward compatibility for this! +v3.0 does not have backward compatibility for this! In addition, the following new fields have been added and MAY be used by `TextDisplayer` plugins: @@ -463,7 +463,7 @@ function MySchemePlugin(uri, request, requestType, progressUpdated) { } shaka.net.NetworkingEngine.registerScheme('data', MySchemePlugin); -// v2.6: +// v3.0: function MySchemePlugin(uri, request, requestType, progressUpdated) { return shaka.net.DataUriPlugin.parse( uri, request, requestType, progressUpdated); @@ -473,9 +473,9 @@ function MySchemePlugin(uri, request, requestType, progressUpdated) { #### Manifest parser plugin API changes -v2.6 introduced many changes to the {@link shaka.extern.Manifest} structure. +v3.0 introduced many changes to the {@link shaka.extern.Manifest} structure. Any application with a custom {@link shaka.extern.ManifestParser} or which uses -{@link shaka.Player#getManifest} MUST be upgraded for compatibility with v2.6. +{@link shaka.Player#getManifest} MUST be upgraded for compatibility with v3.0. If your application meets either of these criteria, please refer to {@tutorial upgrade-manifest} for detailed instructions on upgrading. diff --git a/docs/tutorials/upgrade-v2-5.md b/docs/tutorials/upgrade-v2-5.md index 411d9f15d..2be427842 100644 --- a/docs/tutorials/upgrade-v2-5.md +++ b/docs/tutorials/upgrade-v2-5.md @@ -1,13 +1,13 @@ -# Shaka Upgrade Guide, v2.5 => v2.6 +# Shaka Upgrade Guide, v2.5 => v3.0 -This is a detailed guide for upgrading from Shaka Player v2.5 to v2.6. +This is a detailed guide for upgrading from Shaka Player v2.5 to v3.0. Feel free to skim or to search for the class and method names you are using in your application. -#### What's New in v2.6? +#### What's New in v3.0? -Shaka v2.6 introduces several improvements over v2.5, including: +Shaka v3.0 introduces several improvements over v2.5, including: - Ad-insertion APIs (integrated with the Google IMA SDK) - Ad-related UI elements - Offline storage operations can be aborted @@ -27,7 +27,7 @@ Shaka v2.6 introduces several improvements over v2.5, including: The optional `Factory` parameter in `Player.load()` and `Storage.store()` has been changed to a MIME type string. The `Factory` parameter was deprecated in -v2.5 and removed in v2.6. Applications MUST update to use MIME types instead of +v2.5 and removed in v3.0. Applications MUST update to use MIME types instead of explicit factories. Any registered factory can be referenced by its registered MIME type. @@ -36,7 +36,7 @@ MIME type. player.load('foo.mpd', /* startTime= */ 0, /* factory= */ shaka.dash.DashParser); -// v2.6: +// v3.0: player.load('foo.mpd', /* startTime= */ 0, /* mimeType= */ 'application/dash+xml'); ``` @@ -47,7 +47,7 @@ See {@link shaka.Player#load} for details. #### Manifest URI API change The method `Player.getManifestUri()` has been renamed to `Player.getAssetUri()`. -The older method was deprecated in v2.5 and was removed in v2.6. Applications +The older method was deprecated in v2.5 and was removed in v3.0. Applications MUST update to the new method, whose name more accurately reflects our support for non-manifest content. @@ -55,7 +55,7 @@ for non-manifest content. // v2.4: const uri = player.getManifestUri(); -// v2.6: +// v3.0: const uri = player.getAssetUri(); ``` @@ -63,14 +63,14 @@ const uri = player.getAssetUri(); #### UI API change In v2.5.1, the method `shaka.ui.Overlay.getPlayer()` was deprecated and moved -to `ui.getControls().getPlayer()`. In v2.6, the old location was removed. +to `ui.getControls().getPlayer()`. In v3.0, the old location was removed. Applications that use this method MUST update to the new location. ```js // v2.5: const player = ui.getPlayer(); -// v2.6: +// v3.0: const player = ui.getControls().getPlayer(); ``` @@ -79,7 +79,7 @@ const player = ui.getControls().getPlayer(); The CEA-specific methods `Player.selectEmbeddedTextTrack()` and `Player.usingEmbeddedTextTrack()` were deprecated in v2.5 and were removed in -v2.6. CEA captions now show up in the standard text track APIs: +v3.0. CEA captions now show up in the standard text track APIs: `getTextTracks()`, `selectTextTrack()`, `getTextLanguages()`, `getTextLanguagesAndRoles()`, and `selectTextLanguage()`. Applications MUST update to using the track APIs. If you have content with VTT or TTML subtitles, @@ -89,7 +89,7 @@ you should already be using these APIs. // v2.4: player.selectEmbeddedTextTrack(); -// v2.6: +// v3.0: const tracks = player.getTextTracks(); const desiredTrack = someProcessToChooseOne(tracks); player.selectTextTrack(desiredTrack); @@ -98,18 +98,18 @@ player.selectTextTrack(desiredTrack); #### Utility method changes -In v2.6, the method `shaka.util.Uint8ArrayUtils.equal` has been moved to +In v3.0, the method `shaka.util.Uint8ArrayUtils.equal` has been moved to `shaka.util.BufferUtils.equal`. The new method supports both `ArrayBuffer` and subclasses of `ArrayBufferView` like `Uint8Array`. -Backward compatibility will be provided until v2.7. Applications SHOULD update +Backward compatibility will be provided until v3.1. Applications SHOULD update to use the new location. ```js // v2.5: if (shaka.util.Uint8ArrayUtils.equal(array1, array2) { ... -// v2.6: +// v3.0: if (shaka.util.BufferUtils.equal(array1, array2) { ... ``` @@ -117,12 +117,12 @@ if (shaka.util.BufferUtils.equal(array1, array2) { ... #### Configurable factory changes All configuration fields and plugin registration interfaces that accept -factories have been changed in v2.6. These factories SHOULD now be functions +factories have been changed in v3.0. These factories SHOULD now be functions that return an object and MAY be arrow functions. This makes our configuration and plugin registration interfaces consistent and improves usability in some cases. -Backward compatibility is provided until v2.7. If we detect that a factory +Backward compatibility is provided until v3.1. If we detect that a factory needs to be called with `new`, we will do so and log a deprecation warning. Applications SHOULD update their factories. @@ -145,7 +145,7 @@ class MyManifestParser { } shaka.media.ManifestParser.registerParserByMime('text/foo', MyManifestParser); -// v2.6: +// v3.0: player.configure('abrFactory', () => new MyAbrManager()); shaka.media.ManifestParser.registerParserByMime( 'text/foo', () => new MyManifestParser()); @@ -170,7 +170,7 @@ new parameter has been added to the callback signature. function initDataTransform(/** Uint8Array */ initData, /** shaka.extern.DrmInfo */ drmInfo) {} -// v2.6: +// v3.0: function initDataTransform(/** Uint8Array */ initData, /** string */ initDataType, /** shaka.extern.DrmInfo */ drmInfo) {} @@ -185,12 +185,12 @@ processing easier. You can refer to {@tutorial fairplay} as well. #### Misc configuration changes -The configurable callback `manifest.dash.customScheme` has been removed in v2.6 +The configurable callback `manifest.dash.customScheme` has been removed in v3.0 and is no longer supported. The config field `manifest.dash.defaultPresentationDelay` has been moved to `manifest.defaultPresentationDelay`. Backward compatibility is provided until -v2.7. Applications using this field SHOULD update to use the new location. +v3.1. Applications using this field SHOULD update to use the new location. The `manifest.defaultPresentationDelay` field now affects both DASH and HLS content. The default value is `0`, which is interpretted differently for DASH @@ -215,17 +215,17 @@ See {@link shaka.extern.ManifestConfiguration} and #### Offline API changes -In v2.6, the offline storage method `Storage.getStoreInProgress()` is now +In v3.0, the offline storage method `Storage.getStoreInProgress()` is now deprecated and always returns `false`. There is no longer any restriction on -concurrent operations. This method will be removed in v2.7. Applications +concurrent operations. This method will be removed in v3.1. Applications SHOULD stop using it. The method `Storage.store()` now returns an instance of `IAbortableOperation` instead of `Promise`. This allows applications to call `op.abort()` to stop an operation in progress. The operation `Promise` can now be found on -`op.promise`. Backward compatibility is provided until v2.7; these operations -will work like `Promise`s in v2.6. (Applications MAY `await` them or call -`.then()` on them.) In v2.7, these returned operations will no longer be +`op.promise`. Backward compatibility is provided until v3.1; these operations +will work like `Promise`s in v3.0. (Applications MAY `await` them or call +`.then()` on them.) In v3.1, these returned operations will no longer be `Promise`-like, so applications SHOULD update at this time to use `op.promise`. ```js @@ -236,7 +236,7 @@ try { // Store failed! } -// v2.6: +// v3.0: const op = storage.store(); cancelButton.onclick = async () => { await op.abort(); @@ -253,11 +253,11 @@ try { } ``` -In v2.6, `shaka.offline.Storage.configure()` now takes a complete `Player` +In v3.0, `shaka.offline.Storage.configure()` now takes a complete `Player` configuration object instead of a separate one. The fields that were previously part of the `Storage` config (`trackSelectionCallback`, `progressCallback`, and `usePersistentLicense`) have been moved inside the `offline` field. The old -field locations were deprecated in v2.5 and removed in v2.6. Applications MUST +field locations were deprecated in v2.5 and removed in v3.0. Applications MUST update to use the new field locations. ```js @@ -266,7 +266,7 @@ storage.configure({ trackSelectionCallback: myTrackSelectionCallback, }); -// v2.6: +// v3.0: const storage = new shaka.offline.Storage(); storage.configure({ offline: { @@ -345,11 +345,11 @@ See {@tutorial ui-customization}. #### AbrManager plugin changes -In v2.6, we added a method to the `shaka.extern.AbrManager` interface called +In v3.0, we added a method to the `shaka.extern.AbrManager` interface called `playbackRateChanged(rate)`. This allows implementations to consider the current playback rate in their ABR decisions. -Backward compatibility will be provided until v2.7. Applications with custom +Backward compatibility will be provided until v3.1. Applications with custom `AbrManager` plugins SHOULD update to add this method to their implementations. See {@link shaka.extern.AbrManager} for details. @@ -357,13 +357,13 @@ See {@link shaka.extern.AbrManager} for details. #### TextDisplayer plugin changes -The `Cue` objects consumed by `TextDisplayer` have changed in v2.6. +The `Cue` objects consumed by `TextDisplayer` have changed in v3.0. - `Cue.size` now defaults to `0`, which should be interpretted as "auto" (fit to text). All application-specific TextDisplayer plugins MUST be updated. -v2.6 does not have backward compatibility for this! +v3.0 does not have backward compatibility for this! In addition, the following new fields have been added and MAY be used by `TextDisplayer` plugins: @@ -382,7 +382,7 @@ See {@link shaka.extern.Cue} for details. The interface {@link shaka.extern.IUIElement} now has a synchronous `release()` method instead of an asynchronous `destroy()` method. Backward compatibility -will be provided until v2.7. Applications with UI element plugins SHOULD +will be provided until v3.1. Applications with UI element plugins SHOULD update their plugins to replace `destroy()` with `release()`. ```js @@ -393,7 +393,7 @@ class MyUIElement { } } -// v2.6: +// v3.0: class MyUIElement { release() { // Release resources synchronously. @@ -423,7 +423,7 @@ function MySchemePlugin(uri, request, requestType, progressUpdated) { } shaka.net.NetworkingEngine.registerScheme('data', MySchemePlugin); -// v2.6: +// v3.0: function MySchemePlugin(uri, request, requestType, progressUpdated) { return shaka.net.DataUriPlugin.parse( uri, request, requestType, progressUpdated); @@ -433,9 +433,9 @@ function MySchemePlugin(uri, request, requestType, progressUpdated) { #### Manifest parser plugin API changes -v2.6 introduced many changes to the {@link shaka.extern.Manifest} structure. +v3.0 introduced many changes to the {@link shaka.extern.Manifest} structure. Any application with a custom {@link shaka.extern.ManifestParser} or which uses -{@link shaka.Player#getManifest} MUST be upgraded for compatibility with v2.6. +{@link shaka.Player#getManifest} MUST be upgraded for compatibility with v3.0. If your application meets either of these criteria, please refer to {@tutorial upgrade-manifest} for detailed instructions on upgrading. diff --git a/lib/media/segment_index.js b/lib/media/segment_index.js index 1b6ca7907..1de81805e 100644 --- a/lib/media/segment_index.js +++ b/lib/media/segment_index.js @@ -58,7 +58,7 @@ shaka.media.SegmentIndex = class { */ destroy() { shaka.Deprecate.deprecateFeature( - 2, 7, + 3, 1, 'shaka.media.SegmentIndex', 'Please use release() instead of destroy().'); this.release(); diff --git a/lib/net/networking_engine.js b/lib/net/networking_engine.js index 873cd577d..896dcb095 100644 --- a/lib/net/networking_engine.js +++ b/lib/net/networking_engine.js @@ -316,7 +316,7 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget { // Request filters are run sequentially. filterOperation = filterOperation.chain(() => { if (request.body) { - // TODO: For v2.7 we should remove this or change to always pass a + // TODO: For v3.1 we should remove this or change to always pass a // Uint8Array. To make it easier for apps to write filters, it may be // better to always pass a Uint8Array so they know what they are // getting; but we shouldn't use ArrayBuffer since that would require diff --git a/lib/offline/indexeddb/v2_storage_cell.js b/lib/offline/indexeddb/v2_storage_cell.js index 8dcbd4dc2..34256db87 100644 --- a/lib/offline/indexeddb/v2_storage_cell.js +++ b/lib/offline/indexeddb/v2_storage_cell.js @@ -12,7 +12,7 @@ goog.require('shaka.util.PeriodCombiner'); /** * The V2StorageCell is for all stores that follow the shaka.externs V2 and V3 * offline types. V2 was introduced in Shaka Player v2.3.0 and quickly - * replaced with V3 in Shaka Player v2.3.2. V3 was then deprecated in v2.6. + * replaced with V3 in Shaka Player v2.3.2. V3 was then deprecated in v3.0. * * Upgrading from V1 to V2 initially broke the database in a way that prevented * adding new records. The problem was with the upgrade process, not with the diff --git a/lib/offline/indexeddb/v5_storage_cell.js b/lib/offline/indexeddb/v5_storage_cell.js index 5332d7946..01e9e2c46 100644 --- a/lib/offline/indexeddb/v5_storage_cell.js +++ b/lib/offline/indexeddb/v5_storage_cell.js @@ -10,7 +10,7 @@ goog.require('shaka.offline.indexeddb.BaseStorageCell'); /** * The V5StorageCell is for all stores that follow the shaka.externs V5 offline - * types introduced in v2.6. + * types introduced in v3.0. * * @implements {shaka.extern.StorageCell} */ diff --git a/lib/offline/storage.js b/lib/offline/storage.js index cc8154554..68d4e6d56 100644 --- a/lib/offline/storage.js +++ b/lib/offline/storage.js @@ -223,7 +223,7 @@ shaka.offline.Storage = class { if (config['manifest'] && config['manifest']['dash'] && 'defaultPresentationDelay' in config['manifest']['dash']) { shaka.Deprecate.deprecateFeature( - 2, 7, + 3, 1, 'manifest.dash.defaultPresentationDelay configuration', 'Please Use manifest.defaultPresentationDelay instead.'); config['manifest']['defaultPresentationDelay'] = @@ -334,7 +334,7 @@ shaka.offline.Storage = class { // Provide a temporary shim for "then" for backward compatibility. /** @type {!Object} */ (abortableStoreOp)['then'] = (onSuccess) => { shaka.Deprecate.deprecateFeature( - 2, 7, + 3, 1, 'shaka.offline.Storage.store.then', 'Storage operations now return a shaka.util.AbortableOperation, ' + 'rather than a promise. Please update to conform to this new API; ' + @@ -354,7 +354,7 @@ shaka.offline.Storage = class { */ getStoreInProgress() { shaka.Deprecate.deprecateFeature( - 2, 7, + 3, 1, 'shaka.offline.Storage.getStoreInProgress', 'Multiple concurrent downloads are now supported.'); return false; diff --git a/lib/player.js b/lib/player.js index 61c074dae..bb96a5ccf 100644 --- a/lib/player.js +++ b/lib/player.js @@ -1728,7 +1728,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { this.abrManager_ = shaka.util.Functional.callFactory(abrFactory); if (typeof this.abrManager_.playbackRateChanged != 'function') { shaka.Deprecate.deprecateFeature( - 2, 7, + 3, 1, 'AbrManager', 'Please use an AbrManager with playbackRateChanged function.'); this.abrManager_.playbackRateChanged = (rate) => {}; @@ -2546,7 +2546,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { if (config['manifest'] && config['manifest']['dash'] && 'defaultPresentationDelay' in config['manifest']['dash']) { shaka.Deprecate.deprecateFeature( - 2, 7, + 3, 1, 'manifest.dash.defaultPresentationDelay configuration', 'Please Use manifest.defaultPresentationDelay instead.'); config['manifest']['defaultPresentationDelay'] = diff --git a/lib/util/error.js b/lib/util/error.js index fdf585eaf..c1c3fcb74 100644 --- a/lib/util/error.js +++ b/lib/util/error.js @@ -640,7 +640,7 @@ shaka.util.Error.Code = { /** * We failed to find matching streams across DASH Periods, and the - * period-flattening aglorithm introduced in v2.6 has failed. + * period-flattening aglorithm introduced in v3.0 has failed. */ 'PERIOD_FLATTENING_FAILED': 4037, diff --git a/lib/util/functional.js b/lib/util/functional.js index 68e1550b5..153daf581 100644 --- a/lib/util/functional.js +++ b/lib/util/functional.js @@ -90,7 +90,7 @@ shaka.util.Functional = class { // "this" value instead. if (!ret) { shaka.Deprecate.deprecateFeature( - 2, 7, 'Factories requiring new', + 3, 1, 'Factories requiring new', 'Factories should be plain functions'); ret = obj; } diff --git a/lib/util/periods.js b/lib/util/periods.js index c7684e6af..94523f2b0 100644 --- a/lib/util/periods.js +++ b/lib/util/periods.js @@ -261,9 +261,9 @@ shaka.util.PeriodCombiner = class { // Recreate variantIds from scratch in the output. // HLS content is always single-period, so the early return at the top of - // this method would catch all HLS content. DASH content stored with v2.6 + // this method would catch all HLS content. DASH content stored with v3.0 // will already be flattened before storage. Therefore the only content - // that reaches this point is multi-period DASH content stored before v2.6. + // that reaches this point is multi-period DASH content stored before v3.0. // Such content always had variants generated from all combinations of audio // and video, so we can simply do that now without loss of correctness. let nextVariantId = 0; diff --git a/lib/util/uint8array_utils.js b/lib/util/uint8array_utils.js index 3d003ae0a..087058cf6 100644 --- a/lib/util/uint8array_utils.js +++ b/lib/util/uint8array_utils.js @@ -27,7 +27,7 @@ shaka.util.Uint8ArrayUtils = class { */ static equal(arr1, arr2) { shaka.Deprecate.deprecateFeature( - 2, 7, + 3, 1, 'shaka.util.Uint8ArrayUtils.equal', 'Please use shaka.util.BufferUtils.equal instead.'); return shaka.util.BufferUtils.equal(arr1, arr2); diff --git a/roadmap.md b/roadmap.md index e3b8c9b85..178f87aee 100644 --- a/roadmap.md +++ b/roadmap.md @@ -20,7 +20,7 @@ Candidate features for future release cycles ===== -v2.6 - 2020 Q2 +v3.0 - 2020 Q2 - Code health improvements - Conversion to ES6 - Isolate DASH periods to the DASH parser diff --git a/test/offline/storage_compatibility_unit.js b/test/offline/storage_compatibility_unit.js index e3f2eb9a1..bebc321ee 100644 --- a/test/offline/storage_compatibility_unit.js +++ b/test/offline/storage_compatibility_unit.js @@ -52,7 +52,7 @@ const compatibilityTestsMetadata = [ // This is the v3 version of the database, which is actually identical to // the "clean" version of the v2 database. The version number was // incremented to overcome the "broken" v2 databases. This format was - // introduced in v2.3.2 and deprecated in v2.6. + // introduced in v2.3.2 and deprecated in v3.0. name: 'v3', dbImagePath: '/base/test/test/assets/db-dump-v3.json', manifestKey: 1, @@ -78,7 +78,7 @@ const compatibilityTestsMetadata = [ /* manifestStore= */ 'manifest-v3'), }, { - // This is the v5 version of the database, introduced in v2.6. + // This is the v5 version of the database, introduced in v3.0. name: 'v5', dbImagePath: '/base/test/test/assets/db-dump-v5.json', manifestKey: 1, diff --git a/ui/controls.js b/ui/controls.js index 8a9440a68..772b75fbf 100644 --- a/ui/controls.js +++ b/ui/controls.js @@ -824,7 +824,7 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget { if (typeof element.release != 'function') { shaka.Deprecate.deprecateFeature( - 2, 7, + 3, 1, 'shaka.extern.IUIElement', 'Please update UI elements to have a release() method.'); diff --git a/ui/externs/ui.js b/ui/externs/ui.js index fd7642d70..b2d0a9a5b 100644 --- a/ui/externs/ui.js +++ b/ui/externs/ui.js @@ -97,7 +97,7 @@ shaka.extern.UIVolumeBarColors; * at the start of the seek bar as played (using the "played" color). *
* A value of false matches the default behavior of Chrome's native controls - * and Shaka Player v2.6+. + * and Shaka Player v3.0+. *
* A value of true matches the default behavior of Shaka Player v2.5. *