Changed download manager to take |shakaExtern.Request| as input
instead of |shaka.media.SegmentReference| and |shaka.media.InitSegmentReference|
as it really does not need to know about those types.
Issue #1248
Change-Id: I797c437f4339cf670b5eddad14952b0526b72ea5
Group downloads by stream id so that download manager does not
need to know about the stream types.
Issue: #1248
Change-Id: Id61df4e67a419ee085dfd96a863bb56f01a4b732
Added a preferred audio channel count to configuration, default set
to 2.
Choose the codec with the largest number of audio channels less than
or equal to the configured number of output channels. If this is not
possible, choose the smallest number of channels.
Closes#1013.
Issue #1071.
Change-Id: I6c6a956e33637cf34bd4bd79af563dc10a595e94
To make it easier to understand, we collect all the streams within a
period using a map. This ensures that we will have a set of streams.
We then download each stream in the map. Since the map is indexed by
stream id, we can easily connect the variants and streams.
Issue #1248
Change-Id: I65ae01733b5d9dbf8b6d73c37f802320fffa03d1
Changed the loops used to check for similar tracks to be simpler. Yes,
there are some double checks, but over all it is easier to read. Since
this code is ran very rarely, the minor redundant checks should not be
a problem to the user.
Issue #1248
Change-Id: I6589dda233e94defb5729934ee859b78e3af193f
Created a static method that will handle destroying a destroyable
object when you are done with it.
Issue #1248
Change-Id: I4df0569f5f5e00002600702cf24caf1ed2da7c5b
Every time we would get network engine in storage we would need
to assert that it was not null. To make this easier (especially)
with promises, we add a function that will only return an non-null
networking engine.
Issue #1248
Change-Id: Iba415426ea42007addbb26c7a6b99a54a5064440
Removed the class-wide instances of drm engine and manifest
that were in storage to make it easier to understand where
they come from.
Issue: #1248
Change-Id: Iee0932b36a0a66eefd1995a2318981708e588f35
Isolate the use of storage engine in the remove function so that it should
be easier to replace it with the new storage system.
Change-Id: Ia764b680026018dfcb10f8bebc98e4d7435793d8
To make it easier to update storage.js to use the storage muxers
each command is going to be isolated so that the dependency of
each command can be clearly established.
Change-Id: Iedba4bd0cefa96ca2e69db1fa83d3ba074a3fc29
Adding "mechanism" and "cell" fields to offline uri. But since
they are not used anywhere, this change sets them to dummy values
so that all the constructors could be updated.
Moved the manifest reconstruction code into a instance class as
the mechanism and cell for the asset is needed in order to create
all the segment uris.
Change-Id: I2b5738805b17c4aa33d39b3166fddf1528aed489
Instead of merging the mechanism and cell names together
to make the path, use a class to hold them separately. This
will make it easier to work with the OfflineUri.
Change-Id: Ib0065e9d9a8553a90a7b4778e118dd3ca6435f32
The only time we ever need to update a manifest value is when
we update the expiration time. To make it easier to support
updating expiration time across different version, only allow
that one value to be updated.
Change-Id: I621ec744019802edc65b059baa7f5cf0c476b0b1
The offline uri is going to soon contain more information (routing
information used by the storage muxer) so this change makes offline
uri a class so that all components can be accessed.
Change-Id: I5137f278e0dab059191d450876cab42745e4ed0b
Made a copy of the storage cell tests for indexeddb but made them
work for the memory storage cell so show that we can expect the
same behavior from them.
This is to give us an extra level of confidence when we use the
memory storage cells in place of the indexeddb storage cells in
our tests.
Issue: #1248
Change-Id: I96eaf57a9d808b4c7e07f97ac2713318a889fc24
This makes a large number of small typo fixes. It also rewords a
number of comments and JSDoc descriptions, and does some
formatting standardization.
This doesn't fix every single issue, but it fixes a lot. Notably,
there were some formatting issues I declined to standardize due to
ambivalence on what the proper standardization would be; for example,
when and where empty lines should show up in JSDoc.
Change-Id: Ibcaf21382bd78b91e589122983dd14e001bfdad5
This updates the existing diagrams and adds new ones for cast and
offline. The offline diagrams will need to be updated again after
we resolve#1248.
Closes#1197
Change-Id: I6b6b1fac732b4997c579f58c7f12f0f84f202380
Fixed an issue where an update call the IndexedDB was not replacing
the correct value because the key was getting changed to a string.
IndexedDB will count a missing key as a success, so check that the
value is undefined.
Issue: #1248
Change-Id: Icdd6ae263374c655170c6470df85c656b8bd3ba2
Storage Muxer is responsible for finding the correct cell for a
given operations. For example, when writing new content, you need
a cell that supports add-operations, the muxer will find one.
Issue: #1248
Change-Id: Ifd9fd32f9487c0b9bc011ae8b004eec4ee75f7c4
Since the database schemes for idb versions 2 and 3 used the same
data types (shaka offline version 2) this storage cell can be used
for both. The only difference is that idb version 2 has a fixed
key space.
Issue: #1248
Change-Id: Iac5cb1d57f93fdb81729b59d67d6736e29c9968c
Created base classes that will be used when working with indexeddb.
These classes are used to manage connections and transaction is a
more promise-friendly way.
Issue: #1248
Change-Id: Iafd001072bee8572f41af7069532f3a1ccd39fbc
Created a memory storage system that holds all data in main memory. This
system will be used in tests.
Needed to update the eslint rules to allow us to have an instance-level
method that does not use |this|.
Issue: #1248
Change-Id: If1ebbec62bfdae57ee06df9fdef9955b30579d52
This is an automated fix to be inline with Google style guides, this
was created with eslint's --fix option.
Change-Id: I860eecbc8152603e730aa17a1393f16d26b3b6fc
Google style guide requires adding curly braces to all block statements
even if it is only has one line. This fixes it by using eslint's
--fix flag followed by running clang-format to reformat the change.
Change-Id: Idc086c2aa8c02df5ef8b2140a11bfb9128eeb4bd
Rather than using the availability window, Playhead should use the
seek range to restrict the playhead's position.
Closes#1224
Change-Id: I8612bfafb53bbb214e32aae2d71af52d748a3aee
This is part of a change to convert all usages of 'var' with either
'let' or 'const'. This takes a conservative approach for 'const' where
it will only be used for aliases and storing the "original" values in
tests.
Change-Id: Ib137fbfde50f1330c74c040fc062aa8e2c6d1e57
This uses AbortableOperation in all networking, from the scheme
plugins all the way to the request interface.
This also updates all default scheme plugins, docs, and sample code.
Backward compatibility is provided for scheme plugins and the
request API in NetworkingEngine. This compatibility will be
removed in v2.5.
Two cancelation-related tests have been disabled in
player_integration until the new abort interface has been adopted
in the manifest parsers.
Issue #829
Change-Id: I91c8e6efe97798d111e8ddca5655cddc1f6bcbf3
When DBEngine aborts because of an upgrade, include a list of the
original uris for all downloaded content.
This will allow apps to re-download the content if they choose to.
Change-Id: Ic2029d935dd8da60c0d502cd0cdbb08b38bbbe76
This removed all of DBUpgrade (lib and test) as it was not accomplishing
its requirements.
Now instead, if DBEngine detects that there needs to be an upgrade, it will
abort the upgrade and message the app with |UNSUPPORTED_UPGRADE_REQUEST|.
Change-Id: If65bc013b0482c9b0c6e71e644e9132584984414
When there is an indexeddb error, print the error to log error so that
the extra bits of information are exposed.
Change-Id: Ie67fa025946534f4c84c935ce55e169d3ecf8c0f
These were not caught by the compiler due to aliases used to access
them, but they were caught by some new linter tools I am trying to
integrate into the build.
Change-Id: I343d155d43285e8244376b95c95b08b5d4f2fa39
Edge does not like it when we delete the old stores in the
database when upgrading. Since this can't seem to be worked
around, instead of delete the store, just clear it.
This will leave two empty stores in the database, but since
they will be empty, they should not waste any space.
Change-Id: I11d5b8b105b34277d92e9c1f7f83b36fc6171960
Added a DB Upgrade path for converting content from version 1
to the version 2 format.
Issue #1047
Change-Id: Id8dc626d8289b08ca300c40b137173c0c6ec9d35
externs/shaka/offline.js now represents the data types for Shaka Player
Offline V2. All offline shaka player code uses the new version and all
V1 and transitional code has been removed.
Issue #1047
Change-Id: Ia43f8d8d11426e823629e5fcd27c4e1e0ce400d3
Changed our stores in IndexedDB to use auto increment for the keys
so that we no longer need to track current ids anymore.
Issue #1047
Change-Id: I765ba19810fce03ec8e4d968cbf8cf383355be6d
Create the pattern for how to handle database upgrades. As of this
change the only upgrade supported is from version 0 (no database).
Issue #1047
Change-Id: I9f889a9e39a190e926cf06f0720a5371bc3c59af
This change:
- Fixes the use of temporary licenses with manifests without init data
- Re-enables an integration test which was accidentally disabled
- Makes that test use a manifest without init data, to cover #1159
- Makes the test less flaky
- Reduces the minBufferTime of offline manifests, which both speeds
up load of offline content and makes the test faster / less flaky
Closes#1159
Change-Id: I3342e5112564a607f16f5d10c457a032443c57cb
Instead of storing uris for SegmentDataDB in SegmentDB, store the
actual key so that we don't need to convert back-and-forth so
often.
Issue #1047
Change-Id: I2f6d1bc1e58abd7a210097dea757d1e2fc9d4cac
Changed the storage remove API to use the offline uri instead of
the stored content as that is all that is needed to remove the
content.
Updated the demo app to remove using the Uri and not stored content.
Change-Id: I72a1049838759452eb16c78c8f1f7f4170e4e841
Removed the reserve id from storage engine. Now adding an item to a
storage engine will return a promise that resolves with the id it
was stored under.
Change-Id: Id4d2c4c51a359593f1308aeb5fe580ab460ebeb8