Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions renderers/angular/src/v0_9/catalog/basic/video.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
import {Component, computed, ChangeDetectionStrategy} from '@angular/core';
import {BasicCatalogComponent} from './basic-catalog-component';
import {VideoApi} from '@a2ui/web_core/v0_9/basic_catalog';
import {AnyDuringSchemaAlignment} from '../types';

Comment thread
josemontespg marked this conversation as resolved.
/**
* Angular implementation of the A2UI Video component (v0.9).
*
* Renders a video player with standard controls and an optional poster image.
* Renders a video player with standard controls.
*
* Supported CSS variables:
* - `--a2ui-video-border-radius`: Controls the border radius of the video element.
Expand All @@ -33,12 +32,7 @@ import {AnyDuringSchemaAlignment} from '../types';
imports: [],
template: `
<div class="a2ui-video-container">
<video
[attr.src]="url() || null"
controls
[attr.poster]="posterUrl() || null"
class="a2ui-video"
>
<video [attr.src]="url() || null" controls class="a2ui-video">
Your browser does not support the video tag.
</video>
</div>
Expand All @@ -61,7 +55,4 @@ import {AnyDuringSchemaAlignment} from '../types';
})
export class VideoComponent extends BasicCatalogComponent<typeof VideoApi> {
readonly url = computed(() => this.props()['url']?.value());
readonly posterUrl = computed(() =>
(this.props() as AnyDuringSchemaAlignment)['posterUrl']?.value(),
);
}
1 change: 1 addition & 0 deletions specification/v0_10/docs/evolution_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Version 0.10 differs from 0.9 in the following ways:

### 2.1. Catalog Definition Schema

- Added `posterUrl` property to the `Video` component in `basic_catalog.json`, allowing a preview image to be displayed before the video plays.
- Added `placeholder` prop to the `TextField` component schema.
- <TBD>

Expand Down
4 changes: 4 additions & 0 deletions specification/v0_10/json/basic_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@
"url": {
"$ref": "common_types.json#/$defs/DynamicString",
"description": "The URL of the video to display."
},
"posterUrl": {
"$ref": "common_types.json#/$defs/DynamicString",
"description": "The URL of the poster image to display before the video plays."
}
},
"required": ["component", "url"]
Expand Down
Loading