Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

razs

verifica stream e escolhe stream

Recommended Posts

Boas,

 

Javascript não é propriamente o meu ponto forte, vou passar a explicar o que pretendo e depois ponho o codigo que tenho.

 

Pretendo que ao abrir uma pagina esta abra um stream de uma tv, mas visto que este canal tem bastantes problemas precisava que ele detecta-se se esta a fazer o streaming e caso nao esteja abra outro stream de outro canal

 

Stream1

<base href="http://www.jet7angola.com/entretenimento/tpa-internacional-online-directo.html">
<script src="http://www.jet7angola.com/tpa/jquery-1.6.2.min.js" type="text/javascript"></script>
<script src="/tpai/jquery-blink.js+jquery.mousewheel.js+jquery.rollover.js+jquery.jscrollpane.min.js+jquery.tools.min.js+jquery.fancybox-1.3.4.pack.js.pagespeed.jc.UjuzPwaNVv.js"></script>
<script>eval(mod_pagespeed_68xhNxTuZL);</script>
<script>eval(mod_pagespeed_20IR7GdmNb);</script>
<script>eval(mod_pagespeed_Bj_7y8YV5J);</script>
<script>eval(mod_pagespeed_kvFbwG5fFn);</script>
<script>eval(mod_pagespeed_5Z2gomwGm9);</script>
<script>eval(mod_pagespeed_u84aD23v_6);</script>
<script src="/tpai/jwplayer.js.pagespeed.jm.KvxnOnM4Zh.js" type="text/javascript"></script>
<script src="/tpai/swfobject.js+common.js.pagespeed.jc.nCJR8-Q7ly.js"></script>
<script>eval(mod_pagespeed_4NJ4whyEXd);</script>
<script>eval(mod_pagespeed_LzOFG2pWFp);</script>

<div align="justify" id="livemedia" style="width: 621px; height: 384px;">
    <script type="text/javascript">
    jwplayer("livemedia").setup({"skin":"http://www.tpai.tv/swf/jwplayer/skins/nacht/nacht.zip","id":"livemediaplayer","autostart":"true","rtmp.subscribe":"true","file":"http://www.tpai.tv/tpai_rtmp_dynamic_streaming.xml","controlbar":"none","volume":100,"width":"100%","height":"100%","modes":[{type:"flash",src:"http://www.tpai.tv/swf/jwplayer/player.swf"}]});
    </script>
</div>

Stream2:

<embed style="vertical-align: middle;width:100%;height:100%;" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://www.rtp.pt/play/player.swf?v3" id="obj_player_prog" name="obj_player_prog" quality="high" allowfullscreen="true" wmode="opaque" allowscriptaccess="always" allownetworking="all" class="embed-responsive-item" flashvars="streamer=rtmp://rtppullswflivefs.fplive.net/rtppullswflive-live&file=2ch27h264&image=undefined&controlbar=over&skin=http://www.rtp.pt/swfjs/skin/fk.zip&autostart=true&plugins=http://programas.rtp.pt/play/ova-jw-play.swf,timeslidertooltipplugin-3&stretching=exactfit&config=http://www.rtp.pt/services/rtpplay/pub/config_page_play/566651108/rtp-play/direto/canais-tv/rtpafrica&abouttext=© RTP.PT&screencolor=0x000000&aboutlink=http://www.rtp.pt/">

Tenho isto:

<base href="http://www.jet7angola.com/entretenimento/tpa-internacional-online-directo.html">
 				<script src="http://www.jet7angola.com/tpa/jquery-1.6.2.min.js" type="text/javascript"></script>
 				<script src="/tpai/jquery-blink.js+jquery.mousewheel.js+jquery.rollover.js+jquery.jscrollpane.min.js+jquery.tools.min.js+jquery.fancybox-1.3.4.pack.js.pagespeed.jc.UjuzPwaNVv.js"></script>
 				<script>eval(mod_pagespeed_68xhNxTuZL);</script>
 				<script>eval(mod_pagespeed_20IR7GdmNb);</script>
 				<script>eval(mod_pagespeed_Bj_7y8YV5J);</script>
 				<script>eval(mod_pagespeed_kvFbwG5fFn);</script>
 				<script>eval(mod_pagespeed_5Z2gomwGm9);</script>
 				<script>eval(mod_pagespeed_u84aD23v_6);</script>
 				<script src="/tpai/jwplayer.js.pagespeed.jm.KvxnOnM4Zh.js" type="text/javascript"></script>
 				<script src="/tpai/swfobject.js+common.js.pagespeed.jc.nCJR8-Q7ly.js"></script>
 				<script>eval(mod_pagespeed_4NJ4whyEXd);</script>
 				<script>eval(mod_pagespeed_LzOFG2pWFp);</script>
 				
 				<div align="justify" id="livemedia" style="width: 621px; height: 384px;">
 					<script type="text/javascript">
						jwplayer("livemedia").setup({"skin":"http://www.tpai.tv/swf/jwplayer/skins/nacht/nacht.zip","id":"livemediaplayer","autostart":"true","rtmp.subscribe":"true","file":"http://www.tpai.tv/tpai_rtmp_dynamic_streaming.xml","controlbar":"none","volume":100,"width":"100%","height":"100%","modes":[{type:"flash",src:"http://www.tpai.tv/swf/jwplayer/player.swf"}]});
							
						.onReady(function(){
							if(this.getState() == "playing"){
								} else {
									
									<embed style="vertical-align: middle;width:100%;height:100%;" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://www.rtp.pt/play/player.swf?v3" id="obj_player_prog" name="obj_player_prog" quality="high" allowfullscreen="true" wmode="opaque" allowscriptaccess="always" allownetworking="all" class="embed-responsive-item" flashvars="streamer=rtmp://rtppullswflivefs.fplive.net/rtppullswflive-live&file=2ch27h264&image=undefined&controlbar=over&skin=http://www.rtp.pt/swfjs/skin/fk.zip&autostart=true&plugins=http://programas.rtp.pt/play/ova-jw-play.swf,timeslidertooltipplugin-3&stretching=exactfit&config=http://www.rtp.pt/services/rtpplay/pub/config_page_play/566651108/rtp-play/direto/canais-tv/rtpafrica&abouttext=© RTP.PT&screencolor=0x000000&aboutlink=http://www.rtp.pt/">
									
								}    
							});
	
					</script>
				</div>

 

Mas como podem ver o segundo stream é em html.

 

Alguem me ajuda a fazer isto?

 

Obrigado

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.