-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
refactor: Refactor TimelineController
as TypeScript
#2243
refactor: Refactor TimelineController
as TypeScript
#2243
Conversation
@Korilakkuma Do you have a stream where there are CEA-608 in userDataBytes to put here? Is it a common practice? |
Sorry ... I should use if (data.samples[i].bytes) {
const ccdatas = this.extractCea608Data(data.samples[i].bytes);
this.cea608Parser.addData(data.samples[i].pts, ccdatas);
} |
@Korilakkuma I think a better solution would be to know that this data isn't 608 data - as far as I know, SEI packets do not contain 608 cues. For context, please see https://github.com/video-dev/hls.js/pull/2126/files#diff-07ec9ff0f2017ebd5cf8cdb86d568f3aR715 |
bytes
being undefined
TimelineController
as TypeScript
#2202 has types that should be used in this pull request for OutputFilter and Cues. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM aside from the merge conflicts
@itsjamie could you re-review?
@@ -228,11 +240,11 @@ class TimelineController extends EventHandler { | |||
} | |||
} | |||
|
|||
onLevelSwitching () { | |||
onLevelSwitching (): void { | |||
this.enabled = this.hls.currentLevel.closedCaptions !== 'NONE'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is suspect of being correct for the typedef. currentLevel
is typed as number, and I can't find a place where .closedCaptions
is set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pulled this up in editor, and the suggestions tied are to fix the issues that popped up.
If the suggestions work, there will still be issues with undefined cc
and start
keys on the frags, but both of those are added in other PRs so we don't need to dup that work here.
Thanks @Korilakkuma!
Just that one last type change of |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This PR will...
Refactor
TimelineController
as TypeScript.Why is this Pull Request needed?
Progress towards typescripting hls.js.
Are there any points in the code the reviewer needs to double check?
No
Resolves issues:
#2070
Checklist