Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(media): support audio and video tag with multi sources #1618

Conversation

MrMurdock11
Copy link
Collaborator

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (refactoring and improving code)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Description

Summary: Support for audio with multiple sources and extends the existing video functionality to support multiple sources as well.
Motivation: I aim to enhance user experience by introducing a feature that allows content to be listened to. Recognizing the complexity of this feature, I've divided its development into several phases: embedding audio, creating custom audio controls, and integrating the feature into the front matter block. Currently, I've implemented audio embedding with support for multiple sources and have also upgraded the video functionality to accommodate multiple sources.

Copy link
Collaborator

@kungfux kungfux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MrMurdock11 I'm looking forward to use this feature in my blog💪

_posts/2019-08-08-write-a-new-post.md Outdated Show resolved Hide resolved
_posts/2019-08-08-write-a-new-post.md Outdated Show resolved Hide resolved
_posts/2019-08-08-write-a-new-post.md Show resolved Hide resolved
_includes/convert-media-type.html Outdated Show resolved Hide resolved
_includes/multi-sources.html Outdated Show resolved Hide resolved
_includes/embed/audio.html Outdated Show resolved Hide resolved
_includes/multi-sources.html Outdated Show resolved Hide resolved
_includes/embed/audio.html Outdated Show resolved Hide resolved
Copy link
Owner

@cotes2020 cotes2020 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MrMurdock11, I understand your motivation and am in favor of this new feature.

But this PR contains some unnecessary files. It's not a good practice to overuse {% include %}, it will slow down the Jekyll build.

@MrMurdock11
Copy link
Collaborator Author

MrMurdock11 commented Mar 26, 2024

Ok, I get it @cotes2020. I'll take a look at it and try to minimize the {% include %} calls.

@cotes2020
Copy link
Owner

BTW, please make good use of git rebase and git force push when updating your feature branch, as this will facilitate code review.

@MrMurdock11
Copy link
Collaborator Author

@cotes2020 I removed unnecessary files from embed directory and {% include %} tags. I decided to work with _data and move extensions and MIME types to allow us to dynamically reference and override extensions and MIME types as needed.

Copy link
Collaborator

@kungfux kungfux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having media.yml makes it super easy to override and extend to support more media types. I like it 🫶

_includes/embed/video.html Outdated Show resolved Hide resolved
_includes/embed/video.html Outdated Show resolved Hide resolved
_includes/embed/video.html Outdated Show resolved Hide resolved
_includes/embed/video.html Outdated Show resolved Hide resolved
_posts/2019-08-08-write-a-new-post.md Outdated Show resolved Hide resolved
_posts/2019-08-08-write-a-new-post.md Outdated Show resolved Hide resolved
_posts/2019-08-08-write-a-new-post.md Outdated Show resolved Hide resolved
_posts/2019-08-08-write-a-new-post.md Outdated Show resolved Hide resolved
_posts/2019-08-08-write-a-new-post.md Outdated Show resolved Hide resolved
_posts/2019-08-08-write-a-new-post.md Outdated Show resolved Hide resolved
_posts/2019-08-08-write-a-new-post.md Outdated Show resolved Hide resolved
_includes/embed/audio.html Show resolved Hide resolved
_data/media.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

@kungfux kungfux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your patience and commitment.

Please wait for @cotes2020 approval as he may have good insights.

@cotes2020 cotes2020 changed the title feat(embed): support audio and video tag with multi sources feat(media): support audio and video tag with multi sources Apr 2, 2024
@cotes2020 cotes2020 force-pushed the feature/support-audio-with-multi-sources branch from 034ab5a to e257438 Compare April 2, 2024 21:39
@kungfux
Copy link
Collaborator

kungfux commented Apr 3, 2024

@cotes2020 Don't get me wrong, I'm not pushing anyone, but I would like to ask who should merge this? Does @MrMurdock11 already have enough permissions? I ask in case you're all waiting for my action. 😊

@cotes2020
Copy link
Owner

@kungfux As per @MrMurdock11‘s idea he is going to close this PR and reopen a new one. I will be involved in another code review when that happens, as the changes are a bit much.

@MrMurdock11
Copy link
Collaborator Author

@cotes2020 Not really, I meant that we will finish this query and merge it, and then I will create a new one with img-url and img_cdn.

@kungfux
Copy link
Collaborator

kungfux commented Apr 3, 2024

I'm glad we cleared that up, because I had a different understanding of the answer too.

@cotes2020
Copy link
Owner

