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

[DNM] PR Test jwplayer/hls.js upgrade to v0.13.x #244

Closed
wants to merge 272 commits into from

Conversation

johnBartos
Copy link

This PR will...

Why is this Pull Request needed?

Are there any points in the code the reviewer needs to double check?

Resolves issues:

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

Tom Jenkinson and others added 30 commits December 15, 2018 23:18
…sue-template-1

update demo links in issue template
…codecs

isCodecSupportedInMp4 test audio codecs as audio
* Check if PTS has wrapped after applying PTS time offset

* Fix bug accessing buffered track array
* Intiialize vttCCs map with cc 0
and include this in the deployments readme
…sion-for-deploys

use the version from package.json when deploying
Update light build targets to include Typescript extensions
Docs: abrBandWidthFactor and abrBandWidthUpFactor
Thank you to Tom Jenkinson for acting as a reviewer for this work, including writing some suggestions via the GitHub PR github.com/video-dev/pull/2073. The commit history has been squashed as it was a fairly lengthly process to get everything working to support the conversion to TypeScript.

Early in the history of this commit, we converted properties to be initialized to `null`. This was incorrect, as it changes the behaviour of code that uses `Object.keys` calls to check if an object has any keys on it. Before, they would be empty, but if the properties are set to null, this check is no longer valid and it changes the behaviour. This is something to look out for in the future of other conversions, as the values themselves are often times reset to the `null`, but begin as undefined.

Added a common `types` folder for interfaces where the ownership of the type wasn't clear for the individual file. The default no-op logger which is the inferred usage did not have any arguments in it's method signature. By adding an argument, TypeScript is able to infer the correct interface. As well the Karma and Webpack configuration had to be updated to enable building TypeScript, and getting testing coverage information from Istanbul.

Define lib "es2015" and "dom" to add HTMLMediaElement, SourceBuffer and Number.isFinite definitions to the TypeScript binary when it is doing type-checking.

When attempting to lint the older version of `typescript-eslint-parser` would emit `no-undef` errors for TypeScript interfaces. Updating the package fixes this issue.

Tom pointed out that we should not use global module declarations to extend default HTML types since users will eventually be importing *.d.ts files from the hls.js project and this would also extend their types. Due to this feedback switched to defining a module local type `ExtendedSourceBuffer`. Which instead extends with the `ended` prop.

Event Handlers were set to be part of the private scope. While this has no effect now, it will be important to ensure other modules do not directly invoke the event handlers. Other methods that were prefixed with a `_` were also set into the private scope.

Where possible, code was switched to early-exit to lower the cognitive load in conditional statements, an example of this was the doAppend method. Another cleanup statement was switching handling of error codes and the comments to be closer to the conditional to which they applied.

Switched to using the Record<Key, Value> type to help support access via the index signature [key: T] syntax in the future.

An issue that was fixed in this commit was that The controller previous exposed the local `pendingTracks` property through the event and did not set the buffer on `this.tracks` instead opting to set it on the individual track, which bubbled up to the pendingTracks object, whose reference was lost in the buffer-controller module. This commit changes this behaviour so that the controller publishes `tracks` from the public variable on the controller rather than the pendingTracks which are passed into createSourceBuffers. This also means that this fixes the `.buffer.buffered` being undefined on the demo page. Added unit tests to cover the new behaviour of throwing an error if createSourceBuffer is called without an attached media element.
Co-Authored-By: Beraliv <beraliv.spb@gmail.com>
Make bandwidth estimate public API
tjenkinson and others added 19 commits September 25, 2019 19:19
so that errors aren't missed
…-bug

Fix bad conditional in key loader causing the wrong key to be loaded
Less verbose webpack output on CI, and attempt to build docs on travis
…ithout-media-on-flush-backbuffer

Bugfix: Uncaught exception trying to flush back buffer when starting live stream
because this is quicker, but also validates that the package-lock is in sync with the package.json

Without this anything in the package.json that is out of sync with the package-lock gets silently updated and the integrity is not checked
use `npm ci` instead of `npm install`
fix: calling detatchMedia() followed by attachMedia() causes audio to not play
Run docs in travis build
Fix type check errors
Fix netlify build in master and add build checks
* upstream/master:
  Add "sanity-check" package script Run docs in travis build Fix type check errors
  add additional check for no subtitle tracks
  fix test
  reset subtitle tracks state
  buffer-controller CR fixes
  use `npm ci` instead of `npm install`
  Fix typo in API.md
  Update jwplayer test stream urls
  Log error rather than throwing exception when `flushLiveBackBuffer` for live stream without media attached Fixes video-dev#2333
  also attempt to build docs on travis
  less verbose webpack output on CI
  CR fixes
  Fix bad conditional in key loader
  Add CDNBye to readme (video-dev#2349)
  handle altAudio when main elementry stream has muxed AV
  also reaset fragmentTracker for audio on detach
  fix commented code
  fix: calling detatchMedia() followed by attachMedia() causes audio to not play

# Conflicts:
#	package.json
#	scripts/precommit.sh
#	src/controller/stream-controller.js
#	src/controller/timeline-controller.ts
#	src/loader/m3u8-parser.ts
* master:
  Prevent the use of Array methods not available in IE11
  Update test streams

# Conflicts:
#	.eslintrc.js
#	src/controller/level-controller.js
#	src/controller/timeline-controller.ts
#	tests/test-streams.js
@jwplayer jwplayer deleted a comment from jwplayer-robot Oct 29, 2019
@robwalch
Copy link

test this please

@robwalch robwalch removed their request for review October 29, 2019 21:45
@robwalch robwalch changed the title [Do Not Merge] Upgrade/v0.13.0 [DNM] Upgrade/v0.13.0 Nov 1, 2019
@robwalch robwalch changed the title [DNM] Upgrade/v0.13.0 [DNM] PR Test jwplayer/hls.js upgrade to v0.13.x Nov 11, 2019
@robwalch robwalch closed this Jan 13, 2020
@robwalch robwalch deleted the upgrade/v0.13.0 branch August 10, 2020 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.