custom-media-element
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -61,2 +61,3 @@ /** | ||
</style> | ||
<slot name="media"></slot> | ||
<slot></slot> | ||
@@ -66,2 +67,5 @@ `; | ||
// If the `media` slot is used leave the styling up to the user. | ||
// It's a more consistent behavior pre and post custom element upgrade. | ||
export const videoTemplate = globalThis.document?.createElement('template'); | ||
@@ -91,2 +95,3 @@ | ||
</style> | ||
<slot name="media"></slot> | ||
<slot></slot> | ||
@@ -226,2 +231,3 @@ `; | ||
?? this.shadowRoot.querySelector(tag) | ||
?? this.querySelector(':scope > slot[slot=media]') | ||
?? this.querySelector(tag); | ||
@@ -228,0 +234,0 @@ } |
{ | ||
"name": "custom-media-element", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "A custom element for extending the native media elements (<audio> or <video>)", | ||
@@ -20,11 +20,9 @@ "type": "module", | ||
"lint": "npx eslint *.js -c ./node_modules/wet-run/.eslintrc.json", | ||
"pretest": "esbuild custom-media-element.js --target=es2019 --bundle --outdir=dist", | ||
"test": "web-test-runner --config test/web-test-runner.config.js", | ||
"pretest": "esbuild custom-media-element.js --target=es2019 --bundle --outdir=dist --global-name=CustomMediaElement", | ||
"test": "wet run test/eager-upgrade.html test/lazy-upgrade.html --coverage", | ||
"dev": "wet serve --redirect :examples/" | ||
}, | ||
"devDependencies": { | ||
"@open-wc/testing": "^3.1.8", | ||
"@web/test-runner": "^0.16.1", | ||
"esbuild": "^0.17.19", | ||
"wet-run": "^0.5.1" | ||
"esbuild": "^0.19.8", | ||
"wet-run": "^0.9.1" | ||
}, | ||
@@ -31,0 +29,0 @@ "keywords": [ |
@@ -5,2 +5,3 @@ # Custom Media Element | ||
[![Badge size](https://img.badgesize.io/https://cdn.jsdelivr.net/npm/custom-media-element/+esm?compression=gzip&label=gzip&style=flat-square)](https://cdn.jsdelivr.net/npm/custom-media-element/+esm) | ||
[![Codecov](https://img.shields.io/codecov/c/github/muxinc/custom-media-element?style=flat-square)](https://app.codecov.io/gh/muxinc/custom-media-element) | ||
@@ -7,0 +8,0 @@ A custom element for extending the native media elements (`<audio>` or `<video>`). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18594
2
352
106