Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/anthonylan/ythook

A simple Youtube playlist library
https://github.com/anthonylan/ythook

youtube-playlist youtube-playlist-library youtube-playlist-player youtube-video

Last synced: 10 days ago
JSON representation

A simple Youtube playlist library

Awesome Lists containing this project

README

        

# YT Hook

Bulma: a Flexbox CSS framework

Hook is a simple Youtube playlist library that uses multiple playlist IDs to display videos in sequence. It requires 2 different playlist ids on a single page.
Example:

``mainPlayListId``: the main playlist for that specific page

``nextPlayListId``: the next playlist from the upcoming page.

---
## 🚀 Demo

#### 👉 [See demo on the official site](https://ythook.marraine.co/)
----

## 🤔 How to use it?
Add styles in ``
```html

```

Add the scripts right before closing `` tag, and declare your two playlist IDs:
```html


let mainPlayListId = 'playlistID1'
let nextPlayListId = 'playlistID2'

```

I know, I know, nobody likes jQuery anymore. I promise the next version it won't be jQuery dependent anymore.

## HTML

Hook uses a pre-defined html structure:

```html



```

To display the next playlist at the left side of the page you'll need to add:

```html


```
at the very top of the

>section tag

Like this:
```html



```

The `class` => `isActive` adds a red line at the bottom of the link on the current page, and should be removed or added following the page sequence.

## Initialize Hook?
No need to initialize Hook, it has already been initialized.

## ❔Have Questions?

If you found a bug, have a question or an idea, please don't hesitate to create new issues.