Skip to content

Zenodo video embeding#1300

Open
eilmiv wants to merge 11 commits intoElixirTeSS:masterfrom
pan-training:zenodo_video_embeding
Open

Zenodo video embeding#1300
eilmiv wants to merge 11 commits intoElixirTeSS:masterfrom
pan-training:zenodo_video_embeding

Conversation

@eilmiv
Copy link
Copy Markdown
Collaborator

@eilmiv eilmiv commented May 5, 2026

Summary of changes

  • Added support for embedded videos for training materials on Zenodo similar to the existing YouTube video embedding

Motivation and context

closes #1299

Screenshots

image

Checklist

  • I have read and followed the CONTRIBUTING guide.
  • I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree to license it to the TeSS codebase under the BSD license.

eilmiv and others added 6 commits May 4, 2026 13:24
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Comment thread config/sunspot.example.yml Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Zenodo-hosted video embedding for materials, analogous to existing YouTube embedding, by introducing a Zenodo renderer, helper wiring, and client-side logic to select an appropriate media file from the Zenodo API.

Changes:

  • Add Renderers::Zenodo to generate an HTML5 <video> embed and bootstrap it with a JS helper that fetches the Zenodo files list.
  • Wire Zenodo embedding into the materials show view and refactor helper logic to support multiple “video renderers”.
  • Add styling + tests/fixtures to cover embedded Zenodo video rendering.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/fixtures/materials.yml Adds a Zenodo “video” material fixture used by controller tests.
test/controllers/materials_controller_test.rb Adds a show-page assertion for Zenodo embedded video presence.
lib/renderers/zenodo.rb New renderer that detects Zenodo/DOI URLs and outputs video+script embed markup.
app/views/materials/show.html.erb Renders Zenodo embed block alongside existing YouTube embed.
app/helpers/materials_helper.rb Adds embed_zenodo and refactors embedding into a shared embed_video helper.
app/assets/stylesheets/application.scss Centers embedded content via flexbox.
app/assets/javascripts/materials.js Adds make_zenodo_video which fetches Zenodo files and sets the <video> source.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/renderers/zenodo.rb Outdated
Comment thread lib/renderers/zenodo.rb Outdated
Comment thread lib/renderers/zenodo.rb Outdated
Comment thread test/fixtures/materials.yml Outdated
Comment thread app/assets/javascripts/materials.js Outdated
@eilmiv eilmiv marked this pull request as ready for review May 5, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Embedded videos for training videos on Zenodo

2 participants