-
Notifications
You must be signed in to change notification settings - Fork 21
/
mux-player.html
97 lines (76 loc) · 3.45 KB
/
mux-player.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Phil's Players - Mux Player</title>
<!-- Bootstrap -->
<link href="css/bootstrap.flatly.min.css" title="default" rel="stylesheet">
<link href="css/bootstrap.darkly.min.css" title="dark" rel="stylesheet">
<link href="css/ie10-viewport-bug-workaround.css" rel="stylesheet">
<link href="css/jumbotron-narrow.css" rel="stylesheet">
<!-- Style Switcher -->
<script src="js/docs-themes.js" type="text/javascript"></script>
<script type="text/javascript">set_style();</script>
<!-- Mux Player -->
<script src="https://cdn.jsdelivr.net/npm/@mux/mux-player"></script>
<!-- JQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
</head>
<body>
<div class="container">
<div class="header clearfix">
<nav>
<ul class="nav nav-pills pull-right">
<li role="presentation"><a href="index.html">Select a Player</a></li>
<li role="presentation"><a href="#" onclick='switch_style("dark"); return false;'>Dark</a></li>
<li role="presentation"><a href="#" onclick='switch_style("default"); return false;'>Light</a></li>
</ul>
</nav>
<h3 class="text-muted">Phil's Players</h3>
</div>
<div class="jumbotron">
<form id="playform">
<div class="form-group">
<label for="playback-id">Mux Playback ID:</label>
<input type="text" class="form-control" id="playback-id" name="playback-id"><br>
<button id="play-mux" type="button" class="btn btn-primary btn-lg">Play Mux!</button><br><br>
<label for="manifest">HLS Manifest URL:</label>
<input type="text" class="form-control" id="manifest" name="manifest"><br>
<button id="play-hls" type="button" class="btn btn-primary btn-lg">Play HLS!</button><br><br>
</div>
<button type="button" id="mux-demo" class="btn btn-info btn-sm">Load Demo Playback ID</button>
<button type="button" id="hls-demo" class="btn btn-info btn-sm">Load Demo HLS Manifest</button>
</form>
</div>
<div id="player" class="jumbotron">
</div>
<div class="jumbotron">
<p>This player is Mux Player<br><a href="https://www.mux.com/player">More details can be found here.</a></p>
<p><small>Mux Player latest</small></p>
</div>
<script>
// Play button
$( "#play-mux" ).click(function( event ) {
$( "#player" ).html('<mux-player stream-type="on-demand" playback-id="' +$( "#playback-id" ).val() + '" autoplay></mux-player>');
});
$( "#play-hls" ).click(function( event ) {
$( "#player" ).html('<mux-player stream-type="on-demand" src="' +$( "#manifest" ).val() + '" autoplay></mux-player>');
});
$( "#hls-demo" ).click(function( event ) {
$( "#manifest" ).val("https://stream.mux.com/ZqL00aiFhBGYjtzBsk3N74sKyj4AOQEAH.m3u8");
$( "#play-hls" ).trigger( "click" );
});
$( "#mux-demo" ).click(function( event ) {
$( "#playback-id" ).val("GruhNfeijftts00bADzekGVijZsXw3CSJ");
$( "#play-mux" ).trigger( "click" );
});
</script>
<footer class="footer">
<p>© Phil Cluff & <a href="https://github.com/philcluff/phils-players#authors"> The Authors</a> 2023.</p>
</footer>
</div>
<script src="js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>