Brk
Brk

Reputation: 1297

Videojs and rtmp streaming

Hey I am using videojs to display certain videos, some of the videos which need to be display are rtmp streaming.

I am trying using the following configuration to run the video but with no luck. Do I need certain plugin for this type of videos?

This what I have achieved so far:

<link href="http://vjs.zencdn.net/5.0.2/video-js.css" rel="stylesheet">
    <script src="http://vjs.zencdn.net/ie8/1.1.0/videojs-ie8.min.js"></script>
    <script src="http://vjs.zencdn.net/5.0.2/video.js"></script>
    
  <video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="640" height="264" poster="http://vjs.zencdn.net/v/oceans.png" data-setup="{}">
    <source src="rtmp://aljazeeraflashlivefs.fplive.net/aljazeeraflashlive-live/aljazeera_ara_high" type="rtmp/mp4">
    <track kind="captions" src="../shared/example-captions.vtt" srclang="en" label="English"></track>
    <!-- Tracks need an ending tag thanks to IE9 -->
    <track kind="subtitles" src="../shared/example-captions.vtt" srclang="en" label="English"></track>
    <!-- Tracks need an ending tag thanks to IE9 -->
    <p class="vjs-no-js">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></p>
  </video>

Does VideoJS support rtmp streaming, it says according to the documentation that it support flash videos(is that include rtmp?)

I have change the type of the video to rtmp/mp4 is that ok?

If I am using vlc or vlc plugin then I can run the video which is here: rtmp://aljazeeraflashlivefs.fplive.net/aljazeeraflashlive-live/aljazeera_ara_high

Upvotes: 0

Views: 1309

Answers (2)

Explosivo30
Explosivo30

Reputation: 61

I used this on my project

<head>
<link href="https://vjs.zencdn.net/7.6.6/video-js.css" rel="stylesheet" />
<script src="https://vjs.zencdn.net/7.6.6/video.js"></script>
<title>Stream PAGE</title>
<!-- This style is clearly not needed but yolo  -->
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>   
<body>
<h1>What you want</h1>
<video id="player" class="video-js vjs-default-skin" width="800" height="440"  controls preload="none">
<source src="http://192.168.205.1:9000/1234.m3u8" type="application/x-mpegURL" />
</video>
<script>
var player = videojs('#player')
</script>

Upvotes: 1

superdianix
superdianix

Reputation: 98

Don't forget to change your source type to: type="application/x-mpegURL"/> if it's m3u8

Upvotes: 1

Related Questions