From 626d5b66e1c685ee69247666fdb49289d827d939 Mon Sep 17 00:00:00 2001 From: Alex Sova Date: Fri, 22 Jul 2022 11:18:17 +0300 Subject: [PATCH] feat: lr-video stage 1 --- TOC.md | 1 + abstract/Block.js | 8 + .../src/elements/slider/test.htm | 2 +- blocks/EditableCanvas/test/test.htm | 2 +- blocks/FileItem/ref.htm | 2 +- blocks/Icon/ref.htm | 2 +- blocks/ProgressBar/ref.htm | 2 +- blocks/Range/Range.js | 55 ++-- blocks/Range/range.css | 46 ++- blocks/Range/ref.htm | 2 +- blocks/Select/ref.htm | 2 +- blocks/SimpleBtn/ref.htm | 2 +- blocks/SourceBtn/ref.htm | 2 +- blocks/SourceList/ref.htm | 2 +- blocks/StartFrom/ref.htm | 2 +- blocks/Tabs/ref.htm | 2 +- blocks/UploadCtxProvider/UploadCtxProvider.js | 3 + blocks/UploadDetails/ref.htm | 5 +- blocks/UploadDetails/test.js | 14 +- blocks/UploadList/ref.htm | 5 +- blocks/UploadList/test.js | 14 +- blocks/UrlSource/ref.htm | 5 +- blocks/UrlSource/test.js | 14 +- blocks/Video/Video.js | 311 ++++++++++++++++++ blocks/Video/ref.htm | 8 + blocks/Video/test-track.vtt | 7 + blocks/Video/test.js | 9 + blocks/Video/video.css | 102 ++++++ blocks/Video/video.json | 29 ++ index.js | 1 + 30 files changed, 570 insertions(+), 91 deletions(-) create mode 100644 blocks/UploadCtxProvider/UploadCtxProvider.js create mode 100644 blocks/Video/Video.js create mode 100644 blocks/Video/ref.htm create mode 100644 blocks/Video/test-track.vtt create mode 100644 blocks/Video/test.js create mode 100644 blocks/Video/video.css create mode 100644 blocks/Video/video.json diff --git a/TOC.md b/TOC.md index c0e2f481c..a3858b37b 100644 --- a/TOC.md +++ b/TOC.md @@ -56,6 +56,7 @@ - [UploadDetails](./blocks/UploadDetails/) - displays file details and adittional features - [UploadList](./blocks/UploadList/) - shows the list of uploads - [UrlSource](./blocks/UrlSource/) - file uploading from the external URL + - [Video](./blocks/Video/) - wrapper element for the browser video tag - [abstract](./abstract/) - common code abstractions (abstract classes) diff --git a/abstract/Block.js b/abstract/Block.js index d21329068..4cde1b908 100644 --- a/abstract/Block.js +++ b/abstract/Block.js @@ -63,6 +63,14 @@ export class Block extends BaseComponent { } } + connectedCallback() { + if (this.hasAttribute('retpl')) { + this.constructor['template'] = null; + this.processInnerHtml = true; + } + super.connectedCallback(); + } + initCallback() { this.$['*ctxTargetsRegistry']?.add(this.constructor['is']); } diff --git a/blocks/CloudImageEditor/src/elements/slider/test.htm b/blocks/CloudImageEditor/src/elements/slider/test.htm index 02bda60dc..202526dfd 100644 --- a/blocks/CloudImageEditor/src/elements/slider/test.htm +++ b/blocks/CloudImageEditor/src/elements/slider/test.htm @@ -4,7 +4,7 @@ SliderUi - + diff --git a/blocks/EditableCanvas/test/test.htm b/blocks/EditableCanvas/test/test.htm index 679ccad27..62b40b5ba 100644 --- a/blocks/EditableCanvas/test/test.htm +++ b/blocks/EditableCanvas/test/test.htm @@ -6,7 +6,7 @@ LocalEditor - +