[go: nahoru, domu]

Skip to content

Commit

Permalink
Add dist files
Browse files Browse the repository at this point in the history
  • Loading branch information
levmyshkin committed May 3, 2024
1 parent 753a314 commit 29ba2e3
Show file tree
Hide file tree
Showing 11 changed files with 13,174 additions and 47 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,4 @@ typings/
# DynamoDB Local files
.dynamodb/

# Do not version dist
dist

.DS_Store
13 changes: 13 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "levmyshkin/vidbg",
"description": "An HTML5 video player.",
"type": "drupal-library",
"keywords": [
"video background",
"html5",
"video",
"player"
],
"homepage": "https://drupalbook.org/",
"license": "MIT"
}
2 changes: 2 additions & 0 deletions dist/types/definitions/defaultVidbgAttributes.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { VidbgAttributes } from "../types/types";
export declare const defaultAttributes: VidbgAttributes;
2 changes: 2 additions & 0 deletions dist/types/definitions/defaultVidbgOptions.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { VidbgOptions } from "../types/types";
export declare const defaultOptions: VidbgOptions;
4 changes: 4 additions & 0 deletions dist/types/errors/InvalidSelectorError.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare class InvalidSelectorError extends Error {
constructor(message: string);
}
export default InvalidSelectorError;
4 changes: 4 additions & 0 deletions dist/types/errors/VideoSourceNotSpecifiedError.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare class VideoSourceNotSpecifiedError extends Error {
constructor(message: string);
}
export default VideoSourceNotSpecifiedError;
14 changes: 14 additions & 0 deletions dist/types/types/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export interface VidbgOptions {
mp4: string | null;
webm: string | null;
poster: string | null;
overlay: boolean;
overlayColor: string;
overlayAlpha: number;
}
export interface VidbgAttributes {
controls: boolean;
loop: boolean;
muted: boolean;
playsInline: boolean;
}
26 changes: 26 additions & 0 deletions dist/types/vidbg.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { VidbgAttributes, VidbgOptions } from "./types/types";
declare class vidbg {
el: HTMLElement;
options: VidbgOptions;
attributes: VidbgAttributes;
containerEl: HTMLElement;
overlayEl: HTMLElement;
videoEl: HTMLVideoElement;
constructor(selector: string, options?: VidbgOptions, attributes?: VidbgAttributes);
private init;
private createContainer;
private createOverlay;
private createPoster;
private createVideo;
private onPlayEvent;
removeVideo: () => void;
getVideo: () => HTMLVideoElement;
getEl: () => HTMLElement;
isVideoPlaying: () => boolean;
playVideo: () => Promise<void>;
pauseVideo: () => void;
destroy: () => void;
resize: () => void;
}
export { VidbgOptions, VidbgAttributes };
export default vidbg;
31 changes: 31 additions & 0 deletions dist/vidbg.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.vidbg-container {
position: absolute;
z-index: -1;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
}

.vidbg-container video {
position: absolute;
margin: 0;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
transition: 0.25s opacity ease-in-out;
max-width: none;
opacity: 0;
}

.vidbg-overlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
6 changes: 6 additions & 0 deletions dist/vidbg.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 29ba2e3

Please sign in to comment.