-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstreaming.php
More file actions
205 lines (176 loc) · 8.48 KB
/
streaming.php
File metadata and controls
205 lines (176 loc) · 8.48 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>55444</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body bgcolor="#e9e9e9">
<script language=JavaScript>
<!--
var message="Function Disabled!";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
// -->
</script>
<div>
<center>
<h3>
<div id="np" style=" font-family: Georgia;"></div>
</h3>
<div id="video"> <script type="text/javascript" src="http://www.slickchixradio.com/swfobject.js"></script>
<div id="ytapiplayer">You need Flash player 8+ and JavaScript enabled to view this video.</div>
</div>
<script type="text/javascript">
swfobject.registerObject("flashcontent", "9.0.0");
function onYouTubePlayerReady(playerId) {
var o = document.getElementById( 'ytplayer_object' );
if ( o ) {
o.addEventListener( "onStateChange", "ytplayer_statechange" );
o.addEventListener( "onError", "ytplayer_error" );
}
ytplayer_playlazy( 10 );
}
function getPlayerState() {
var o = document.getElementById( 'ytplayer_object' );
if (o) {
return o.getPlayerState();
}
}
function mute() {
var o = document.getElementById( 'ytplayer_object' );
if (o.isMuted()) {
o.unMute();
}
else {
o.mute();
}
}
function play() {
var state = getPlayerState();
var o = document.getElementById( 'ytplayer_object' );
if (o) {
if (state = 2) {
o.playVideo();
}
else if (state = 0) {
o.playVideo();
}
}
}
function getVolume() {
var o = document.getElementById( 'ytplayer_object' );
if (o) {
return o.getVolume();
}
}
function setVolume(newVolume) {
var o = document.getElementById( 'ytplayer_object' );
if (o) {
o.setVolume(newVolume);
}
}
function clamp(value, bottom, top) { return (value < bottom) ? bottom : (value > top) ? top : value; }
function changeVolume(adjustment) { setVolume(clamp(getVolume() + adjustment, 0, 100)); }
function setVolumeUp() { changeVolume(25); }
function setVolumeDown() { changeVolume(-25); }
var ytplayer_playlist = [ ];
var ytplayer_playitem = 0;
var intr = 500;
var data = 'test';
swfobject.addLoadEvent(ytplayer_render_player );
function myload(){
setTimeout(function(){myTimer()},intr);
}
function myTimer(){
$.get("get_video_id.php", null, function (data) {
if(data != 'NULL'){
var video = eval ('(' + data + ')');
// ytplayer_playlist.push( video.id );
ytplayer_play(video.id);
// ytplayer_playitem++;
$("#np").text("#NowPlaying: " + video.q);
intr = 30000;
}else{
intr = 3000;
}
setTimeout(function(){myTimer()},intr);
});
}
function ytplayer_render_player() {
swfobject.embedSWF (
'http://www.youtube.com/apiplayer?enablejsapi=1&version=3',
'ytapiplayer',
'1300',
'734',
'8',
null,
null,
{
allowScriptAccess: 'always',
allowFullScreen: 'true'
},
{
id: 'ytplayer_object'
}
);
myload();
}
function ytplayer_playlazy( delay ) {
if ( typeof ytplayer_playlazy.timeoutid != 'undefined' ) {
window.clearTimeout( ytplayer_playlazy.timeoutid );
}
ytplayer_playlazy.timeoutid = window.setTimeout( ytplayer_play, delay );
}
function ytplayer_play( video_id ) {
$("#video").html('<iframe width="960" height="720" src="http://www.youtube.com/embed/'+video_id+'?autoplay=1" frameborder="0" allowfullscreen></iframe>');
return;
var o = document.getElementById( 'ytplayer_object' );
if ( o ) {
o.loadVideoById( video_id );//ytplayer_playlist[ ytplayer_playitem ] );
}
}
function ytplayer_statechange( state ) {
if ( state == 0 ) {
ytplayer_playitem += 1;
ytplayer_playitem %= ytplayer_playlist.length;
ytplayer_playlazy( 5000 );
}
}
function ytplayer_error( error ) {
if ( error ) {
ytplayer_playitem += 1;
ytplayer_playitem %= ytplayer_playlist.length;
ytplayer_playlazy( 5000 );
}
}
</script>
<div style="font-family: Tahoma">Send #youtube <Song Name> to 55444 to play your favorite songs.</div>
<br/>
<div style="font-family: Tahoma; font-size:small; width: 1200px;"><br/>Powered by <a style="text-decoration: none;" target="_blank" href="http://www.55444.in"><font color="red">55</font><font color="#FF8000">444</font></a><br/><br/></div>
</center>
</div>
</body>
</html>