forked from mgile/Cast-Player-Sample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.html
executable file
·91 lines (84 loc) · 3.42 KB
/
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
<!--
Copyright 2014 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
This sample demonstrates how to build your own Receiver for use with Google
Cast.
A receiver is typically an HTML5 application with a html, css, and JavaScript
components.
In this HTML5 page, we include our style sheet, the Receiver SDK, and our player
JavaScript code.
We Then define two layers within the player:
1. The media layers
2. The Overlay layers
The overlay layer holds:
a. Logo for startup page
b. Media Artwork and information during loading
c. controls for Pause / Seek
-->
<!DOCTYPE html>
<html>
<head>
<!-- Change the title tag to your app's name to display as the details text on the Cast device picker -->
<title>Casting app name</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="player.css" />
<script type="text/javascript" src="//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js"></script>
<script type="text/javascript" src="//www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js"></script>
<script type="text/javascript" src="player.js"></script>
</head>
<body style="margin: 0">
<div id="player" class="player">
<div class="media">
<video></video>
</div>
<div class="logo"></div>
<div class="spinner"></div>
<div class="watermark"></div>
<div class="gradient"></div>
<div class="overlay">
<div class="media-info">
<div class="media-artwork"></div>
<div class="media-text">
<div class="media-title"></div>
<div class="media-subtitle"></div>
</div>
</div>
<div class="preview-mode-info">
<div class="preview-mode-artwork"></div>
<div class="preview-mode-text">
<div class="preview-mode-timer">
<div class="preview-mode-timer-starts">Up next in </div>
<div class="preview-mode-timer-countdown"></div>
<div class="preview-mode-timer-sec"> secs...</div>
</div>
<div class="preview-mode-title"></div>
<div class="preview-mode-subtitle"></div>
</div>
</div>
<div class="controls">
<span class="controls-play-pause"></span>
<span class="controls-cur-time"></span>
<span class="controls-total-time"></span>
<div class="controls-progress">
<div class="controls-progress-inner progressBar"></div>
<div class="controls-progress-thumb"></div>
</div>
</div>
</div>
</div>
<script>
var playerDiv = document.getElementById('player');
new sampleplayer.CastPlayer(playerDiv).start();
</script>
</body>
</html>