When videojs is used as a player, errors are reported when playing live streaming.

nginx-rtmp server has been set up, which is based on the link description
VCL verification that can be played, but using videojs results to report an error
code is as follows



<head>
  <link href="https://vjs.zencdn.net/7.1.0/video-js.css" rel="stylesheet">

  <!-- If you"d like to support IE8 (for Video.js versions prior to v7) -->
  <script src="https://vjs.zencdn.net/ie8/ie8-version/videojs-ie8.min.js"></script>
</head>

<body>
  <video id="my-video" class="video-js" controls preload="auto" width="640" height="264"
  poster="MY_VIDEO_POSTER.jpg" data-setup="{}">
    <source src="rtmp://ip:1935/hls/111" type="rtmp/flv">
    <p class="vjs-no-js">
      To view this video please enable JavaScript, and consider upgrading to a web browser that
      <a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
    

</video> <script src="https://vjs.zencdn.net/7.1.0/video.js"></script> </body>

error

VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) No compatible source was found for this media. 

chrome browser

there is a mistake in understanding. Videojs cannot solve the rtmp playback problem. We still need to introduce flash to implement

.
Apr.06,2021

seems to be incompatible


can I put a video tag directly? Please try enough before asking questions

Menu