Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TypeScript to v3.9.3 and other dependencies #737

Merged
merged 8 commits into from Jun 4, 2020

Conversation

peaBerberian
Copy link
Collaborator

TypeScript v3.9.x seems to bring a lot of change to browser type definitions related to AudioTrack, VideoTrack and TextTrack.

Every problematic types are now only contained in the MediaElementTrackChoiceManager (where such types are used).

We should fix those and ensure that the other dependencies don't bring anything too fishy (by comparing builds before and after?).

@peaBerberian peaBerberian force-pushed the misc/dependencies-typescriptv3.9.2 branch from c78f105 to 237a322 Compare June 3, 2020 13:59
@peaBerberian
Copy link
Collaborator Author

peaBerberian commented Jun 3, 2020

Travis and appveyor fail with eslint but it works on my machine(TM).

Weird as the problem seems to be in one of our dependencies (eslint) which is also on my computer under the same form.
My first guess would be that they have an old node version.

@peaBerberian
Copy link
Collaborator Author

From eslint release notes:

2c28fbb Breaking: drop Node.js 8 support (refs eslint/rfcs#44) (#12700) (Toru Nagashima)

Travis has Node v8.17.0
And appveyor has the same.

So that must be it :'(

I'll see if we can do something about it in travis/appveyor

@peaBerberian peaBerberian force-pushed the misc/dependencies-typescriptv3.9.2 branch from 89760c4 to cef9229 Compare June 3, 2020 16:05
@peaBerberian
Copy link
Collaborator Author

Ok that's better.

Under the previous code, we aborted any Manifest refresh operation if we did not find an URL associated to the Manifest. This might seem logical at first, but we may also have a custom `manifestLoader` defined through the corresponding loadVideo option, which make the presence of the URL completely optional.

The real use cases are for when the Manifest is available locally, most of all under the `local` transport to be able to play content offline. In such contents, we never have an URL, only a custo `manifestLoader` which will retrieve the stored contents directly from memory or whatever browser storage API is available (IndexedDB, custom APIs...).
…Track replacement type

TypeScript v3.9.x seems to have removed its type definitions for those
DOM APIs (video tracks and audio tracks we can find on an
HTMLMediaElement).

The reason why are not clear but judging by the problematic commit
(microsoft/TypeScript@065a996#diff-46fd87925e4552c166ec188712741c3f)
- meaning of LKG being "last known good". My guess would be that it is
  automatically generated from a source which does not have those APIs
(why we had them before is more of a mystery but I guess that's what
this LKG thing was about).

What I did in this commit is to creates four new types:
  - ICompatAudioTrackList
  - ICompatVideoTrackList
  - ICompatAudioTrack
  - ICompatVideoTrack
Which are respectively the implementation of an AudioTrackList,
VideoTrackList, AudioTrack and VideoTrack as they are defined in the
web-idl of the corresponding APIs in the whatwg spec
(https://html.spec.whatwg.org/multipage/media.html#audiotracklist-and-videotracklist-objects).

I chose to name those ICompatThing and not directly extending Thing
because I find it allows to better see which types are "native"
TypeScript ones and which have been actually extended because they
missed some browser APIs. As TypeScript could evolve to add those APIs,
we could need to remove those. So making them stand out from the rest
is and advantage to me.
@peaBerberian peaBerberian force-pushed the misc/dependencies-typescriptv3.9.2 branch from cef9229 to 5bfb982 Compare June 3, 2020 16:24
@peaBerberian
Copy link
Collaborator Author

I want to assassinate appveyor

@peaBerberian peaBerberian force-pushed the misc/dependencies-typescriptv3.9.2 branch from 5bfb982 to 082cef5 Compare June 3, 2020 16:40
@peaBerberian
Copy link
Collaborator Author

peaBerberian commented Jun 4, 2020

Hm, well I will see what I can do for those tests as it at least 4 failure in a row now.

What's re-assuring is that it's always the same test, which is a performance-based one (setPlaybackRate). This can be due to poor decoder performance - as well as poor JS performance.

Appveyor seems to have trouble with this one, and it seems to be related to performance.
@peaBerberian peaBerberian merged commit 94d5ae8 into master Jun 4, 2020
@peaBerberian peaBerberian deleted the misc/dependencies-typescriptv3.9.2 branch September 23, 2020 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants