@weareglow/media-components
Advanced tools
Comparing version 0.0.5 to 0.0.6
{ | ||
"entries": [ | ||
"components/lockup/lockup.js", | ||
"components/cta-button/cta-button.js", | ||
"components/background-video/background-video.js", | ||
"components/media-unit/media-unit.js", | ||
"components/lockup/lockup.js", | ||
"components/story/story.js", | ||
"components/my-component/my-component.js", | ||
"components/tune-in/tune-in.js", | ||
"components/trailer-video/trailer-video.js", | ||
"components/background-video/background-video.js" | ||
"components/tune-in/tune-in.js" | ||
], | ||
@@ -11,0 +12,0 @@ "compiler": { |
@@ -15,3 +15,3 @@ import { h } from "@stencil/core"; | ||
render() { | ||
return [ | ||
return (h("div", { onClick: () => this.mediaExit.emit(), class: "glow-background-video-container" }, | ||
h("video", { class: "glow-background-video", ref: el => (this.videoEl = el), src: getUrl(this.videoSrc), muted: true, playsinline: true }), | ||
@@ -21,4 +21,3 @@ h("img", { class: { | ||
'is-hidden': !this.ended | ||
}, src: getUrl(this.endframeImage), alt: "" }) | ||
]; | ||
}, src: getUrl(this.endframeImage), alt: "" }))); | ||
} | ||
@@ -71,2 +70,18 @@ static get is() { return "glow-background-video"; } | ||
}; } | ||
static get events() { return [{ | ||
"method": "mediaExit", | ||
"name": "media-exit", | ||
"bubbles": true, | ||
"cancelable": true, | ||
"composed": true, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"complexType": { | ||
"original": "any", | ||
"resolved": "any", | ||
"references": {} | ||
} | ||
}]; } | ||
static get listeners() { return [{ | ||
@@ -73,0 +88,0 @@ "name": "media-start", |
@@ -9,3 +9,3 @@ import { h, Host } from "@stencil/core"; | ||
return (h(Host, { class: { lockup: true } }, | ||
h("div", { class: "lockup-inner" }, | ||
h("div", { class: "lockup-inner", onClick: () => this.mediaExit.emit() }, | ||
h("div", { class: "lockup-left", style: { | ||
@@ -56,2 +56,18 @@ paddingLeft: this.lockupPadding | ||
}; } | ||
static get events() { return [{ | ||
"method": "mediaExit", | ||
"name": "media-exit", | ||
"bubbles": true, | ||
"cancelable": true, | ||
"composed": true, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"complexType": { | ||
"original": "any", | ||
"resolved": "any", | ||
"references": {} | ||
} | ||
}]; } | ||
} |
@@ -10,4 +10,4 @@ import { h, Host } from "@stencil/core"; | ||
} | ||
mediaUnitExit() { | ||
Enabler.exit(this.exitLink); | ||
mediaUnitExit(e) { | ||
Enabler.exit(e.detail ? e.detail.exitLink : this.exitLink); | ||
} | ||
@@ -46,3 +46,3 @@ connectedCallback() { | ||
render() { | ||
return (h(Host, { onClick: () => this.mediaExit.emit(), class: { | ||
return (h(Host, { class: { | ||
preview: !this.isLive, | ||
@@ -255,3 +255,3 @@ 'is-hidden': !this.enablerInit, | ||
"method": "mediaUnitExit", | ||
"target": undefined, | ||
"target": "document", | ||
"capture": false, | ||
@@ -258,0 +258,0 @@ "passive": false |
@@ -77,3 +77,3 @@ import { h } from "@stencil/core"; | ||
render() { | ||
return (h("div", { class: "trailer-video-container", style: { height: `${this.height}px`, width: `${this.width}px` } }, | ||
return (h("div", { onClick: () => this.mediaExit.emit(), class: "trailer-video-container", style: { height: `${this.height}px`, width: `${this.width}px` } }, | ||
h("video", { class: "trailer-video", ref: el => (this.videoEl = el), onEnded: () => (this.hasEnded = true), onPlay: () => (this.hasEnded = false), onLoadedMetaData: () => this.trackVideo(), src: getUrl(this.src), muted: this.muted, autoplay: this.autoplay, playsinline: true }), | ||
@@ -276,2 +276,18 @@ h("div", { class: "exit-container", onClick: () => this.handleExit(), style: this.getExitContainerStyle() }), | ||
}; } | ||
static get events() { return [{ | ||
"method": "mediaExit", | ||
"name": "media-exit", | ||
"bubbles": true, | ||
"cancelable": true, | ||
"composed": true, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"complexType": { | ||
"original": "any", | ||
"resolved": "any", | ||
"references": {} | ||
} | ||
}]; } | ||
static get elementRef() { return "el"; } | ||
@@ -278,0 +294,0 @@ static get watchers() { return [{ |
@@ -1,1 +0,6 @@ | ||
import{p as e,b as o}from"./p-3ca2d107.js";e().then(e=>o([["p-ncjzwwwj",[[4,"glow-trailer-video",{src:[1],width:[8],height:[8],videoTitle:[1,"video-title"],autoplay:[4],controlBtnFill:[1,"control-btn-fill"],controlBtnHoverFill:[1,"control-btn-hover-fill"],controlPosition:[1,"control-position"],endframeImage:[1,"endframe-image"],controlIsHovered:[32],muted:[32],hasInteracted:[32],hasEnded:[32]},[[32,"media-exit","handleMediaExit"],[32,"media-start","handleMediaStart"]]]]],["p-oopxj1fy",[[1,"my-component",{first:[1],middle:[1],last:[1]}]]],["p-ta14hfnr",[[4,"glow-media-unit",{previewBgColor:[1,"preview-bg-color"],exitLink:[1,"exit-link"],premiereDate:[1,"premiere-date"],testDate:[8,"test-date"],size:[1],backgroundVideoSrc:[1,"background-video-src"],backgroundVideoEndframeSrc:[1,"background-video-endframe-src"],enablerInit:[32]},[[0,"media-exit","mediaUnitExit"]]],[0,"glow-cta-button",{backgroundColor:[1,"background-color"],hoverBackgroundColor:[1,"hover-background-color"],fontColor:[1,"font-color"],hoverFontColor:[1,"hover-font-color"],buttonText:[1,"button-text"],hovered:[32]}],[4,"glow-lockup",{lockupPadding:[1,"lockup-padding"]}],[4,"glow-tune-in",{date:[1,"show-if"],dateRange:[1,"show-only-between"],day:[1,"show-only-on"],isFallback:[4,"is-fallback"],isCurrent:[32]},[[32,"tune-in-ready","tuneInReadyHandler"]]],[0,"glow-background-video",{videoSrc:[1,"video-src"],endframeImage:[1,"endframe-image"],ended:[32]},[[32,"media-start","mediaStartHandler"],[32,"media-exit","mediaUnitExit"]]]]]],e)); | ||
import { p as patchBrowser, g as globals, b as bootstrapLazy } from './core-8f437b10.js'; | ||
patchBrowser().then(options => { | ||
globals(); | ||
return bootstrapLazy([["glow-media-unit",[[4,"glow-media-unit",{"previewBgColor":[1,"preview-bg-color"],"exitLink":[1,"exit-link"],"premiereDate":[1,"premiere-date"],"testDate":[8,"test-date"],"size":[1],"backgroundVideoSrc":[1,"background-video-src"],"backgroundVideoEndframeSrc":[1,"background-video-endframe-src"],"enablerInit":[32]},[[4,"media-exit","mediaUnitExit"]]]]],["glow-cta-button",[[0,"glow-cta-button",{"backgroundColor":[1,"background-color"],"hoverBackgroundColor":[1,"hover-background-color"],"fontColor":[1,"font-color"],"hoverFontColor":[1,"hover-font-color"],"buttonText":[1,"button-text"],"hovered":[32]}]]],["glow-lockup",[[4,"glow-lockup",{"lockupPadding":[1,"lockup-padding"]}]]],["glow-story",[[4,"glow-story",{"exitLink":[1,"exit-link"],"autoAnimate":[4,"auto-animate"],"endframeImage":[1,"endframe-image"],"replayBtnFill":[1,"replay-btn-fill"],"playing":[32]}]]],["glow-trailer-video",[[4,"glow-trailer-video",{"src":[1],"width":[8],"height":[8],"videoTitle":[1,"video-title"],"autoplay":[4],"controlBtnFill":[1,"control-btn-fill"],"controlBtnHoverFill":[1,"control-btn-hover-fill"],"controlPosition":[1,"control-position"],"endframeImage":[1,"endframe-image"],"controlIsHovered":[32],"muted":[32],"hasInteracted":[32],"hasEnded":[32]},[[32,"media-exit","handleMediaExit"],[32,"media-start","handleMediaStart"]]]]],["glow-tune-in",[[4,"glow-tune-in",{"date":[1,"show-if"],"dateRange":[1,"show-only-between"],"day":[1,"show-only-on"],"isFallback":[4,"is-fallback"],"isCurrent":[32]},[[32,"tune-in-ready","tuneInReadyHandler"]]]]],["my-component",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["glow-background-video",[[0,"glow-background-video",{"videoSrc":[1,"video-src"],"endframeImage":[1,"endframe-image"],"ended":[32]},[[32,"media-start","mediaStartHandler"],[32,"media-exit","mediaUnitExit"]]]]]], options); | ||
}); |
@@ -36,2 +36,8 @@ /* eslint-disable */ | ||
} | ||
interface GlowStory { | ||
'autoAnimate': boolean; | ||
'endframeImage': string; | ||
'exitLink': string; | ||
'replayBtnFill': string; | ||
} | ||
interface GlowTrailerVideo { | ||
@@ -97,2 +103,8 @@ 'autoplay': boolean; | ||
interface HTMLGlowStoryElement extends Components.GlowStory, HTMLStencilElement {} | ||
const HTMLGlowStoryElement: { | ||
prototype: HTMLGlowStoryElement; | ||
new (): HTMLGlowStoryElement; | ||
}; | ||
interface HTMLGlowTrailerVideoElement extends Components.GlowTrailerVideo, HTMLStencilElement {} | ||
@@ -120,2 +132,3 @@ const HTMLGlowTrailerVideoElement: { | ||
'glow-media-unit': HTMLGlowMediaUnitElement; | ||
'glow-story': HTMLGlowStoryElement; | ||
'glow-trailer-video': HTMLGlowTrailerVideoElement; | ||
@@ -130,2 +143,3 @@ 'glow-tune-in': HTMLGlowTuneInElement; | ||
'endframeImage'?: string; | ||
'onMedia-exit'?: (event: CustomEvent<any>) => void; | ||
'videoSrc'?: string; | ||
@@ -142,2 +156,3 @@ } | ||
'lockupPadding'?: string; | ||
'onMedia-exit'?: (event: CustomEvent<any>) => void; | ||
} | ||
@@ -157,2 +172,14 @@ interface GlowMediaUnit { | ||
} | ||
interface GlowStory { | ||
'autoAnimate'?: boolean; | ||
'endframeImage'?: string; | ||
'exitLink'?: string; | ||
'onMedia-exit'?: (event: CustomEvent<any>) => void; | ||
'onStory-end'?: (event: CustomEvent<any>) => void; | ||
'onStory-last-chapter'?: (event: CustomEvent<any>) => void; | ||
'onStory-skip-to-end'?: (event: CustomEvent<any>) => void; | ||
'onStory-start'?: (event: CustomEvent<any>) => void; | ||
'onStory-update'?: (event: CustomEvent<any>) => void; | ||
'replayBtnFill'?: string; | ||
} | ||
interface GlowTrailerVideo { | ||
@@ -165,2 +192,3 @@ 'autoplay'?: boolean; | ||
'height'?: number | string; | ||
'onMedia-exit'?: (event: CustomEvent<any>) => void; | ||
'src': string; | ||
@@ -196,2 +224,3 @@ 'videoTitle'?: string; | ||
'glow-media-unit': GlowMediaUnit; | ||
'glow-story': GlowStory; | ||
'glow-trailer-video': GlowTrailerVideo; | ||
@@ -213,2 +242,3 @@ 'glow-tune-in': GlowTuneIn; | ||
'glow-media-unit': LocalJSX.GlowMediaUnit & JSXBase.HTMLAttributes<HTMLGlowMediaUnitElement>; | ||
'glow-story': LocalJSX.GlowStory & JSXBase.HTMLAttributes<HTMLGlowStoryElement>; | ||
'glow-trailer-video': LocalJSX.GlowTrailerVideo & JSXBase.HTMLAttributes<HTMLGlowTrailerVideoElement>; | ||
@@ -215,0 +245,0 @@ 'glow-tune-in': LocalJSX.GlowTuneIn & JSXBase.HTMLAttributes<HTMLGlowTuneInElement>; |
@@ -0,1 +1,2 @@ | ||
import { EventEmitter } from '../../stencil.core'; | ||
export declare class BackgroundVideo { | ||
@@ -8,3 +9,4 @@ videoSrc: string; | ||
mediaUnitExit(): void; | ||
render(): any[]; | ||
mediaExit: EventEmitter; | ||
render(): any; | ||
} |
@@ -0,4 +1,6 @@ | ||
import { EventEmitter } from '../../stencil.core'; | ||
export declare class Lockup { | ||
lockupPadding: string; | ||
mediaExit: EventEmitter; | ||
render(): any; | ||
} |
import { EventEmitter } from '../../stencil.core'; | ||
export declare class MediaUnit { | ||
isLive: boolean; | ||
currentTimeFrame: string; | ||
height: string; | ||
@@ -19,3 +18,3 @@ width: string; | ||
tuneInReady: EventEmitter; | ||
mediaUnitExit(): void; | ||
mediaUnitExit(e: any): void; | ||
connectedCallback(): void; | ||
@@ -22,0 +21,0 @@ componentWillLoad(): void; |
@@ -0,1 +1,2 @@ | ||
import { EventEmitter } from '../../stencil.core'; | ||
export declare class TrailerVideo { | ||
@@ -15,2 +16,3 @@ src: string; | ||
hasEnded: boolean; | ||
mediaExit: EventEmitter; | ||
handleMediaExit(): void; | ||
@@ -17,0 +19,0 @@ handleMediaStart(): void; |
{ | ||
"name": "@weareglow/media-components", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "A collection of reusable components for media campaigns.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
2
2
331086
61
8062