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

feat: native-pipeline #49

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

feat: native-pipeline #49

wants to merge 17 commits into from

Conversation

adrums86
Copy link
Collaborator

@adrums86 adrums86 commented Jan 22, 2025

Description

Add native-pipeline and associated tests.

Specific Changes proposed

Implement a basic native pipeline.

Requirements Checklist

  • Feature implemented / Bug fixed
  • Change has been verified in an actual browser (Chrome, Firefox, Safari, Edge) (if applicable)
  • Unit Tests updated or fixed (if applicable)
  • Docs/guides updated (if applicable)

Copy link

netlify bot commented Jan 22, 2025

Deploy Preview for videojsdev failed. Why did it fail? →

Name Link
🔨 Latest commit 35fc938
🔍 Latest deploy log https://app.netlify.com/sites/videojsdev/deploys/67ac2fc25b0c550008903c7e

Copy link

github-actions bot commented Jan 23, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
dash-parser/dist/cjs/index.min.js 3.65 KB (0%) 73 ms (0%) 122 ms (+135.76% 🔺) 195 ms
dash-parser/dist/es/index.min.js 2.67 KB (0%) 54 ms (0%) 38 ms (+64.87% 🔺) 92 ms
dash-parser/dist/iife/index.min.js 3.65 KB (0%) 74 ms (0%) 117 ms (+321.58% 🔺) 190 ms
hls-parser/dist/cjs/index.min.js 5.77 KB (0%) 116 ms (0%) 119 ms (+3.68% 🔺) 235 ms
hls-parser/dist/es/index.min.js 3.37 KB (0%) 68 ms (0%) 55 ms (-1.23% 🔽) 123 ms
hls-parser/dist/iife/index.min.js 5.78 KB (0%) 116 ms (0%) 49 ms (-33.19% 🔽) 165 ms
playback/dist/player/core/cjs/index.min.js 6.22 KB (+4.94% 🔺) 125 ms (+4.94% 🔺) 166 ms (+20.25% 🔺) 291 ms
playback/dist/player/core/es/index.min.js 3.7 KB (+8.26% 🔺) 75 ms (+8.26% 🔺) 35 ms (+29.45% 🔺) 109 ms
playback/dist/player/core/iife/index.min.js 6.23 KB (+4.99% 🔺) 125 ms (+4.99% 🔺) 269 ms (+486.27% 🔺) 393 ms
playback/dist/player-with-worker/core/cjs/index.min.js 8.49 KB (+3.54% 🔺) 170 ms (+3.54% 🔺) 324 ms (+662.12% 🔺) 494 ms
playback/dist/player-with-worker/core/es/index.min.js 6.53 KB (+4.7% 🔺) 131 ms (+4.7% 🔺) 180 ms (-36.23% 🔽) 311 ms
playback/dist/player-with-worker/core/iife/index.min.js 8.5 KB (+3.53% 🔺) 170 ms (+3.53% 🔺) 182 ms (-8.35% 🔽) 352 ms
env-capabilities/dist/cjs/index.min.js 1.61 KB (0%) 33 ms (0%) 20 ms (+14.6% 🔺) 52 ms
env-capabilities/dist/es/index.min.js 0 B (+100% 🔺) 0 ms (+100% 🔺) 2 ms (-25.87% 🔽) 2 ms
env-capabilities/dist/iife/index.min.js 1.62 KB (0%) 33 ms (0%) 15 ms (-3.74% 🔽) 47 ms

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

Attention: Patch coverage is 88.88889% with 11 lines in your changes missing coverage. Please review.

Project coverage is 65.96%. Comparing base (756c570) to head (9fd9c3a).

Files with missing lines Patch % Lines
...ayback/src/lib/pipelines/native/native-pipeline.ts 84.21% 6 Missing ⚠️
...ckages/playback/src/lib/pipelines/base-pipeline.ts 0.00% 3 Missing ⚠️
packages/playback/src/lib/player/base-player.ts 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #49      +/-   ##
==========================================
+ Coverage   63.95%   65.96%   +2.00%     
==========================================
  Files         114      117       +3     
  Lines        4830     4918      +88     
  Branches      633      686      +53     
==========================================
+ Hits         3089     3244     +155     
+ Misses       1733     1666      -67     
  Partials        8        8              
Flag Coverage Δ
dash-parser 65.96% <88.88%> (+2.00%) ⬆️
env-capabilities 65.96% <88.88%> (+2.00%) ⬆️
hls-parser 65.96% <88.88%> (+2.00%) ⬆️
playback 65.96% <88.88%> (+2.00%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adrums86 adrums86 marked this pull request as ready for review January 27, 2025 22:44
Disabled = 'disabled',
Hidden = 'hidden',
Showing = 'showing',
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these 2 seem to match default text track interfaces, so you can simply use interfaces globally available in typescript via dom

} as TextTrack;
videoElement.textTracks[videoElement.textTracks.length] = textTrack;
return textTrack;
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use mockito, or simply videoElement = { addTextTrack: vi.fn() } in beforeEach

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only issue I have with mocking this with an empty vi.fn is that it doubles as a test utility. If this is mocked with vi, the text track would need to be added manually in each test.

}
}
return null;
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@dzianis-dashkevich
Copy link
Collaborator

I see this PR is mostly about text tracks, could we please verify that load flow works as expected and native playback works fine, eg: some basic mp4 file in chrome/firefox/safari and hls in safari?

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.

3 participants