diff --git a/src/app/components/MediaLoader/configs/index.ts b/src/app/components/MediaLoader/configs/index.ts index 5e95675bf68..fc0a9a694bd 100644 --- a/src/app/components/MediaLoader/configs/index.ts +++ b/src/app/components/MediaLoader/configs/index.ts @@ -42,6 +42,8 @@ const blockTypeMapping: Record< export default (blocks: MediaBlock[]) => { const blockType = BLOCK_TYPES.find(type => filterForBlockType(blocks, type)); + console.log('blockType', blockType); + if (!blockType) return null; return blockTypeMapping[blockType]; diff --git a/src/app/components/MediaLoader/configs/liveMedia.ts b/src/app/components/MediaLoader/configs/liveMedia.ts index 137f903c5f9..4d599e35469 100644 --- a/src/app/components/MediaLoader/configs/liveMedia.ts +++ b/src/app/components/MediaLoader/configs/liveMedia.ts @@ -77,6 +77,23 @@ export default ({ summary: short, ...(warning && { warning }), }, + // Currently no simple way to determine from the data wether to load the plugin, as a Dazzler stream can't be distinguished from media collection items in TIPO. + plugins: { + toLoad: [ + { + html: 'https://ws-dazzler-web-statics-dev.s3.eu-west-1.amazonaws.com/plugin/DazzlerEdgePlugin.js', + playerOnly: true, + // @ts-expect-error - this is a custom property used to pass data to the plugin when it initializes + data: { + env: 'test', + sid: 'bbc_hindi_tv', + holdingImageURL: + 'https://ichef.bbci.co.uk/images/ic/1920x1080/p08b8mq7.png', + uiLanguage: 'hi', + }, + }, + ], + }, }, mediaType: 'video', showAds: false, diff --git a/src/app/components/MediaLoader/index.tsx b/src/app/components/MediaLoader/index.tsx index 0c2e69e64d2..35ab26fd9a6 100644 --- a/src/app/components/MediaLoader/index.tsx +++ b/src/app/components/MediaLoader/index.tsx @@ -266,6 +266,8 @@ const MediaLoader = ({ embedded, }); + console.log(config); + if (!config) return null; const { diff --git a/src/app/components/MediaLoader/utils/buildSettings.ts b/src/app/components/MediaLoader/utils/buildSettings.ts index f212670ee8f..dd9853c952c 100644 --- a/src/app/components/MediaLoader/utils/buildSettings.ts +++ b/src/app/components/MediaLoader/utils/buildSettings.ts @@ -56,7 +56,7 @@ const buildSettings = ({ }, ...(!embedded && { superResponsive: true }), ...(counterName && { counterName }), - ...(isTestRequested() && { mediator: { host: 'open.test.bbc.co.uk' } }), + ...(isTestRequested() && { mediator: { host: 'open.live.bbc.co.uk' } }), statsObject: { destination: statsDestination, producer, diff --git a/ws-nextjs-app/package.json b/ws-nextjs-app/package.json index 0f3e661fd38..001e3f5dfe3 100644 --- a/ws-nextjs-app/package.json +++ b/ws-nextjs-app/package.json @@ -48,6 +48,7 @@ }, "dependencies": { "next": "16.1.6", - "sharp": "0.34.5" + "sharp": "0.34.5", + "temporal-polyfill": "0.3.0" } } diff --git a/ws-nextjs-app/pages/[service]/watch/[id]/live/LiveTvPageLayout.tsx b/ws-nextjs-app/pages/[service]/watch/[id]/live/LiveTvPageLayout.tsx index b023e097ff5..5f7d1588e8d 100644 --- a/ws-nextjs-app/pages/[service]/watch/[id]/live/LiveTvPageLayout.tsx +++ b/ws-nextjs-app/pages/[service]/watch/[id]/live/LiveTvPageLayout.tsx @@ -10,6 +10,7 @@ import ChartbeatAnalytics from '#app/components/ChartbeatAnalytics'; import LinkedData from '#app/components/LinkedData'; import { LiveTVPageProps } from './types'; import styles from './styles'; +import 'temporal-polyfill/global'; const renderCuration = ({ curation }: { curation: CurationType }) => { const { diff --git a/yarn.lock b/yarn.lock index 17ea3d89b95..7b9804b6f6e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17482,6 +17482,7 @@ __metadata: npm-run-all2: "npm:8.0.4" sharp: "npm:0.34.5" swc-loader: "npm:0.2.7" + temporal-polyfill: "npm:0.3.0" ts-node: "npm:10.9.2" languageName: unknown linkType: soft @@ -18407,6 +18408,22 @@ __metadata: languageName: node linkType: hard +"temporal-polyfill@npm:0.3.0": + version: 0.3.0 + resolution: "temporal-polyfill@npm:0.3.0" + dependencies: + temporal-spec: "npm:0.3.0" + checksum: 10/e4f5c0e546bf663720569b8b68fc41aa43ea891a77043a5614f6c1f2109cd01fe60c90b9de2f5d4f92f3155bfbdd17ad3ec7de1e9aaf01fa3cf156f230a0e41a + languageName: node + linkType: hard + +"temporal-spec@npm:0.3.0": + version: 0.3.0 + resolution: "temporal-spec@npm:0.3.0" + checksum: 10/5863e3e3f364a5cf64bf999c85bf19b08924a91ee8d618489d9bf6cfff2452e4f916080c8ede93fc91de609200fc20002928e0146c7fc15375b123b20234799b + languageName: node + linkType: hard + "terser-webpack-plugin@npm:5.3.14, terser-webpack-plugin@npm:^5.3.14": version: 5.3.14 resolution: "terser-webpack-plugin@npm:5.3.14"