That was a misunderstanding on my part. 😂

So hold on a bit longer and I'll review this PR in depth.

_posts/2019-08-08-write-a-new-post.md Show resolved Hide resolved
_posts/2019-08-08-write-a-new-post.md Show resolved Hide resolved
_posts/2019-08-08-write-a-new-post.md Outdated Show resolved Hide resolved
_data/media.yml Outdated Show resolved Hide resolved
_includes/embed/video.html Outdated Show resolved Hide resolved
_includes/embed/video.html Outdated Show resolved Hide resolved
_includes/embed/audio.html Outdated Show resolved Hide resolved
_includes/embed/video.html Outdated Show resolved Hide resolved
@MrMurdock11
Copy link
Collaborator Author

@cotes2020 @kungfux Thank you for your feedback

_includes/embed/video.html Outdated Show resolved Hide resolved
Copy link
Owner

@cotes2020 cotes2020 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cotes2020 cotes2020 merged commit 23be416 into cotes2020:master Apr 4, 2024
6 checks passed
@MrMurdock11 MrMurdock11 deleted the feature/support-audio-with-multi-sources branch April 4, 2024 17:03
github-actions bot pushed a commit that referenced this pull request May 11, 2024
## [7.0.0](v6.5.5...v7.0.0) (2024-05-11)

### ⚠ BREAKING CHANGES

