-
Notifications
You must be signed in to change notification settings - Fork 0
/
_video.html.erb
53 lines (44 loc) · 1.62 KB
/
_video.html.erb
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
<!--<a href="<%= %>"-->
<!--style="display: block; width: 640px; height: 500px; margin: 0 auto;" id="player"> </a>-->
<!--<script>-->
<!--flowplayer("player",-->
<!--"<%= send(:compute_public_path, "flowplayer-3.1.5.swf", "javascripts") %>",-->
<!--{ clip: { scaling: 'fit', autoPlay: false, autoBuffering: true } });-->
<!--</script>-->
<% flashvars = { :file => send(:compute_public_path, video, "videos"), :autostart => :true }.to_query %>
<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="736" height="552">
<param name="movie" value="<%= send(:compute_public_path, "player.swf", "javascripts") %>"/>
<param name="allowfullscreen" value="true"/>
<param name="allowscriptaccess" value="always"/>
<param name="flashvars" value="<%= flashvars %>"/>
<embed type="application/x-shockwave-flash"
id="player2"
name="player2"
src="<%= send(:compute_public_path, "player.swf", "javascripts") %>"
width="736"
height="552"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="<%= flashvars %>"/>
</object>
<script>
var player = null;
function playerReady(thePlayer) {
player = document.getElementById(thePlayer.id);
addListeners();
}
function addListeners() {
if (player) {
player.addModelListener("STATE", "stateListener");
} else {
setTimeout("addListeners()", 100);
}
}
function stateListener(obj) {
currentState = obj.newstate;
previousState = obj.oldstate;
if (currentState == "COMPLETED") {
document.location.href = "54-moskva.html";
}
}
</script>