Use the HTML5 video to play the RTSP live streaming source code:
<!DOCTYPE html><Html><Head><MetaHttp-equiv= "Content-type"Content= "text/html; CHARSET=GBK "><Title>video Test 10:rtsp Streaming</Title><Script>functionRotateme () {i=0;Int=SetInterval (function() {Video.style.WebkitTransform=‘Rotate‘+(I++%360)+‘Deg‘; Video.style.MozTransform=‘Rotate‘+(I++%360)+‘Deg‘; Video.style.OTransform=‘Rotate‘+(I++%360)+‘Deg‘; },50); }functionResetrotation () {Video.style.WebkitTransform=‘Rotate (0)‘; Video.style.MozTransform=‘Rotate (0)‘; Video.style.OTransform=‘Rotate (0)‘; }</Script></Head><Body><DivStyle= "Text-align:center;"><VideoStyle= "Transform:rotate (0deg);"Id= "V1"Controls= "Controls"onmouseover= "This.play ()"Height= "240"Width= "320"><SourceSrc= "rtsp://192.168.1.149:8554/">HTML5 video</Video></Div><Script>VarVideo=document.getElementsByTagName (‘Video‘)[0];</Script><DivStyle= "Text-align:center;"><buttonOnClick= "Video.play ()"> & #9654;</button><buttonOnClick= "Video.pause ()"> & #9724;</button><buttonOnClick= "Video.volume + = 0.25">volume up</button><buttonOnClick= "Video.volume-= 0.25">volume down</button><buttonOnClick= "Video.muted = True">mute</button><buttonOnClick= "video.muted = False">unmute</button><buttonOnClick= "Rotateme ()"> Start Rotation</button> <button onclick= "int= Window.clearinterval (int); Resetrotation ()> Stop Rotation</button> </Div ></body></html>
Do things realistically
Here is the original post reference
Http://www.oneie.com/index.php/qyjs/video-tech/215-html5-rtsp
Welcome contact with HTML5 Outsourcing demand Beijing moving point flying qq:372900288
We offer free project evaluations.
HTML5 Outsourcing team-technology sharing "playing RTSP video stream with HTML5 's video tag"