-
Notifications
You must be signed in to change notification settings - Fork 12
/
azure-media-player.html
58 lines (53 loc) · 2.88 KB
/
azure-media-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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Azure Media Player</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--*****START OF Azure Media Player Scripts*****-->
<!--Note: DO NOT USE the "latest" folder in production. Replace "latest" with a version number like "1.0.0"-->
<!--EX:<script src="//amp.azure.net/libs/amp/1.0.0/azuremediaplayer.min.js"></script>-->
<!--Azure Media Player versions can be queried from //amp.azure.net/libs/amp/latest/docs/changelog.html-->
<!-- Set the location of the fallback techs -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="//amp.azure.net/libs/amp/1.0.0/azuremediaplayer.min.js"></script>
<link href="//amp.azure.net/libs/amp/1.0.0/skins/amp-default/azuremediaplayer.min.css" rel="stylesheet">
<script>
amp.options.flashSS.swf = "//amp.azure.net/libs/amp/1.0.0/techs/StrobeMediaPlayback.2.0.swf";
amp.options.flashSS.plugin = "//amp.azure.net/libs/amp/1.0.0/techs/MSAdaptiveStreamingPlugin-osmf2.0.swf";
amp.options.silverlightSS.xap = "//amp.azure.net/libs/amp/1.0.0/techs/SmoothStreamingPlayer.xap";
</script>
</head>
<body>
<div id="smaller" class="btn btn-success">smaller</div>
<div id="larger" class="btn btn-success">larger</div>
<video id="azuremediaplayer"
class="azuremediaplayer amp-default-skin amp-big-play-centered"
controls="controls"
autoplay="autoplay"
width="600" height="400"
poster=""
data-setup='{"nativeControlsForTouch": false}' tabindex="0">
<source src="//amssamples.streaming.mediaservices.windows.net/91492735-c523-432b-ba01-faba6c2206a2/AzureMediaServicesPromo.ism/manifest" type="application/vnd.ms-sstr+xml" />
<p class="amp-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video</p>
</video>
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script>
$(document).ready(function(){
var scale = 1.1;
$("#smaller").click(function(){
console.log("Change size");
$("#azuremediaplayer").width($("#azuremediaplayer").width() / scale);
$("#azuremediaplayer").height($("#azuremediaplayer").height() / scale);
});
$("#larger").click(function(){
console.log("Change size");
$("#azuremediaplayer").width($("#azuremediaplayer").width() * scale);
$("#azuremediaplayer").height($("#azuremediaplayer").height() * scale);
});
});
</script>
</body>
</html>