Merged in fix/BOOK-257-video-player (pull request #3373)

Fix/BOOK-257 video player

* fix(BOOK-257): Fixes to VideoPlayerButton and added stories

* fix(BOOK-257): Hiding mute button when the user has interacted with it

* fix(BOOK-257): Added support for poster image

* fix(BOOK-257): add crossOrigin attr to videoplayer

* fix(BOOK-257): comment


Approved-by: Anton Gunnarsson
This commit is contained in:
Erik Tiekstra
2025-12-19 12:41:00 +00:00
committed by Bianca Widstam
parent 3f632e6031
commit c21aa2dc73
15 changed files with 436 additions and 117 deletions

View File

@@ -1,5 +1,6 @@
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import { Lang } from '@scandic-hotels/common/constants/language'
import { VideoWithCard } from '.'
import { config } from './variants'
@@ -80,7 +81,7 @@ const meta: Meta<typeof VideoWithCard> = {
table: {
type: {
summary:
'{ sources: { src: string; type: string }[]; captions?: Caption[]; focalPoint?: FocalPoint}',
'{ sources: { src: string; type: string }[]; poster?: { src: string; dimensions?: { width: number; height: number } }; captions?: Caption[]; focalPoint?: FocalPoint}',
},
},
description:
@@ -104,6 +105,22 @@ const videoProps = {
type: 'video/webm',
},
],
poster: {
src: 'https://imagevault.scandichotels.com/publishedmedia/dtpv2wgm6jhix2pqpp88/Scandic_Downtown_Camper_restaurang_bar_The_Nest_lounge_eld.jpg',
},
captions: [
{
src: './video/captions_en.vtt',
srcLang: Lang.en,
isDefault: false,
},
{
src: './video/captions_sv.vtt',
srcLang: Lang.sv,
isDefault: false,
},
],
fullHeight: true,
}
const quoteCardProps = {