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 19 commits into
base: main
Choose a base branch
from
Open

feat: native-pipeline #49

wants to merge 19 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 ready!

Name Link
🔨 Latest commit ab74acd
🔍 Latest deploy log https://app.netlify.com/sites/videojsdev/deploys/67be4093056e5f0008f82d34
😎 Deploy Preview https://deploy-preview-49--videojsdev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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%) 95 ms (+35.75% 🔺) 168 ms
dash-parser/dist/es/index.min.js 2.67 KB (0%) 54 ms (0%) 30 ms (+19.32% 🔺) 84 ms
dash-parser/dist/iife/index.min.js 3.65 KB (0%) 74 ms (0%) 132 ms (+656.65% 🔺) 205 ms
hls-parser/dist/cjs/index.min.js 5.77 KB (0%) 116 ms (0%) 114 ms (+576.53% 🔺) 230 ms
hls-parser/dist/es/index.min.js 3.37 KB (0%) 68 ms (0%) 9 ms (-21.89% 🔽) 76 ms
hls-parser/dist/iife/index.min.js 5.78 KB (0%) 116 ms (0%) 81 ms (+234.97% 🔺) 197 ms
playback/dist/player/core/cjs/index.min.js 6.13 KB (+3.38% 🔺) 123 ms (+3.38% 🔺) 62 ms (-5.28% 🔽) 185 ms
playback/dist/player/core/es/index.min.js 3.62 KB (+5.97% 🔺) 73 ms (+5.97% 🔺) 110 ms (+41.74% 🔺) 183 ms
playback/dist/player/core/iife/index.min.js 6.14 KB (+3.44% 🔺) 123 ms (+3.44% 🔺) 43 ms (+37.89% 🔺) 166 ms
playback/dist/player-with-worker/core/cjs/index.min.js 8.4 KB (+2.41% 🔺) 169 ms (+2.41% 🔺) 68 ms (-54.83% 🔽) 236 ms
playback/dist/player-with-worker/core/es/index.min.js 6.45 KB (+3.36% 🔺) 129 ms (+3.36% 🔺) 107 ms (-19.19% 🔽) 236 ms
playback/dist/player-with-worker/core/iife/index.min.js 8.41 KB (+2.52% 🔺) 169 ms (+2.52% 🔺) 92 ms (-32.54% 🔽) 260 ms
env-capabilities/dist/cjs/index.min.js 1.61 KB (0%) 33 ms (0%) 7 ms (-50.94% 🔽) 39 ms
env-capabilities/dist/es/index.min.js 0 B (+100% 🔺) 0 ms (+100% 🔺) 4 ms (+115.79% 🔺) 4 ms
env-capabilities/dist/iife/index.min.js 1.62 KB (0%) 33 ms (0%) 5 ms (-23.99% 🔽) 37 ms

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

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

Project coverage is 65.87%. Comparing base (756c570) to head (ab74acd).

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.87%   +1.92%     
==========================================
  Files         114      117       +3     
  Lines        4830     4906      +76     
  Branches      633      684      +51     
==========================================
+ Hits         3089     3232     +143     
+ Misses       1733     1666      -67     
  Partials        8        8              
Flag Coverage Δ
dash-parser 65.87% <87.20%> (+1.92%) ⬆️
env-capabilities 65.87% <87.20%> (+1.92%) ⬆️
hls-parser 65.87% <87.20%> (+1.92%) ⬆️
playback 65.87% <87.20%> (+1.92%) ⬆️

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.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is fine

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Cool, fixing the size limits and this should be good to go.

}
}
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