jwplayer-video-element
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -90,17 +90,20 @@ import { SuperVideoElement } from 'super-media-element'; | ||
super.attributeChangedCallback(attrName, oldValue, newValue); | ||
if (['controls', 'muted'].includes(attrName)) { | ||
// Don't await super.attributeChangedCallback above, it would resolve later. | ||
await this.loadComplete; | ||
// Don't await super.attributeChangedCallback above, it would resolve later. | ||
await this.loadComplete; | ||
switch (attrName) { | ||
case 'controls': | ||
this.api | ||
.getContainer() | ||
.classList.toggle('jw-no-controls', !this.controls); | ||
break; | ||
case 'muted': | ||
this.muted = this.getAttribute('muted') != null; | ||
break; | ||
} | ||
return; | ||
} | ||
switch (attrName) { | ||
case 'controls': | ||
this.api | ||
.getContainer() | ||
.classList.toggle('jw-no-controls', !this.controls); | ||
break; | ||
case 'muted': | ||
this.muted = this.getAttribute('muted') != null; | ||
break; | ||
} | ||
super.attributeChangedCallback(attrName, oldValue, newValue); | ||
} | ||
@@ -117,3 +120,2 @@ | ||
set src(val) { | ||
if (this.src == val) return; | ||
this.setAttribute('src', val); | ||
@@ -123,3 +125,2 @@ } | ||
set controls(val) { | ||
if (this.controls == val) return; | ||
this.toggleAttribute('controls', Boolean(val)); | ||
@@ -126,0 +127,0 @@ } |
{ | ||
"name": "jwplayer-video-element", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"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": "^0.4.2" | ||
"super-media-element": "1.0.0" | ||
}, | ||
@@ -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
8678
153
+ Addedsuper-media-element@1.0.0(transitive)
- Removedsuper-media-element@0.4.2(transitive)
Updatedsuper-media-element@1.0.0