feat(core): lock fullscreen orientation (#1656)

This commit is contained in:
Sam Potts
2026-06-10 10:32:43 +10:00
committed by GitHub
parent 3d2225e77e
commit 62d0524b83
20 changed files with 770 additions and 13 deletions
@@ -713,6 +713,7 @@ describe('Feature pipeline (end-to-end)', () => {
describe('Discovery', () => {
it('discovers features from the features index', () => {
const names = results.map((r) => r.name);
expect(names).toContain('orientationLock');
expect(names).toContain('playback');
expect(names).toContain('volume');
});
@@ -729,7 +730,16 @@ describe('Feature pipeline (end-to-end)', () => {
});
it('produces one result per feature', () => {
expect(results.length).toBe(2);
expect(results.length).toBe(3);
});
});
describe('orientationLock (silent feature)', () => {
it('generates an empty reference for empty state', () => {
const ref = findFeature('orientationLock')!.reference;
expect(ref.state).toEqual({});
expect(ref.actions).toEqual({});
});
});
@@ -4,5 +4,7 @@
* Exercises: namespace re-export filtering `export * as features from './feature.parts'`
* in the index should NOT produce a feature entry named "features".
*/
export { orientationLockFeature as orientationLock } from './orientation-lock';
export { playbackFeature as playback } from './playback';
export { volumeFeature as volume } from './volume';
@@ -7,6 +7,7 @@
*/
export * as features from './feature.parts';
export * from './orientation-lock';
export * from './playback';
export * from './presets';
export * from './volume';
@@ -0,0 +1,6 @@
import { definePlayerFeature } from '../../feature';
export const orientationLockFeature = definePlayerFeature({
name: 'orientationLock',
state: () => ({}),
});