mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
9 lines
477 B
TypeScript
9 lines
477 B
TypeScript
import ads from 'artplayer-plugin-ads'
|
|
|
|
const option: Parameters<typeof ads>[0] = { html: '<b>ad</b>', video: 'ad.mp4', url: '/ad', totalDuration: '10', playDuration: 2, muted: true }
|
|
const plugin = ads(option)
|
|
const resultName: ReturnType<typeof plugin>['name'] = 'artplayerPluginAds'
|
|
const result: ReturnType<typeof plugin> = { name: resultName, skip() {}, pause() {}, play() {} }
|
|
const returns: void[] = [result.skip(), result.pause(), result.play()]
|
|
void [returns, plugin]
|