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

Expose Time Parameters #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ Create a file in your `_includes` folder called `youtubePlayer.html` with this c
```
<div class="embed-container">
<iframe
src="https://www.youtube.com/embed/{{ include.id }}"
{% if include.end %}
src="https://www.youtube.com/embed/{{ include.id }}?start={{ include.start }}&end={{ include.end }}"
{% else %}
src="https://www.youtube.com/embed/{{ include.id }}?start={{ include.start }}"
{% endif %}
width="700"
height="480"
frameborder="0"
Expand All @@ -38,9 +42,11 @@ Create a file in your `_includes` folder called `youtubePlayer.html` with this c
Place this snippet inside your .md file where you want to embed your video:

```
{% include youtubePlayer.html id=page.youtubeId %}
{% include youtubePlayer.html id=page.youtubeId start="0" %}
```

You can also add `end="n"` to stop the video at `n` seconds in

On the top of your .md file, put the YouTube video ID. You could also put the ID of the video directly.

```
Expand Down