diff --git a/projects/flosportsinc/ng-grid-list/common/grid/grid.component.scss b/projects/flosportsinc/ng-grid-list/common/grid/grid.component.scss index c777439a..e411cf77 100644 --- a/projects/flosportsinc/ng-grid-list/common/grid/grid.component.scss +++ b/projects/flosportsinc/ng-grid-list/common/grid/grid.component.scss @@ -22,17 +22,16 @@ position: relative; color: white; - ::ng-deep :first-child { + ::ng-deep > :first-child, ::ng-deep > video { position: absolute; top: 0; left: 0; height: 100%; width: 100%; + } + ::ng-deep video { max-width: 100%; object-fit: cover; - display: flex; - align-items: center; - justify-content: center; } } diff --git a/projects/flosportsinc/ng-grid-list/common/grid/grid.component.spec.ts b/projects/flosportsinc/ng-grid-list/common/grid/grid.component.spec.ts index 3a09928e..08e76f4c 100644 --- a/projects/flosportsinc/ng-grid-list/common/grid/grid.component.spec.ts +++ b/projects/flosportsinc/ng-grid-list/common/grid/grid.component.spec.ts @@ -162,11 +162,13 @@ describe(FloGridListViewComponent.name, () => { }) it('should get native when orientation is landscape', () => { - const sut = createSut().instance; + const sut = createSut().instance + const { width, height } = (window).screen; (window).screen = { width: 300, height: 400 } expect(window.screen.height).toEqual(400) expect(window.screen.width).toEqual(300) - expect(sut.getNativeAspectRatio()).toEqual(`${window.screen.width / window.screen.height * 100}%`) + expect(sut.getNativeAspectRatio()).toEqual(`${window.screen.width / window.screen.height * 100}%`); + (window).screen = { width, height } // reset window object }) it('should run change detection on fullscreen change', () => {