googlecodelabs / tools

Codelabs management & hosting tools
Apache License 2.0
4.24k stars 1.15k forks source link

Regression failure: Embedded youtube videos no longer generated #655

Open laughingbiscuit opened 3 years ago

laughingbiscuit commented 3 years ago

I last used embedded YouTube videos in codelabs ~one year ago without issue. With the latest version of claat nothing is rendered.

Steps to reproduce

Create markdown src: sample.md

id: blah
# Sample
## Sample

This video used to be rendered, and now isn't:
![https://www.youtube.com/watch?v=p9lTgkB8UdI](https://youtube.com)
$ claat export sample.md
$ busybox httpd -p 8080 -h blah 

note that the codelab is render correctly but youtube video is missing.

Observations

The following console errors are shown:

DevTools failed to load source map: Could not load content for https://storage.googleapis.com/codelab-elements/google_codelab_scss_bin.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://storage.googleapis.com/codelab-elements/custom-elements.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
laughingbiscuit commented 3 years ago

cc codelab fans @yuriylesyuk and @seymen and @cassierecher who may have an idea!

caramelmelmel commented 3 years ago

You would need to paste the embedded version instead in the form of a HTML on your codelab

laughingbiscuit commented 3 years ago

@caramelmelmel this is not how this used to work - you should not have to edit the html result.

Please see here for a live example generated in Feb 2020:

Src: https://github.com/apigee/openbank/blob/master/docs-src/docs.md?plain=1#L12

Result: https://apigee.github.io/openbank/#0

(edit Oct 2023: styles now seem to be broken too on older claat versions)

Note that no post-processing was done on the HTML.

stevemar commented 2 years ago

+1'ing this issue as I had to resort to using v2.2.0 (https://github.com/googlecodelabs/tools/releases/tag/v2.2.0) to get a YouTube video to show up in my codelab. I would volunteer to try out the other versions between 2.2.0 and 2.2.3 but they do not have any binaries to go with the release.

I had tried multiple ways to embed the video in my markdown file, the only one that was working was going with the following:

![https://www.youtube.com/watch?v=VIDEO_ID](https://youtube.com)
caramelmelmel commented 2 years ago

@stevemar This was what I did without iframe but still for formatting wise and all I would still use the iframe as it gives me more control to integrate other front end frameworks for my webpage.

beniroquai commented 2 years ago

Hey, just started using codelab for our learning platform. What is the best way to embed Youtube videos as of now? Would I need to downgrade to v2.2.0? Thanks!