On the problem of videoJs playing rtmp in the local environment

1. Write a demo post that can be played in web, but if you open it directly in a browser, you can"t
2.

<html>  
  <head>  
  <title></title>  
  <meta charset="utf-8">  
  <link href="http://vjs.zencdn.net/5.5.3/video-js.css" rel="stylesheet">  
  <!-- If you"d like to support IE8 -->  
  <script src="http://vjs.zencdn.net/ie8/1.1.1/videojs-ie8.min.js"></script>  
</head>  
<body>  
  <h1></h1>  
 <video id="my-video" class="video-js" controls preload="auto" width="640" height="300"  
 poster="https://img.codeshelper.com/upload/img/2021/08/23/lxpa4qyndqx1103.jpg" data-setup="{}">  
    <source src="rtmp://live.hkstv.hk.lxdns.com/live/hks" type="rtmp/flv">  
    <!-- rtmphls -->  
    <!-- <source src="http://10.10.5.119/live/livestream.m3u8" type="application/x-mpegURL"> -->  
    <p class="vjs-no-js"> JavaScriptHTML5  
      To view this video please enable JavaScript, and consider upgrading to a web browser that  
      <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>  
    

</video> <script src="http://vjs.zencdn.net/5.5.3/video.js"></script> </body> </html>
  1. there is no error message
  2. try to change to a file like map4, which can be played directly, but there is no result.

ask the great god to explain why you can"t play it directly in the browser

.
Aug.23,2021

I have a similar problem. I can't play a file in rtmp format. Have you solved this problem now


have you solved it? Can the stream file be accessed by local static questions? Why is it that the released ones can be accessed normally, but it is not possible to open the local static html directly? Ask


to set flash, on the browser's address bar to allow it to play.

Menu