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:
committed by
Bianca Widstam
parent
3f632e6031
commit
c21aa2dc73
@@ -12,6 +12,7 @@ export const Video = gql`
|
||||
}
|
||||
}
|
||||
}
|
||||
poster_image
|
||||
focal_point {
|
||||
x
|
||||
y
|
||||
|
||||
@@ -2,6 +2,7 @@ import { z } from "zod"
|
||||
|
||||
import { Lang } from "@scandic-hotels/common/constants/language"
|
||||
import { focalPointSchema } from "@scandic-hotels/common/utils/focalPoint"
|
||||
import { transformedImageVaultAssetSchema } from "@scandic-hotels/common/utils/imageVault"
|
||||
|
||||
import { assetSystemSchema } from "./system"
|
||||
|
||||
@@ -16,6 +17,7 @@ export const videoSchema = z.object({
|
||||
})
|
||||
),
|
||||
}),
|
||||
poster_image: transformedImageVaultAssetSchema.nullish(),
|
||||
focal_point: focalPointSchema.nullish(),
|
||||
captions: z.array(
|
||||
z.object({
|
||||
@@ -57,6 +59,12 @@ export const transformedVideoSchema = videoSchema
|
||||
|
||||
return {
|
||||
sources,
|
||||
poster: video.poster_image?.url
|
||||
? {
|
||||
src: video.poster_image.url,
|
||||
dimensions: video.poster_image.dimensions,
|
||||
}
|
||||
: null,
|
||||
focalPoint: video.focal_point
|
||||
? { x: video.focal_point.x, y: video.focal_point.y }
|
||||
: { x: 50, y: 50 },
|
||||
|
||||
Reference in New Issue
Block a user