aboutsummaryrefslogtreecommitdiffstats
path: root/demo/index.html
blob: 15112dddce4fe4624fc217781035165c3be5b870 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>Plyr - A simple HTML5 media player</title>
    <meta name="description" content="A simple HTML5 media player with custom controls and WebVTT captions.">
    <meta name="author" content="Sam Potts">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Styles -->
    <link rel="stylesheet" href="../dist/plyr.css">

    <!-- Docs styles -->
    <link rel="stylesheet" href="dist/demo.css">

    <!-- Preload -->
    <link rel="preload" as="font" crossorigin type="font/woff2" href="https://cdn.plyr.io/static/fonts/avenir-medium.woff2">
    <link rel="preload" as="font" crossorigin type="font/woff2" href="https://cdn.plyr.io/static/fonts/avenir-bold.woff2">
    <link rel="preload" as="font" crossorigin type="font/woff2" href="https://cdn.plyr.io/static/fonts/avenir-black.woff2?v=3">
</head>

<body>
    <div class="grid">
        <header>
            <h1>Plyr</h1>
            <p>A simple, accessible HTML5
                <button type="button" class="faux-link" data-source="video">Video</button>,
                <button type="button" class="faux-link" data-source="audio">Audio</button>,
                <button type="button" class="faux-link" data-source="youtube">YouTube</button> and
                <button type="button" class="faux-link" data-source="vimeo">Vimeo</button> media player.
            </p>

            <a href="https://github.com/sampotts/plyr" target="_blank" class="button" data-shr-network="github">
                <svg class="icon">
                    <use xlink:href="#icon-github"></use>
                </svg>Download on GitHub
            </a>
        </header>

        <main>
            <video controls crossorigin playsinline loop poster="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.jpg"
                id="player">
                <!-- Video files -->
                <source src="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.mp4" type="video/mp4">

                <!-- Text track file -->
                <track kind="captions" label="English" srclang="en" src="webvtt/View_From_A_Blue_Moon_Trailer-HD.en.vtt" default>
                <track kind="captions" label="Français" srclang="fr" src="webvtt/View_From_A_Blue_Moon_Trailer-HD.fr.vtt">

                <!-- Fallback for browsers that don't support the <video> element -->
                <a href="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.mp4" download>Download</a>
            </video>

            <ul>
                <li class="plyr__cite plyr__cite--video" hidden>
                    <small>
                        <a href="http://viewfromabluemoon.com/" target="_blank">View From A Blue Moon</a> &copy; Brainfarm
                    </small>
                </li>
                <li class="plyr__cite plyr__cite--audio" hidden>
                    <small>
                        <a href="http://www.kishibashi.com/" target="_blank">Kishi Bashi &ndash; &ldquo;It All Began With A Burst&rdquo;</a> &copy; Kishi Bashi
                    </small>
                </li>
                <li class="plyr__cite plyr__cite--youtube" hidden>
                    <small>
                        <a href="https://www.youtube.com/watch?v=bTqVqk7FSmY" target="_blank">View From A Blue Moon</a> on
                        <span class="color--youtube">
                            <svg class="icon">
                                <use xlink:href="#icon-youtube"></use>
                            </svg> YouTube
                        </span>
                    </small>
                </li>
                <li class="plyr__cite plyr__cite--vimeo" hidden>
                    <small>
                        <a href="https://vimeo.com/ondemand/viewfromabluemoon4k" target="_blank">View From A Blue Moon</a> on
                        <span class="color--vimeo">
                            <svg class="icon">
                                <use xlink:href="#icon-vimeo"></use>
                            </svg> Vimeo
                        </span>
                    </small>
                </li>
            </ul>
        </main>
    </div>

    <aside>If you like Plyr, get the word out and
        <a href="https://twitter.com/intent/tweet?text=A+simple+HTML5+media+player+with+custom+controls+and+WebVTT+captions.&url=http%3A%2F%2Fplyr.io&via=Sam_Potts"
            target="_blank" data-shr-network="twitter">tweet it</a>
    </aside>

    <!-- Plyr core script -->
    <script src="../src/js/plyr.js"></script>

    <!-- Sharing libary (https://shr.one) -->
    <script src="https://cdn.shr.one/1.0.1/shr.js"></script>

    <!-- Rangetouch to fix <input type="range"> on touch devices (see https://rangetouch.com) -->
    <script src="https://cdn.rangetouch.com/1.0.1/rangetouch.js" async></script>

    <!-- Docs script -->
    <script src="dist/demo.js"></script>
</body>

</html>