Skip to content

Commit

Permalink
add shared example components
Browse files Browse the repository at this point in the history
  • Loading branch information
redxtech committed Nov 3, 2020
1 parent b4a6a36 commit 11dc356
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 114 deletions.
17 changes: 17 additions & 0 deletions examples/shared/audio.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<template>
<div>
<h2>Audio Player</h2>
<vue-plyr>
<audio controls crossorigin playsinline>
<source
src="https://cdn.plyr.io/static/demo/Kishi_Bashi_-_It_All_Began_With_a_Burst.mp3"
type="audio/mp3"
/>
<source
src="https://cdn.plyr.io/static/demo/Kishi_Bashi_-_It_All_Began_With_a_Burst.ogg"
type="audio/ogg"
/>
</audio>
</vue-plyr>
</div>
</template>
48 changes: 48 additions & 0 deletions examples/shared/demo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<template>
<div id="app">
<h1>vue-plyr demo</h1>
<div class="components">
<vue-plyr-video />
<vue-plyr-audio />
<youtube />
<youtube-np />
<vimeo />
<vimeo-np />
</div>
</div>
</template>

<script>
import VuePlyrVideo from './video'
import VuePlyrAudio from './audio'
import Youtube from './youtube'
import YoutubeNp from './youtube-np'
import Vimeo from './vimeo'
import VimeoNp from './vimeo-np'
export default {
name: 'Demo',
components: {
VuePlyrVideo,
VuePlyrAudio,
Youtube,
YoutubeNp,
Vimeo,
VimeoNp
}
}
</script>

<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
h1 {
margin: 3rem;
}
</style>
114 changes: 0 additions & 114 deletions examples/shared/elements.vue

This file was deleted.

59 changes: 59 additions & 0 deletions examples/shared/video.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<template>
<div>
<h2>Video Player</h2>
<vue-plyr :options="options">
<video
controls
crossorigin
playsinline
data-poster="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.jpg"
>
<source
size="576"
src="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-576p.mp4"
type="video/mp4"
/>
<source
size="720"
src="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-720p.mp4"
type="video/mp4"
/>
<source
size="1080"
src="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-1080p.mp4"
type="video/mp4"
/>
<track
default
kind="captions"
label="English captions"
src="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.en.vtt"
srclang="en"
/>
<track
kind="captions"
label="Légendes en français"
src="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.fr.vtt"
srclang="fr"
/>
<a
download=""
href="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-1080p.mp4"
>
Download
</a>
</video>
</vue-plyr>
</div>
</template>

<script>
export default {
name: 'Video',
data() {
return {
options: { quality: { default: '1080p' } }
}
}
}
</script>
8 changes: 8 additions & 0 deletions examples/shared/vimeo-np.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<div>
<h2>Vimeo (Not Progressive-Enhancement)</h2>
<vue-plyr>
<div data-plyr-provider="vimeo" data-plyr-embed-id="143418951"></div>
</vue-plyr>
</div>
</template>
15 changes: 15 additions & 0 deletions examples/shared/vimeo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<div>
<h2>Vimeo Embed</h2>
<vue-plyr>
<div class="plyr__video-embed">
<iframe
src="https://player.vimeo.com/video/143418951?loop=false&amp;byline=false&amp;portrait=false&amp;title=false&amp;speed=true&amp;transparent=0&amp;gesture=media"
allowfullscreen
allowtransparency
allow="autoplay"
></iframe>
</div>
</vue-plyr>
</div>
</template>
8 changes: 8 additions & 0 deletions examples/shared/youtube-np.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<div>
<h2>YouTube (Not Progressive-Enhancement)</h2>
<vue-plyr>
<div data-plyr-provider="youtube" data-plyr-embed-id="bTqVqk7FSmY"></div>
</vue-plyr>
</div>
</template>
15 changes: 15 additions & 0 deletions examples/shared/youtube.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<div>
<h2>YouTube Embed</h2>
<vue-plyr>
<div class="plyr__video-embed">
<iframe
src="https://www.youtube.com/embed/bTqVqk7FSmY?amp;iv_load_policy=3&amp;modestbranding=1&amp;playsinline=1&amp;showinfo=0&amp;rel=0&amp;enablejsapi=1"
allowfullscreen
allowtransparency
allow="autoplay"
></iframe>
</div>
</vue-plyr>
</div>
</template>

0 comments on commit 11dc356

Please sign in to comment.