Skip to content

Commit 2e1626f

Browse files
committed
Update the documentation.
1 parent dba05f6 commit 2e1626f

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed

src/documentation/index.vue

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
strong Supports Vue 3.
2525
br
2626
v-icon.pr-2(color="secondary") check
27+
strong Supports Videos with customizable attributes.
28+
br
29+
v-icon.pr-2(color="secondary") check
2730
| #[strong Fully responsive] and scales with its container.#[br]
2831
v-icon.pr-2(color="secondary") check
2932
| #[strong Touch ready] & mouse dragging for desktop.#[br]
@@ -1391,6 +1394,72 @@
13911394
border-color: #000;
13921395
}
13931396

1397+
h3
1398+
a(href="#ex--videos" v-scroll-to="'#ex--videos'") Videos
1399+
a(id="ex--videos" name="ex--videos")
1400+
p.
1401+
The video feature is usable through the #[span.code video] prop and is completely customizable.#[br]
1402+
A lot of parameters are available and can produce many different results.#[br]
1403+
You can check all the parameters on these pages:
1404+
ul.max-widthed
1405+
li
1406+
strong.mr-2 Embedded Videos (using <video> tag):
1407+
a(href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video" target="blank") //developer.mozilla.org/en-US/docs/Web/HTML/Element/video
1408+
li
1409+
strong.mr-2 Youtube parameters (using <iframe> tag):
1410+
a(href="https://developers.google.com/youtube/player_parameters" target="blank") //developers.google.com/youtube/player_parameters
1411+
1412+
p.mt-4
1413+
strong.
1414+
Note: Most of the recent browsers do not allow autoplaying videos before the user interacted
1415+
with the page.#[br]
1416+
Some allow autoplaying if the video is muted.
1417+
1418+
h4 #1. Embedded videos - using <video> tag.
1419+
p In this example the first video is muted to be autoplayed in most browsers, but the video does not have sound.
1420+
1421+
vueper-slides.mt-4.ex--videos(bullets-outside :dragging-distance="50")
1422+
vueper-slide(
1423+
v-for="(slide, i) in videoSlides1"
1424+
:key="i"
1425+
:title="slide.title"
1426+
:content="slide.content"
1427+
:image="slide.image"
1428+
:video="slide.video")
1429+
ssh-pre(language="html-vue" label="HTML Vue Template").
1430+
<vueper-slides bullets-outside :dragging-distance="50">
1431+
<vueper-slide
1432+
v-for="(slide, i) in slides"
1433+
:key="i"
1434+
:image="slide.image"
1435+
:title="slide.title"
1436+
:content="slide.content" />
1437+
</vueper-slides>
1438+
1439+
ssh-pre(language="js" label="Javascript").
1440+
// In your component's data.
1441+
// If using `${process.env.BASE_URL}` your images must be in the `public` folder.
1442+
{
1443+
title: 'Blossoming flower',
1444+
content: 'This video is autoplayed, played in loop, has no controls and is not reacting to user interactions.<br>(The video has no sound)',
1445+
image: `${process.env.BASE_URL}images/flower.jpg`,
1446+
video: {
1447+
webm: `${process.env.BASE_URL}images/flower.webm`,
1448+
mp4: `${process.env.BASE_URL}images/flower.mp4`,
1449+
props: { autoplay: true, loop: true, controls: false, muted: true }
1450+
}
1451+
},
1452+
{
1453+
title: 'Blossoming flower',
1454+
content: 'This video is played once, has controls and is reacting to user interactions.<br>(The video has no sound)',
1455+
image: `${process.env.BASE_URL}images/flower.jpg`,
1456+
video: {
1457+
webm: `${process.env.BASE_URL}images/flower.webm`,
1458+
mp4: `${process.env.BASE_URL}images/flower.mp4`
1459+
}
1460+
}
1461+
h4 #2. URL videos - using &lt;iframe&gt; tag.
1462+
13941463
h2
13951464
a(href="#vueper-slides--api" v-scroll-to="'#vueper-slides--api'") #[span.code &lt;vueper-slides&gt;] API
13961465
a(id="vueper-slides--api" name="vueper-slides--api")
@@ -1985,6 +2054,11 @@
19852054
.title.mr-3 Version 3.0
19862055
| Supports Vue 3. This version is not compatible with Vue 2.x.
19872056

2057+
li.mb-2
2058+
strong.mr-3 Version 2.12
2059+
ul
2060+
li Added support for embedded videos and URL videos like Youtube.
2061+
19882062
li.mb-2
19892063
strong.mr-3 Version 2.11
19902064
ul
@@ -2229,6 +2303,27 @@ export default {
22292303
{ image: 'https://combo.staticflickr.com/ap/build/images/sohp/2019-top-25/Jesse_Moran_Resurrect.jpg' },
22302304
{ image: 'https://combo.staticflickr.com/ap/build/images/sohp/2019-top-25/Perez_Alonso%20Photography_Chocolate_Mountains.jpg' },
22312305
{ image: `${process.env.BASE_URL}images/easton-wa-usa.jpg` }
2306+
],
2307+
videoSlides1: [
2308+
{
2309+
title: 'Blossoming flower',
2310+
content: 'This video is autoplayed, played in loop, has no controls and is not reacting to user interactions.<br>(The video has no sound)',
2311+
image: `${process.env.BASE_URL}images/flower.jpg`,
2312+
video: {
2313+
webm: `${process.env.BASE_URL}images/flower.webm`,
2314+
mp4: `${process.env.BASE_URL}images/flower.mp4`,
2315+
props: { autoplay: true, loop: true, controls: false, muted: true }
2316+
}
2317+
},
2318+
{
2319+
title: 'Blossoming flower',
2320+
content: 'This video is played once, has controls and is reacting to user interactions.<br>(The video has no sound)',
2321+
image: `${process.env.BASE_URL}images/flower.jpg`,
2322+
video: {
2323+
webm: `${process.env.BASE_URL}images/flower.webm`,
2324+
mp4: `${process.env.BASE_URL}images/flower.mp4`
2325+
}
2326+
}
22322327
]
22332328
}),
22342329
methods: {

0 commit comments

Comments
 (0)