jwplayer-video-element
Advanced tools
Comparing version 1.0.4 to 1.0.5
import { SuperVideoElement } from 'super-media-element'; | ||
const templateLightDOM = document.createElement('template'); | ||
templateLightDOM.innerHTML = /*html*/` | ||
<style class="jw-style"> | ||
.jw-no-controls [class*="jw-controls"], | ||
.jw-no-controls .jw-title { | ||
display: none !important; | ||
} | ||
</style> | ||
<div class="jwplayer"></div> | ||
`; | ||
const templateLightDOM = globalThis.document?.createElement('template'); | ||
if (templateLightDOM) { | ||
templateLightDOM.innerHTML = /*html*/` | ||
<style class="jw-style"> | ||
.jw-no-controls [class*="jw-controls"], | ||
.jw-no-controls .jw-title { | ||
display: none !important; | ||
} | ||
</style> | ||
<div class="jwplayer"></div> | ||
`; | ||
} | ||
const templateShadowDOM = document.createElement('template'); | ||
templateShadowDOM.innerHTML = /*html*/` | ||
<style> | ||
:host { | ||
display: inline-block; | ||
min-width: 300px; | ||
min-height: 150px; | ||
position: relative; | ||
} | ||
::slotted(.jwplayer) { | ||
position: absolute !important; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
</style> | ||
<slot></slot> | ||
`; | ||
const templateShadowDOM = globalThis.document?.createElement('template'); | ||
if (templateShadowDOM) { | ||
templateShadowDOM.innerHTML = /*html*/` | ||
<style> | ||
:host { | ||
display: inline-block; | ||
min-width: 300px; | ||
min-height: 150px; | ||
position: relative; | ||
} | ||
::slotted(.jwplayer) { | ||
position: absolute !important; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
</style> | ||
<slot></slot> | ||
`; | ||
} | ||
@@ -127,3 +131,3 @@ class JWPlayerVideoElement extends SuperVideoElement { | ||
if (!globalThis.customElements.get('jwplayer-video')) { | ||
if (globalThis.customElements && !globalThis.customElements.get('jwplayer-video')) { | ||
globalThis.customElements.define('jwplayer-video', JWPlayerVideoElement); | ||
@@ -130,0 +134,0 @@ } |
{ | ||
"name": "jwplayer-video-element", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "A custom element for the JW player with an API that matches the `<video>` API", | ||
@@ -21,3 +21,3 @@ "type": "module", | ||
"dependencies": { | ||
"super-media-element": "~1.2.1" | ||
"super-media-element": "~1.2.4" | ||
}, | ||
@@ -24,0 +24,0 @@ "devDependencies": { |
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
7552
114
Updatedsuper-media-element@~1.2.4