Skip to content

Commit

Permalink
update dependencies, rename BentoVideoBaseElement
Browse files Browse the repository at this point in the history
  • Loading branch information
kvchari committed Jan 11, 2022
1 parent 267b65a commit b2aeac3
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 21 deletions.
3 changes: 2 additions & 1 deletion build-system/test-configs/dep-check-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,9 @@ exports.rules = [
'extensions/amp-facebook-page/0.1/amp-facebook-page.js->extensions/amp-facebook/0.1/facebook-loader.js',
'extensions/amp-facebook-comments/0.1/amp-facebook-comments.js->extensions/amp-facebook/0.1/facebook-loader.js',

// VideoBaseElement, VideoIframe and VideoWrapper are meant to be shared.
// AmpVideoBaseElement, BentoVideoBaseElement, VideoIframe and VideoWrapper are meant to be shared.
'extensions/**->extensions/amp-video/1.0/video-base-element.js',
'extensions/**->extensions/amp-video/1.0/base-element.js',
'extensions/**->extensions/amp-video/1.0/video-iframe.js',

// <amp-video-iframe> versions share this message API definition.
Expand Down
4 changes: 2 additions & 2 deletions extensions/amp-brightcove/1.0/base-element.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {BentoBrightcove} from './component';
import {BaseElement as BentoVideo} from '../../amp-video/1.0/base-element';
import {BentoVideoBaseElement} from '../../amp-video/1.0/base-element';
import {createParseAttrsWithPrefix} from '#preact/parse-props';

export class BaseElement extends BentoVideo {}
export class BaseElement extends BentoVideoBaseElement {}

/** @override */
BaseElement['Component'] = BentoBrightcove;
Expand Down
4 changes: 2 additions & 2 deletions extensions/amp-jwplayer/1.0/base-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {createParseAttrsWithPrefix} from '#preact/parse-props';

import {BentoJwplayer} from './component';

import {BaseElement as BentoVideo} from '../../amp-video/1.0/base-element';
import {BentoVideoBaseElement} from '../../amp-video/1.0/base-element';

export class BaseElement extends BentoVideo {
export class BaseElement extends BentoVideoBaseElement {
/** @override */
init() {
super.init();
Expand Down
4 changes: 2 additions & 2 deletions extensions/amp-video-iframe/1.0/base-element.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {BentoVideoIframe} from './component';

import {BaseElement as BentoVideo} from '../../amp-video/1.0/base-element';
import {BentoVideoBaseElement} from '../../amp-video/1.0/base-element';

export class BaseElement extends BentoVideo {}
export class BaseElement extends BentoVideoBaseElement {}

/** @override */
BaseElement['Component'] = BentoVideoIframe;
Expand Down
18 changes: 10 additions & 8 deletions extensions/amp-video/1.0/base-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ import {CSS as CSS_AUTOPLAY} from './autoplay.jss';
import {PreactBaseElement} from '#preact/base-element';
import {BentoVideo} from './component';

export class BaseElement extends PreactBaseElement {}
export class BentoVideoBaseElement extends PreactBaseElement {}
// export with alias for bento builds
export {BentoVideoBaseElement as BaseElement};

/** @override */
BaseElement['Component'] = BentoVideo;
BentoVideoBaseElement['Component'] = BentoVideo;

/** @override */
BaseElement['loadable'] = true;
BentoVideoBaseElement['loadable'] = true;

/** @override */
BaseElement['layoutSizeDefined'] = true;
BentoVideoBaseElement['layoutSizeDefined'] = true;

/**
* Defaults to `{component: 'video'}` from `BentoVideo` component.
Expand All @@ -24,10 +26,10 @@ BaseElement['layoutSizeDefined'] = true;
* ```
* @override
*/
BaseElement['staticProps'];
BentoVideoBaseElement['staticProps'];

/** @override */
BaseElement['props'] = {
BentoVideoBaseElement['props'] = {
'album': {attr: 'album'},
'alt': {attr: 'alt'},
'artist': {attr: 'artist'},
Expand Down Expand Up @@ -59,7 +61,7 @@ BaseElement['props'] = {
};

/** @override */
BaseElement['shadowCss'] = CSS + CSS_AUTOPLAY;
BentoVideoBaseElement['shadowCss'] = CSS + CSS_AUTOPLAY;

/** @override */
BaseElement['usesShadowDom'] = true;
BentoVideoBaseElement['usesShadowDom'] = true;
4 changes: 2 additions & 2 deletions extensions/amp-video/1.0/video-base-element.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {ActionTrust_Enum} from '#core/constants/action-constants';
import {AmpPreactBaseElement, setSuperClass} from '#preact/amp-base-element';
import {BaseElement as BentoVideo} from './base-element';
import {BentoVideoBaseElement} from './base-element';

/** @extends {PreactBaseElement<VideoWrapperDef.Api>} */
export class AmpVideoBaseElement extends setSuperClass(
BentoVideo,
BentoVideoBaseElement,
AmpPreactBaseElement
) {
/** @override */
Expand Down
4 changes: 2 additions & 2 deletions extensions/amp-vimeo/1.0/base-element.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {BentoVimeo} from './component';

import {BaseElement as BentoVideo} from '../../amp-video/1.0/base-element';
import {BentoVideoBaseElement} from '../../amp-video/1.0/base-element';

export class BaseElement extends BentoVideo {}
export class BaseElement extends BentoVideoBaseElement {}

/** @override */
BaseElement['Component'] = BentoVimeo;
Expand Down
4 changes: 2 additions & 2 deletions extensions/amp-youtube/1.0/base-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import {createParseAttrsWithPrefix} from '#preact/parse-props';

import {BentoYoutube} from './component';

import {BaseElement as BentoVideo} from '../../amp-video/1.0/base-element';
import {BentoVideoBaseElement} from '../../amp-video/1.0/base-element';

export class BaseElement extends BentoVideo {}
export class BaseElement extends BentoVideoBaseElement {}

/** @override */
BaseElement['Component'] = BentoYoutube;
Expand Down

0 comments on commit b2aeac3

Please sign in to comment.