Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add type attribute and fallback widths #19

Merged
merged 8 commits into from
Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/node_modules/
/lib/
/test/
/dist/
/docs/node_modules
custom-elements.json
# top level source
Expand Down
53 changes: 53 additions & 0 deletions dev/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<!-- HLS video that fills container -->
<div style="display: flex; width: 480px; height: 255px">
<ix-video
source="https://assets.imgix.video/videos/girl-reading-book-in-library.mp4"
controls
></ix-video>
</div>
<!-- HLS video with no w attribute fills container w -->
<div style="display: flex; width: 480px; height: 255px">
<ix-video
source="https://assets.imgix.video/videos/girl-reading-book-in-library.mp4"
controls
height="255"
></ix-video>
</div>
<!-- HLS video with w/h attributes -->
<ix-video
source="https://assets.imgix.video/videos/girl-reading-book-in-library.mp4"
controls
width="480"
height="255"
></ix-video>
<!-- HLS video without w/h attributes -->
<ix-video
source="https://assets.imgix.video/videos/girl-reading-book-in-library.mp4"
controls
></ix-video>
<!-- HLS video with dataSetup -->
<ix-video
source="https://assets.imgix.video/videos/girl-reading-book-in-library.mp4"
controls
dataSetup='{"width": 480}'
></ix-video>
<!-- MP4 video that fills container -->
<div style="display: flex; width: 480px; height: 255px">
<ix-video
source="https://assets.imgix.net/videos/girl-reading-book-in-library.mp4"
controls
type="video/mp4"
></ix-video>
</div>
<script type="module" src="./main.ts"></script>
</body>
</html>
1 change: 1 addition & 0 deletions dev/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '~/index';
9 changes: 9 additions & 0 deletions dev/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { resolve } from 'path';
import { defineConfig } from 'vite';
import viteConfig from '../vite.config';

export default defineConfig({
...viteConfig,
root: resolve(__dirname, './'),
publicDir: resolve(__dirname, './public'),
});
49 changes: 0 additions & 49 deletions dist/index.bundled.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/index.bundled.d.ts.map

This file was deleted.

112 changes: 0 additions & 112 deletions dist/index.bundled.js

This file was deleted.

Loading