mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-15 17:16:16 -08:00
20 lines
564 B
TypeScript
20 lines
564 B
TypeScript
import type { Utilities } from './types'
|
|
|
|
let nextId = 0
|
|
|
|
export function createContainer(utils: Utilities, workspaceMode: boolean): HTMLDivElement {
|
|
const container = utils.createElement('div')
|
|
container.id = `${workspaceMode ? 'art-vast-' : 'art-'}${Date.now()}-${++nextId}`
|
|
utils.setStyles(container, {
|
|
position: 'absolute',
|
|
inset: '0',
|
|
width: '100%',
|
|
height: '100%',
|
|
zIndex: '150',
|
|
display: 'none',
|
|
})
|
|
if (workspaceMode)
|
|
utils.setStyles(container, { backgroundColor: 'black', pointerEvents: 'auto' })
|
|
return container
|
|
}
|