Make fullscreen video fill the viewport
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
const { test } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const { normalize, rotation, coordinates } = require('./fullscreen-orientation');
|
||||
const { normalize, normalizeFit, rotation, coordinates } = require('./fullscreen-orientation');
|
||||
test('fullscreen fit defaults safely to fill and accepts fit', () => {
|
||||
assert.equal(normalizeFit(undefined), 'fill');
|
||||
assert.equal(normalizeFit('fit'), 'fit');
|
||||
assert.equal(normalizeFit('unexpected'), 'fill');
|
||||
});
|
||||
test('orientation defaults and only rotates mismatched viewports', () => {
|
||||
assert.equal(normalize('invalid'), 'auto');
|
||||
assert.equal(rotation('auto', 390, 844), 0);
|
||||
|
||||
Reference in New Issue
Block a user