In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "how to solve the problem that IE browsers cannot play properly due to errors in RTMP video streams?" In daily operations, I believe many people are trying to solve the problem that IE browsers cannot play properly due to incorrect reports of RTMP video streams. There are doubts about the problem. The editor has consulted all kinds of materials and sorted out simple and easy-to-use operation methods, hoping to answer "how to solve the problem that RTMP video streams cannot be played properly by IE browsers due to incorrect reports?" The confusion helps! Next, please follow the editor to study!
The streaming media server is the server that implements the video distribution function, but in order to show the video stream, what is needed is the video player. EasyPlayer is a video streaming media player developed and used by the TSINGSEE blue rhinoceros video team. The familiar EasyNVR and EasyDSS are all integrated EasyPlayer players.
There are many versions of EasyPlayer, and EasyPlayer.JS is a web player integrated into a web page. We use this player to play RTMP video stream in Google browser, there is an error, but the video stream can still be played, however, after changing the IE browser, the RTMP video stream cannot be played normally.
First of all, let's take a look at the error reported by Google, which is displayed as a XMLHttpRequest network request error, indicating that there is a problem before the address is written into the player. Navigate to the code location of the incoming address:
Src () {if (! this.videoUrl) {return ";} var xhr = new XMLHttpRequest (); xhr.open ('GET', this.videoUrl) Xhr.onreadystatechange = () = > {if (/\ .flv. * $/ .test (xhr.responseURL | | ") & & this.typeFlv) {this.videoUrl = xhr.responseURL this.typeFlv = false} else if (/ / .m3u8. * $/ .test (xhr.responseURL | |")) {this.videoUrl = xhr.responseURL}; xhr.send (null) If (this.videoUrl.indexOf ("/") = 0) {return location.protocol + "/" + location.host + this.videoUrl;} return this.videoUrl;}
It is found that there is indeed a XMLHttpRequest object processing address, and from the code, it is found that RTMP does not use XMLHttpRequest object processing.
At this point, we can make a judgment on the address.
Src () {if (! this.videoUrl) {return ";} if (this.videoUrl.indexOf (" rtmp:// ") = 0) {if (this.videoUrl.indexOf (" / ") = 0) {return location.protocol +" / "+ location.host + this.videoUrl;} return this.videoUrl;} else {var xhr = new XMLHttpRequest (); xhr.open ('GET', this.videoUrl) Xhr.onreadystatechange = () = > {if (/\ .flv. * $/ .test (xhr.responseURL | ") & & this.typeFlv) {this.videoUrl = xhr.responseURL this.typeFlv = false} else if (/ / .m3u8. * $/ .test (xhr.responseURL | |")) {this.videoUrl = xhr.responseURL}; xhr.send (null); return this.videoUrl;}}
When it is determined that the video does not need to deal with XMLHttpRequest objects, the video playback will be normal and will not report an error.
At this point, about "how to solve the problem that IE browsers cannot play properly due to errors in RTMP video streams?" The study is over. I hope I can solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.