It looks like the lack of a constructor is at the root of the compiler
warnings when you try to alias a class.
To stop the error, I have made a small modification to the session
deleter class so that it could have a constructor.
Change-Id: Iad4614d80dc317b20f01930019096fb388b74ed9
This integrates the deprecation tool with our library and updates
all the deprecated warnings to use our new tool.
As some features needed to be removed in 2.5, this change removes them
since their deprecation checks would make us fail.
Change-Id: I28310bbe9df6839719f4763a96026d5968bdcea6
In cases of corruption or version mismatch, we must be able to delete
the database without loading anything from it. This comes up in
testing when you run an older version of Shaka Player after a newer
one has created the database.
Our ability to erase the database in these cases was lost when we
fixed#1277. This reverts that change and changes the contract of the
storage classes to ensure that we will always be able to erase the
database, no matter what.
Change-Id: Iccfbe1fa2ca880877e4743e5ca6bd42cba44abe0
Adding support for CEA closed captions embedded in video streams for
Dash.
1. Dash parser reads and parses closed captions' channel and language
information.
2. Player creates text streams for the closed captions.
3. Media Source Engine calls mux.js Caption Parser API to get the closed
captions embedded in the video streams.
4. Text Engine stores the closed captions, and text displayer shows the
captions.
TODO:
1. Add test cases, will send out another CL.
2. Change closed captions support for hls to the similar way we handle
dash closed captions, will send out another CL.
3. Handle dash content that's missing language indication from the manifest.
Issue: #1404
Change-Id: Ibae8f69623c13561415ec860107d7f5bc86e19e9
We were failing to download text. It appears we were not creating
the segment references for the text streams. This adds the text
streams to the set of streams that we are looking to download.
BUG: b/118437010
Change-Id: Ie4367e61519b5856cb63cacf8621453b677cf94b
(cherry picked from commit ec837b91193c07e8ba15300fb56f5b4010bbae7a)
Call setServerCertificate before store and
delete operations, when serverCertificate
exists.
In demo application, request and
configure certificate when certificateUri
is given in asset.
Fixes#1623
There was a TODO I left in storage about using sets when finally
adopted them, so I am happy to say I got to resolve it to day.
The change here is that instead of using a object as a map to track
which ids we have seen, we can now use sets.
Change-Id: I9288c3e48c67d2f8cfeda70883ffb683bf735cae
If we fail to remove an offline session, don't fail to delete the
content. Instead, store the session ID so we can remove it at a later
time.
Closes#1326
Change-Id: Id76481ece96bd6541367ccc67d13916a2aa51be2
This new database will store EME session IDs that need to be removed
at a later time. For example, this can happen if we fail to remove
the session when deleting content.
Issue #1326
Change-Id: I808103535d93c9070e13e30b8cd939fea757cafe
Went through all the class in shaka/offline and removed all uses
of |MapUtils.values|. This required changing many uses of Object
to Map.
Change-Id: I6bd6d37009e7b32ea38e9cbabd64c2d36ffeabbc
This replaces almost every instance of indexOf on both String and
Array. There are very few places where we really wanted an index.
Mostly, indexOf was used to check for inclusion.
Change-Id: I08e299768b6ffdb4bfc30b39b5d82a058c6d1b56
Changed the ClosedCaptions field in Stream from an object to an
array of ClosedCaption objects, so that it can be iterated through
and accessed easier.
Issue: #1404.
Change-Id: I67980cf4d5b5746785ba29f95718970fe89056f4
There was a stream utilty was that only be used in one class
(another utility class). The method was to get tracks, but it
sat along side other methods that look similar but were different
in very small ways.
This change moves that function to be in the same class as where
it is used so that it will be less distracting from the other
getTrack methods.
Change-Id: I21737b6b1341c06b41e6016e24b2b20ce5d40e77
When moving the manifest validation code, an error that was
meant for no periods got moved to no variants.
Change-Id: I2049e527baf247a7ec0281bcb443da6a2f20710b
There was an ugly promise chain in Storage.loadInternal. This change looks
to clean up that promise chain and to use async syntax instead.
Part of the refactoring splits |loadInternal| into two more focused methods
as an effort to make the code easier to understand.
Change-Id: Ica113344c6c4ba1d82b6cee281268e20be1aa411
I was looking at some of the storage code and got confused with
when and where we were filtering the manifest. After spending
a lot of time trying to map it all out, I found that it would be
easier to understand if we:
1. Did all the filtering at one time.
2. Did all the filtering before trying to download anything.
Change-Id: I377fbeaa1873ae3fccff438ffcb10b3fb53f48d9
Before, we would need to pass a manifest to DrmEngine to initialize
it. This was a problem as we look to support playback via src=.
When looking at how DrmEngine used the manifest, it appears to just be
a simple way to pass in the variants and the offline session ids. By
changing DrmEngine to accept the variants and offline sessions ids, we
can break the association between DrmEngine and Manifest.
Issue #816
Change-Id: Ie0dc82aaec871d7e6e002fe59b3a984449eda8c7
We renamed the extern namespace, but these references were in comments
that were not examined by the compiler.
Change-Id: If232953f678fba703c5355445f4f0cf180b46749
There are two intents when we initialize Drm Engine and the meaning
of the parameters are nuances depending on what you are trying
to do.
This change creates two different initializing methods so that
initializing drm engine for the intended purpose can be more
clear.
With this, some internal naming was change to better reflect how
some variables were being used to give them a bit more context.
Change-Id: Id8925eca53a34fe870ba5c973f9f0bb584f6e2d6
Before, segment timestamps were used in PresentationTimeline without
regard for the period start. This means they were not truly relative
to the presentation, but to the period.
The "isFirstPeriod" argument was also broken. It was meant to be true
for segments from the first period *ever*, but was passed true for the
first period *in the latest manifest update*. So data calculated from
that was bogus for live streams.
Now, notifySegments() is supplied with a period start time, so that
segment references can be combined with the period start to give
presentation timestamps. This fixes a major issue with the original
fix for #999.
Closes#999
Change-Id: Id0fe450f3ce4f90a2387d7103c75eb88f0c69c72
This change allows storage to be initialized without a player instance.
Since Storage is the same post initialization, the only test being added
is a test that checks that the storage instance was successfully
initialized.
Close#1297
Change-Id: Id2588696eac2a866bba74278322727b1d91f56eb
This changes Storage to use the destroyer object to manage
clean-up. This will later be used to change how we destroy
storage depending on how it was initialized.
Issue #1297
Change-Id: I7e8c4f959a6764859504b0259bd5e815e5fd3dc8
Some of these issues were found by the Closure Compiler linter,
which we are not currently using here. I will try to re-enable it
in a follow-up change.
Change-Id: Ie6e75f2b5a1e0f888c3dfbc78ed9cf254d2738bb
The DASH parser will now expose Representation IDs via new fields in
the Stream and Track objects. The "id" field will continue to be a
unique, auto-generated numerical ID, and will be supplemented by a
nullable string containing whatever was originally in the manifest.
The HLS parser will now expose the NAME attribute in the originalId
field as well.
Bug: 112087288
Change-Id: I6b8107d27780fb97ab18de767f7abdc6c7110fe7
We store the references to player's networking engine and
configuration in Storage, so there is no reason to call player
anymore. This change removes those lingering calls.
Issue #1297
Change-Id: I3486ffcb60cd80fd765259d690091cc3267bb8ba
Added two new stream utils for practices that pop up multiple
times in our code base.
1. getAllVariants - Get all the variants in a manifest.
2. getVariantStreams - Get all the streams (audio and/or video) back
as an array.
Change-Id: I87fa4959e4a17dcfff20d5aa0678e6dc346d413e
There was a cast in Storage.deleteAll that really should not
have been there. This changes it to use an assert to ensure
that the case is exposed if done wrong.
Issue #1297
Change-Id: I21f9737c0fc79c2b4324a7385a2814f94f40f884
Allow users to get access to the networking engine that storage
instances are using.
This is part of allowing storage to be used without a player instance
as it will allow users to configure the networking engine when they
create a storage instance without a player instance.
The code still assumes that Storage should never destroy the networking
engine. This is something that will need to change when storage can
be initialized without player.
Issue #1297
Change-Id: If8d1642259e0cf24cb43f2ca7936227e8d939260
As part of the effort to allow storage to be initialized with or
without a player instance, this change moves the offline config
into the player config and changes storage to share a configuration
object with a player instance.
We opted to share the instance between the two classes because if
storage was initialized with player, the initializer is implying a
relationship between the two objects and therefore configuration
changes should be shared.
Issue #1297
Change-Id: I991365255e63c284fbfcf147cf63c9588dd764ab
Added an option for the mime type to be passed to the load function.
Going forward this will replace the option to pass in a manifest
parser factory.
This is to help with issue #816 as passing in the mime type will be
one way for the player to know if it should use src= over MSE.
Issue #816
Change-Id: Ic356bb9f52c3977620debc8d4a09b7115a81d516
When reading through player I saw we did something like:
let variants = period.variants;
...
shaka.util.StreamUtils.applyRestrictions(period, ...);
...
doSomething(variants);
This causes some confusion as it was not clear if |variants| would
still be valid to use (i.e. could applyRestrictions) change the
reference in period like we do in some other filter functions.
So to help make it clear that it doesn't, I have changed
applyRestrictions to accept a variant array rather than the period.
Change-Id: I6dc080a1b1e563e5dd2789bd00fb0cfeb7de41de
Track all open operations in |shaka.offline.Stroage| so that we
can wait on them in |shaka.offline.Storage.Destroy|.
Change-Id: I648cb18545f9f1e0745ffddd70baac8fc316b0cb
Created the Destroyer class to handle working with IDestroyable so that
IDestroyable can be a simple interface (no more static methods).
Change-Id: I5afd915b895a4c60d758475a2b879bf0eb0096c9
https://goo.gl is being turned-down, so we can't use it for new URLS.
So we have consistent short links, this converts them to be
https://bit.ly.
Change-Id: I07a86cba807b67157664893341f648023918d0de
Before, when clearing storage with Storage.deleteAll, offline
licenses were not released. Now before erasing storage, all
sessions ids are collected and requested to be removed.
Closes#1277
Change-Id: Ib88a14f5132d3b2a34bd339cc45f121792b65ebc
Tracking progress when removing an asset was missing from the new storage
system. This CL adds that support back.
Issue #1248
Change-Id: Iab275cd75af817cfc34ee0888ddeea257b1ead56