refactor(vast): [PKG-VAST-03] isolate lifecycle ownership checkpoint

This commit is contained in:
Harvey Zhao committed 2026-09-12 09:33:54 +08:00
1 parent d5e1feadf5
commit 4f324a8438
30 files changed
+1453 -383

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import type { ImaSdk } from '@alugha/ima'
import type { RequestConfig } from './types'
export { loadImaSdk, Player, PlayerOptions } from '@glomex/vast-ima-player'
export function createRequest(ima: ImaSdk, field: 'adTagUrl' | 'adsResponse', value: string, config: RequestConfig) {
const request = new ima.AdsRequest()
request[field] = value
// Preserve the historical SDK extension surface, including inherited config fields.
const fields = request as unknown as Record<string, unknown>
for (const key in config)
fields[key] = config[key]
return request
}