-
Notifications
You must be signed in to change notification settings - Fork 0
feat: native-pipeline #49
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
Open
adrums86
wants to merge
20
commits into
main
Choose a base branch
from
feat-native-pipeline
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
7dc64d3
feat: add native pipeline
79e73b4
fix: build
faea378
feat: initial tests
a3ed483
fix: add browser to pre-push
7116537
fix: husky syntax
9681ef5
fix: thumbnail track add/remove
12a4725
fix: playback state
d4fd3ff
fix: select thumbnail track
49bda67
test: native audio tracks
0ed1ff0
test: add state tests
e689188
fix: add mocks
a6f7ec8
fix: test coverage
0fada87
fix: check for thumbnails label
979e054
fix: play promise
87ce914
Merge branch 'main' into feat-native-pipeline
9fd9c3a
fix: move state to player
35fc938
fix: text track consts
246f849
fix: build
ab74acd
fix: size-limit
0615026
fix: size limit formatting
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export const Thumbnails = 'thumbnails'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import type { IPlayerTextTrack } from '../types/text-track.declarations'; | ||
|
|
||
| export class PlayerTextTrack implements IPlayerTextTrack { | ||
| public readonly id: string; | ||
| public readonly activeCues: TextTrackCueList | null; | ||
| public readonly cues: TextTrackCueList | null; | ||
| public readonly kind: TextTrackKind; | ||
| public readonly label: string; | ||
| public readonly language: string; | ||
| public readonly mode: string; | ||
|
|
||
| public constructor(textTrack: TextTrack) { | ||
| this.id = textTrack.id; | ||
| this.activeCues = textTrack.activeCues; | ||
| this.cues = textTrack.cues; | ||
| this.kind = textTrack.kind as TextTrackKind; | ||
| this.label = textTrack.label; | ||
| this.language = textTrack.language; | ||
| this.mode = textTrack.mode; | ||
| } | ||
|
|
||
| public static fromTextTracks(textTrackList: TextTrackList): Array<PlayerTextTrack> { | ||
| const playerTextTracks = []; | ||
| for (let i = 0; i < textTrackList.length; i++) { | ||
| if (textTrackList[i].kind !== 'metadata') { | ||
| playerTextTracks.push(new PlayerTextTrack(textTrackList[i])); | ||
| } | ||
| } | ||
| return playerTextTracks; | ||
| } | ||
| } |
22 changes: 22 additions & 0 deletions
22
packages/playback/src/lib/models/player-thumbnail-tracks.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { Thumbnails } from '../consts/text-tracks'; | ||
| import type { IPlayerThumbnailTrack } from '../types/thumbnail-track.declarations'; | ||
| import { PlayerTextTrack } from './player-text-tracks'; | ||
|
|
||
| export class PlayerThumbnailTrack extends PlayerTextTrack implements IPlayerThumbnailTrack { | ||
| public readonly isActive: boolean; | ||
|
|
||
| public constructor(textTrack: TextTrack) { | ||
| super(textTrack); | ||
| this.isActive = this.mode !== 'disabled'; | ||
| } | ||
|
|
||
| public static fromTextTracks(textTrackList: TextTrackList): Array<PlayerThumbnailTrack> { | ||
| const playerThumbnailTracks = []; | ||
| for (let i = 0; i < textTrackList.length; i++) { | ||
| if (textTrackList[i].label.startsWith(Thumbnails)) { | ||
| playerThumbnailTracks.push(new PlayerThumbnailTrack(textTrackList[i])); | ||
| } | ||
| } | ||
| return playerThumbnailTracks; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,9 @@ | ||
| export interface IPlayerTextTrack { | ||
| id: string; | ||
| readonly id: string; | ||
| readonly activeCues: TextTrackCueList | null; | ||
| readonly cues: TextTrackCueList | null; | ||
| readonly kind: TextTrackKind; | ||
| readonly label: string; | ||
| readonly language: string; | ||
| readonly mode: string; | ||
| } |
5 changes: 3 additions & 2 deletions
5
packages/playback/src/lib/types/thumbnail-track.declarations.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.