* optimize the resource hints (#1717)
* rename media-url file and related parameters (#1651)
* rename comment setting parameter (#1563)
* **analytics:** add post pageviews for GoatCounter (#1543)

### Features

* add cloudflare web analytics ([#1723](#1723)) ([c17fba4](c17fba4))
* add support for embed video files ([#1558](#1558)) ([9592146](9592146))
* add support for giscus strict title matching ([#1614](#1614)) ([700fd5b](700fd5b))
* **analytics:** add post pageviews for GoatCounter ([#1543](#1543)) ([b641b3f](b641b3f))
* **analytics:** add Umami and Matomo tracking codes ([#1658](#1658)) ([61bdca2](61bdca2))
* change site verification settings ([#1561](#1561)) ([e436387](e436387))
* **deps:** move `MathJax` configuration to a separate file ([#1670](#1670)) ([44f552c](44f552c))
* display theme version in footer ([#1611](#1611)) ([8349314](8349314))
* **i18n:** allow `page.lang` to override `site.lang` ([#1586](#1586)) ([547b95c](547b95c))
* make post description customizable ([#1602](#1602)) ([f865336](f865336))
* **media:** support audio and video tag with multi sources ([#1618](#1618)) ([23be416](23be416))

### Bug Fixes

* make TOC title and entries visible at the same time ([#1711](#1711)) ([e0950fc](e0950fc))
* mode toggle not outlined when receiving keyboard focus ([#1690](#1690)) ([cd37f63](cd37f63))
* prevent footnote back arrow from becoming an emoji ([#1716](#1716)) ([8608147](8608147))
* **pwa:** skip range requests in service worker ([#1672](#1672)) ([76d58fe](76d58fe))
* search result prompt is empty ([#1583](#1583)) ([8a2afae](8a2afae))
* use `https` for Weibo sharing URL ([#1612](#1612)) ([8e5fbb7](8e5fbb7))

### Improvements

* improve <hr> visibility in dark mode ([#1565](#1565)) ([4ddd5c4](4ddd5c4))
* lean bootstrap javascript ([#1734](#1734)) ([ddb48ed](ddb48ed))
* rename comment setting parameter ([#1563](#1563)) ([f8390d4](f8390d4))
* replace jQuery with Vanilla JS ([#1681](#1681)) ([fe7afa3](fe7afa3))
* simplify mode toggle script ([#1692](#1692)) ([d4a6d64](d4a6d64))
* tree shaking Bootstrap CSS ([#1736](#1736)) ([363a3d9](363a3d9))

### Changes

* optimize the resource hints ([#1717](#1717)) ([dcb0add](dcb0add))
* rename media-url file and related parameters ([#1651](#1651)) ([9f8aeaa](9f8aeaa))
Copy link

🎉 This PR is included in version 7.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@kungfux kungfux mentioned this pull request May 13, 2024
1 task
kimbob13 pushed a commit to kimbob13/kimbob13.github.io that referenced this pull request May 25, 2024
kimbob13 pushed a commit to kimbob13/kimbob13.github.io that referenced this pull request May 25, 2024
## [7.0.0](cotes2020/jekyll-theme-chirpy@v6.5.5...v7.0.0) (2024-05-11)

### ⚠ BREAKING CHANGES

* optimize the resource hints (cotes2020#1717)
* rename media-url file and related parameters (cotes2020#1651)
* rename comment setting parameter (cotes2020#1563)
* **analytics:** add post pageviews for GoatCounter (cotes2020#1543)

### Features

* add cloudflare web analytics ([cotes2020#1723](cotes2020#1723)) ([c17fba4](cotes2020@c17fba4))
* add support for embed video files ([cotes2020#1558](cotes2020#1558)) ([9592146](cotes2020@9592146))
* add support for giscus strict title matching ([cotes2020#1614](cotes2020#1614)) ([700fd5b](cotes2020@700fd5b))
* **analytics:** add post pageviews for GoatCounter ([cotes2020#1543](cotes2020#1543)) ([b641b3f](cotes2020@b641b3f))
* **analytics:** add Umami and Matomo tracking codes ([cotes2020#1658](cotes2020#1658)) ([61bdca2](cotes2020@61bdca2))
* change site verification settings ([cotes2020#1561](cotes2020#1561)) ([e436387](cotes2020@e436387))
* **deps:** move `MathJax` configuration to a separate file ([cotes2020#1670](cotes2020#1670)) ([44f552c](cotes2020@44f552c))
* display theme version in footer ([cotes2020#1611](cotes2020#1611)) ([8349314](cotes2020@8349314))
* **i18n:** allow `page.lang` to override `site.lang` ([cotes2020#1586](cotes2020#1586)) ([547b95c](cotes2020@547b95c))
* make post description customizable ([cotes2020#1602](cotes2020#1602)) ([f865336](cotes2020@f865336))
* **media:** support audio and video tag with multi sources ([cotes2020#1618](cotes2020#1618)) ([23be416](cotes2020@23be416))

### Bug Fixes

* make TOC title and entries visible at the same time ([cotes2020#1711](cotes2020#1711)) ([e0950fc](cotes2020@e0950fc))
* mode toggle not outlined when receiving keyboard focus ([cotes2020#1690](cotes2020#1690)) ([cd37f63](cotes2020@cd37f63))
* prevent footnote back arrow from becoming an emoji ([cotes2020#1716](cotes2020#1716)) ([8608147](cotes2020@8608147))
* **pwa:** skip range requests in service worker ([cotes2020#1672](cotes2020#1672)) ([76d58fe](cotes2020@76d58fe))
* search result prompt is empty ([cotes2020#1583](cotes2020#1583)) ([8a2afae](cotes2020@8a2afae))
* use `https` for Weibo sharing URL ([cotes2020#1612](cotes2020#1612)) ([8e5fbb7](cotes2020@8e5fbb7))

### Improvements

* improve <hr> visibility in dark mode ([cotes2020#1565](cotes2020#1565)) ([4ddd5c4](cotes2020@4ddd5c4))
* lean bootstrap javascript ([cotes2020#1734](cotes2020#1734)) ([ddb48ed](cotes2020@ddb48ed))
* rename comment setting parameter ([cotes2020#1563](cotes2020#1563)) ([f8390d4](cotes2020@f8390d4))
* replace jQuery with Vanilla JS ([cotes2020#1681](cotes2020#1681)) ([fe7afa3](cotes2020@fe7afa3))
* simplify mode toggle script ([cotes2020#1692](cotes2020#1692)) ([d4a6d64](cotes2020@d4a6d64))
* tree shaking Bootstrap CSS ([cotes2020#1736](cotes2020#1736)) ([363a3d9](cotes2020@363a3d9))

### Changes

* optimize the resource hints ([cotes2020#1717](cotes2020#1717)) ([dcb0add](cotes2020@dcb0add))
* rename media-url file and related parameters ([cotes2020#1651](cotes2020#1651)) ([9f8aeaa](cotes2020@9f8aeaa))
gudtldn pushed a commit to gudtldn/gudtldn.github.io that referenced this pull request Jul 26, 2024
gudtldn pushed a commit to gudtldn/gudtldn.github.io that referenced this pull request Jul 26, 2024
## [7.0.0](cotes2020/jekyll-theme-chirpy@v6.5.5...v7.0.0) (2024-05-11)

### ⚠ BREAKING CHANGES

* optimize the resource hints (cotes2020#1717)
* rename media-url file and related parameters (cotes2020#1651)
* rename comment setting parameter (cotes2020#1563)
* **analytics:** add post pageviews for GoatCounter (cotes2020#1543)

### Features

* add cloudflare web analytics ([cotes2020#1723](cotes2020#1723)) ([c17fba4](cotes2020@c17fba4))
* add support for embed video files ([cotes2020#1558](cotes2020#1558)) ([9592146](cotes2020@9592146))
* add support for giscus strict title matching ([cotes2020#1614](cotes2020#1614)) ([700fd5b](cotes2020@700fd5b))
* **analytics:** add post pageviews for GoatCounter ([cotes2020#1543](cotes2020#1543)) ([b641b3f](cotes2020@b641b3f))
* **analytics:** add Umami and Matomo tracking codes ([cotes2020#1658](cotes2020#1658)) ([61bdca2](cotes2020@61bdca2))
* change site verification settings ([cotes2020#1561](cotes2020#1561)) ([e436387](cotes2020@e436387))
* **deps:** move `MathJax` configuration to a separate file ([cotes2020#1670](cotes2020#1670)) ([44f552c](cotes2020@44f552c))
* display theme version in footer ([cotes2020#1611](cotes2020#1611)) ([8349314](cotes2020@8349314))
* **i18n:** allow `page.lang` to override `site.lang` ([cotes2020#1586](cotes2020#1586)) ([547b95c](cotes2020@547b95c))
* make post description customizable ([cotes2020#1602](cotes2020#1602)) ([f865336](cotes2020@f865336))
* **media:** support audio and video tag with multi sources ([cotes2020#1618](cotes2020#1618)) ([23be416](cotes2020@23be416))

### Bug Fixes

* make TOC title and entries visible at the same time ([cotes2020#1711](cotes2020#1711)) ([e0950fc](cotes2020@e0950fc))
* mode toggle not outlined when receiving keyboard focus ([cotes2020#1690](cotes2020#1690)) ([cd37f63](cotes2020@cd37f63))
* prevent footnote back arrow from becoming an emoji ([cotes2020#1716](cotes2020#1716)) ([8608147](cotes2020@8608147))
* **pwa:** skip range requests in service worker ([cotes2020#1672](cotes2020#1672)) ([76d58fe](cotes2020@76d58fe))
* search result prompt is empty ([cotes2020#1583](cotes2020#1583)) ([8a2afae](cotes2020@8a2afae))
* use `https` for Weibo sharing URL ([cotes2020#1612](cotes2020#1612)) ([8e5fbb7](cotes2020@8e5fbb7))

### Improvements

* improve <hr> visibility in dark mode ([cotes2020#1565](cotes2020#1565)) ([4ddd5c4](cotes2020@4ddd5c4))
* lean bootstrap javascript ([cotes2020#1734](cotes2020#1734)) ([ddb48ed](cotes2020@ddb48ed))
* rename comment setting parameter ([cotes2020#1563](cotes2020#1563)) ([f8390d4](cotes2020@f8390d4))
* replace jQuery with Vanilla JS ([cotes2020#1681](cotes2020#1681)) ([fe7afa3](cotes2020@fe7afa3))
* simplify mode toggle script ([cotes2020#1692](cotes2020#1692)) ([d4a6d64](cotes2020@d4a6d64))
* tree shaking Bootstrap CSS ([cotes2020#1736](cotes2020#1736)) ([363a3d9](cotes2020@363a3d9))

### Changes

* optimize the resource hints ([cotes2020#1717](cotes2020#1717)) ([dcb0add](cotes2020@dcb0add))
* rename media-url file and related parameters ([cotes2020#1651](cotes2020#1651)) ([9f8aeaa](cotes2020@9f8aeaa))
ryo-wijaya pushed a commit to ryo-wijaya/blog that referenced this pull request Sep 9, 2024
## [7.0.0](cotes2020/jekyll-theme-chirpy@v6.5.5...v7.0.0) (2024-05-11)

### ⚠ BREAKING CHANGES

* optimize the resource hints (#1717)
* rename media-url file and related parameters (#1651)
* rename comment setting parameter (#1563)
* **analytics:** add post pageviews for GoatCounter (#1543)

### Features

* add cloudflare web analytics ([#1723](cotes2020/jekyll-theme-chirpy#1723)) ([ce53717](cotes2020/jekyll-theme-chirpy@ce53717))
* add support for embed video files ([#1558](cotes2020/jekyll-theme-chirpy#1558)) ([ec6fbc8](cotes2020/jekyll-theme-chirpy@ec6fbc8))
* add support for giscus strict title matching ([#1614](cotes2020/jekyll-theme-chirpy#1614)) ([49fc3a7](cotes2020/jekyll-theme-chirpy@49fc3a7))
* **analytics:** add post pageviews for GoatCounter ([#1543](cotes2020/jekyll-theme-chirpy#1543)) ([a19a00d](cotes2020/jekyll-theme-chirpy@a19a00d))
* **analytics:** add Umami and Matomo tracking codes ([#1658](cotes2020/jekyll-theme-chirpy#1658)) ([795f477](cotes2020/jekyll-theme-chirpy@795f477))
* change site verification settings ([#1561](cotes2020/jekyll-theme-chirpy#1561)) ([2240821](cotes2020/jekyll-theme-chirpy@2240821))
* **deps:** move `MathJax` configuration to a separate file ([#1670](cotes2020/jekyll-theme-chirpy#1670)) ([f13cfb3](cotes2020/jekyll-theme-chirpy@f13cfb3))
* display theme version in footer ([#1611](cotes2020/jekyll-theme-chirpy#1611)) ([9b30364](cotes2020/jekyll-theme-chirpy@9b30364))
* **i18n:** allow `page.lang` to override `site.lang` ([#1586](cotes2020/jekyll-theme-chirpy#1586)) ([615af0a](cotes2020/jekyll-theme-chirpy@615af0a))
* make post description customizable ([#1602](cotes2020/jekyll-theme-chirpy#1602)) ([8fc6757](cotes2020/jekyll-theme-chirpy@8fc6757))
* **media:** support audio and video tag with multi sources ([#1618](cotes2020/jekyll-theme-chirpy#1618)) ([30a6617](cotes2020/jekyll-theme-chirpy@30a6617))

### Bug Fixes

* make TOC title and entries visible at the same time ([#1711](cotes2020/jekyll-theme-chirpy#1711)) ([d6461d0](cotes2020/jekyll-theme-chirpy@d6461d0))
* mode toggle not outlined when receiving keyboard focus ([#1690](cotes2020/jekyll-theme-chirpy#1690)) ([b480ce2](cotes2020/jekyll-theme-chirpy@b480ce2))
* prevent footnote back arrow from becoming an emoji ([#1716](cotes2020/jekyll-theme-chirpy#1716)) ([68b9caa](cotes2020/jekyll-theme-chirpy@68b9caa))
* **pwa:** skip range requests in service worker ([#1672](cotes2020/jekyll-theme-chirpy#1672)) ([94a1401](cotes2020/jekyll-theme-chirpy@94a1401))
* search result prompt is empty ([#1583](cotes2020/jekyll-theme-chirpy#1583)) ([24eaef4](cotes2020/jekyll-theme-chirpy@24eaef4))
* use `https` for Weibo sharing URL ([#1612](cotes2020/jekyll-theme-chirpy#1612)) ([8ed2bb7](cotes2020/jekyll-theme-chirpy@8ed2bb7))

### Improvements

* improve <hr> visibility in dark mode ([#1565](cotes2020/jekyll-theme-chirpy#1565)) ([ece9ae0](cotes2020/jekyll-theme-chirpy@ece9ae0))
* lean bootstrap javascript ([#1734](cotes2020/jekyll-theme-chirpy#1734)) ([05341c8](cotes2020/jekyll-theme-chirpy@05341c8))
* rename comment setting parameter ([#1563](cotes2020/jekyll-theme-chirpy#1563)) ([30b3972](cotes2020/jekyll-theme-chirpy@30b3972))
* replace jQuery with Vanilla JS ([#1681](cotes2020/jekyll-theme-chirpy#1681)) ([99efa1e](cotes2020/jekyll-theme-chirpy@99efa1e))
* simplify mode toggle script ([#1692](cotes2020/jekyll-theme-chirpy#1692)) ([90ce15f](cotes2020/jekyll-theme-chirpy@90ce15f))
* tree shaking Bootstrap CSS ([#1736](cotes2020/jekyll-theme-chirpy#1736)) ([3892198](cotes2020/jekyll-theme-chirpy@3892198))

### Changes

* optimize the resource hints ([#1717](cotes2020/jekyll-theme-chirpy#1717)) ([ac3eb35](cotes2020/jekyll-theme-chirpy@ac3eb35))
* rename media-url file and related parameters ([#1651](cotes2020/jekyll-theme-chirpy#1651)) ([787cbeb](cotes2020/jekyll-theme-chirpy@787cbeb))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants