mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 19:41:25 -08:00
refactor(vast): [PKG-VAST-03] isolate lifecycle ownership checkpoint
This commit is contained in:
1 parent
d5e1feadf5
commit
4f324a8438
30 files changed
+1453
-383
No files matched your search
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user