Adding streaming video file from rtsp link to my website - html

Here is my code. It works fine in all browsers on my computer,but it doesn't work on another.
Info
The video file is in .wmv format
It shows alert like install activex plugin.
After clicking the install button it shows errors.
It works fine in internet explorer but fails in mozilla and chrome.
I think it may because of the browser doesn't have the plugin.
Questions
Is there any other way to supports this in all browsers?
Is there any way to install those plugins by code?
<object
codebase="http://www.microsoft.com/Windows/MediaPlayer/" height="360" width="480">
<param name="Filename" value="rtsp://xyz.wmv" />
<param name="AutoStart" value="true" />
<param name="ShowControls" value="true" />
<param name="BufferingTime" value="2" />
<param name="ShowStatusBar" value="true" />
<param name="AutoSize" value="true" />
<param name="InvokeURLs" value="false" />
<embed autostart="1" codebase="http://activex.microsoft.com/activex
/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0"
enabled="1" height="360" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
showcontrols="1" showdisplay="1"
showstatusbar="1" src="rtsp://xyz.wmv" type="application/x-mplayer2" width="480">
</embed>
</object>

If you're going to go the route of converting to an .mp4 filetype using the <video> tag here is the code you would use. Just replace the src with your own.
<video width="480" height="360" controls>
<source src="YOURMOVIE.mp4" type="video/mp4">
VIDEO
</video>

Related

Play Media Player stream on firefox and chrome

I have a media player stream live on an ip, e.g: 192.168.1.100 and port 8888
with following code it is played on IE, but not in forefox, how can i play stream on firefox?
<object id="mediaplayer" classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=5,1,52,701"
standby="loading microsoft windows media player components..."
type="application/x-oleobject" width="320" height="310">
<param name="filename" value="http://192.168.1.100:8888">
<param name="animationatstart" value="true">
<param name="transparentatstart" value="true">
<param name="autostart" value="true">
<param name="showcontrols" value="true">
<param name="ShowStatusBar" value="true">
<param name="windowlessvideo" value="true">
<embed src="http://192.168.1.100:8888" type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
autostart="true" showcontrols="true" showstatusbar="1"
bgcolor="white" width="320" height="310">
</object>
The same HTML won't work in any other browser since you are using ActiveX which is a Microsoft technology.
So you would have to create a different HTML/JavaScript player. But since your stream plays back in IE with an older MediaPlayer plugin - most likely your stream format is a Windows Media format.
Windows Media formats are a Microsoft technology and likely won't play in any other browser.

Embed wmv in all Chrome, IE and Firefox

The code below works in IE, Firefox but not Chrome. What change is necessary to make it work in Chrome. Chrome says "No plug-in available to display this content".
I got the code from:
Embedding Windows Media Player for all browsers
<object id="mediaplayer" classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=5,1,52,701" standby="loading microsoft windows media player components..." type="application/x-oleobject" width="320" height="310">
<param name="filename" value="./test.wmv">
<param name="animationatstart" value="true">
<param name="transparentatstart" value="true">
<param name="autostart" value="true">
<param name="showcontrols" value="true">
<param name="ShowStatusBar" value="true">
<param name="windowlessvideo" value="true">
<embed src="./test.wmv" autostart="true" showcontrols="true" showstatusbar="1" bgcolor="white" width="320" height="310">
You will need to download the plugin for WMV files on the client side. That means that for anyone who visits the site with Chrome will need to have already installed the Chrome plugin locally.
HTML5 Video/Flash video may be a better way to accomplish this and make it seamless for the user. Here's an example for HTML 5 video

Embed wmv video does not allows fullscreen button

I am trying to embed a wmv video in an html code. The file is playing normally, but I want the website's user, to be able to see the fullscreen button, in order to enter a fullscreen mode.
However, the button does not appears. I have also EnableFullScreenControls flag turned on. Hoever it makes no difference. The code is shown below
<object id="MediaPlayer" width="500" height="500" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
standby="Loading Windows Media Player..." TYPE="application/x-oleobject">
<param name="FileName" VALUE="file:///C:/Users/john/Desktop/modus-files/HTML/videos/Danger.wmv">
<param name="ShowControls" VALUE="true">
<PARAM NAME="fullScreen" VALUE="true">
<PARAM name="uiMode" value="full">
<param name="ShowStatusBar" value="false">
<param name="ShowDisplay" VALUE="false">
<param name="autostart" VALUE="false">
<PARAM NAME="EnableFullScreenControls" VALUE="1">
<embed type="application/x-mplayer2" src="file:///C:/Users/john/Desktop/modus-files/HTML/videos/Danger.wmv" name="MediaPlayer"
width="400" height="400" fullScreen="full" ShowControls="1" ShowStatusBar="0" ShowDisplay="1" autostart="0"> </embed>
</object>
Thanks
I didn't found out what was the problem above. But as other people may have the same problem, I just wanted to post my workaround. I converted the videos to mp4, and then used the jplayer at the site. It is an html player and free and open source. That done the job quite easily. It is also (personal opinion) much beautiful that the media player.

Why does this audio file autoplay?

This keeps autoplaying even when I set it to false 3 times. I don't know what to do it's getting on my nerves. Any ideas?
<object>
<param name="src" value="http://linkimprov.com/buu.mp3">
<param name="autoplay" value="false">
<param name="autostart" value="false">
<param name="controller" value="true">
<embed src="http://linkimprov.com/buu.mp3" controller="true" autoplay="false" autostart="False" type="audio/mp3" />
</object>
You can see how it autostarts in jsfiddle: http://jsfiddle.net/Lisandro/wCJzm/3/
I just started web design and audio is making me want to cut my pc in pieces. Any ideas of why it autoplays??
Thanks
better to use this tag
<audio controls="controls">
<source src="http://linkimprov.com/buu.mp3" type="audio/mp3" />
</audio>
it's working for me!!
works great for IE and *mp3 files but Firefox doesn't support *.mp3 files. It supports *.ogg audio files. Having to have two versions of each of your audio files isn't really a solution. Also, try to find a simple command line utility to create your *.ogg files... good luck.

How to stream an mp3 over web?

How can I stream an MP3 in a html page? I am looking for a solution, which does not allow user to download of MP3 content, while allowing user to play it.
The Flash Player remains the best means of doing this if you want to reach the largest audience. JWPlayer wouldn't be a bad choice.
This way requires the Media Player Plugin
Use Media Player object/embed code:**
<OBJECT ID="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab# Version=5,1,52,701" STANDBY="Loading Microsoft Windows® Media Player components..." TYPE="application/x-oleobject" width="280" height="46">
<param name="fileName" value="http://www.domain.com/music/music.m3u">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="Volume" value="-300">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://www.domain.com/music/music.m3u" name="MediaPlayer1" width=280 height=46 autostart=1 showcontrols=1 volume=-300>
</OBJECT>
replace your playlist or MP3 File
<param name="fileName" value="http://www.domain.com/music/music.m3u">
No one mentioned the <audio> tag?
http://www.w3schools.com/html5/tag_audio.asp