This commit is contained in:
Schmelczer András 2020-01-06 21:40:25 +01:00
parent f054546aa6
commit 48a55a4a97
51 changed files with 604 additions and 577 deletions

View file

@ -0,0 +1,21 @@
import { Primitive } from '../primitive';
import { url } from '../../../model/misc';
export class Video implements Primitive {
public constructor(
private readonly poster: url,
private readonly mp4: url,
private readonly webm: url,
private readonly options?: string
) {}
public toHTML(disableInnerShadow = false): string {
return `
${!disableInnerShadow ? `<div class="figure-container">` : ''}
<video ${this.options} poster="${this.poster}">
<source src="${this.webm}" type="video/webm"/>
<source src="${this.mp4}" type="video/mp4"/>
</video>
${!disableInnerShadow ? `</div>` : ''}
`;
}
}