mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(core): lock fullscreen orientation (#1656)
This commit is contained in:
@@ -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({});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
+2
@@ -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';
|
||||
|
||||
+1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
export * as features from './feature.parts';
|
||||
export * from './orientation-lock';
|
||||
export * from './playback';
|
||||
export * from './presets';
|
||||
export * from './volume';
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import { definePlayerFeature } from '../../feature';
|
||||
|
||||
export const orientationLockFeature = definePlayerFeature({
|
||||
name: 'orientationLock',
|
||||
state: () => ({}),
|
||||
});
|
||||
Reference in New Issue
Block a user