How to Play Video (MP4 format) in IE , Firefox, Chrome.
You can also use a windows media player object tag
<object width="100%" height="100%"
type="video/x-ms-asf" url="Video/Home.mp4" data="Video/Home.mp4"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param name="url" value="Video/Home.mp4">
<param name="filename" value="Video/Home.mp4">
<param name="autostart" value="1">
<param name="uiMode" value="full">
<param name="autosize" value="1">
<param name="playcount" value="1">
<embed type="application/x-mplayer2" src="Video/Home.mp4" width="100%" height="100%" autostart="true" showcontrols="true" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed>
</object>
Also if the browser doesn't have the plugin to play it, it will propmt you to download one specific to your browser. But there is no other way to create a cross browser player without plug-ins(as far as my knowledge goes)
use <video> tag to embed the video
http://www.w3schools.com/html/html_videos.asp
Related
I'm using video.js (v 4.3.0) with flash player on internet explorer.
How can i stretch the video to container area like in this example http://www.aleosoft.com/flashtutorial_autofitexample.html?
I've tried some modification on video.dev.js file to add <PARAM NAME="SCALE" VALUE="exactfit"> on generated flash object. And also i've changed the wmode from opaque to transparent like in the example page code. Modified video.js generates the flash player as below and still not stretching.
<object width="100%" height="100%" class="vjs-tech" name="video_1_flash_api" id="video_1_flash_api" data="video-js.swf" type="application/x-shockwave-flash" style="display: block;">
<param value="video-js.swf" name="movie">
<param value="readyFunction=videojs.Flash.onReady&eventProxyFunction=videojs.Flash.onEvent&errorEventProxyFunction=videojs.Flash.onError&autoplay=true&preload=auto&loop=undefined&muted=undefined&src=http%3A%2F%2Flocalhost%2Fh5mp%2F_html%2F1.html&" name="flashvars">
<param value="exactfit" name="scale">
<param value="always" name="allowScriptAccess">
<param value="all" name="allowNetworking">
<param value="transparent" name="wmode">
</object>
I have some video files of format avi,mp4,flv. I am trying to run those in my html page. I used video tag. But by using video tag only mp4 file is running and all controls(start,pause,volume) are visible. Again I am trying to integrate by embed tag. But there videos are running but automatically and no controls like start,stop,pause,volume are not visible.
My code is like:
By video tag:
<video width="200" height="100" controls>
<source src="http://localhost/hk_v2/superadmin/gallery/video/Fiza-2.avi">
</video>
(this is not running at all)
<video width="200" height="100" controls>
<source src="http://localhost/hk_v2/superadmin/gallery/video/test.mp4">
</video>
(this is running properly with all controls)
By embed tag
<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="890" height="500">
<param name="fileName" value="http://localhost/hk_v2/superadmin/gallery/video/Fiza-2.avi">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="false">
<param name="Volume" value="-450">
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://localhost/hk_v2/superadmin/gallery/video/Fiza-2.avi"
name="MediaPlayer1" width=890 height=500 autostart=1 showcontrols=0 volume=-450>
</object>
(working but starting automatically and no controls over video).
Please help me how to resolve this issue.
Thanks in advance.
try html plugin for it download the files for it click here
step 1 : extract it in a folder. for ex.name a folder "html5plug".
step 2 :include this in your html
<link href="video-js/video-js.css" rel="stylesheet">
<script src="video-js/video.js"></script>
Note : you should create your html in the "html5plug" folder or you have set the src
yourself
step 3 : Add an HTML5 video tag to your page
click here check the demo on jsfiddle
Note : you must check your video links too.
first , you can try the classid like classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"
then we can control the video by javascript like below:
var wmp = $('object')[0];
wmp.controls.play() //play
wmp.controls.stop() //stop
wmp.controls.pause() //pause
You need to set the parameters to the correct values.
With the 3rd option change these values:
<param name="autoStart" value="false">
<param name="showControls" value="true">
I've had this sound effect play on my site for months now when a user gets a mail. Suddenly it's stopped working in Chrome, but works in other browsers. The code is:
<object width=0 height=0>
<param name=sound value=beep.swf>
<embed src=beep.swf width=0 height=0 loop=false></embed>
</object>
Is there something I'm not seeing?
changed it to
<object type=application/x-shockwave-flash data=beep.swf width=0 height=0>
<param name=movie value=beep.swf />
<param name=loop value=false>
</object>
and it worked.
I have embedded a flash video on my website.
I am having the problem that it seems to rescale fine in Firefox on the Mac, but in Firefox in Windows it just crops the video.
Here it my HTML
<object width="650" height="500">
<param name="movie" value="How To Add A Location">
<embed src="http://www.fribblesoft.com/zs-content/How_To_Add_A_Location.swf"
width="650"
height="500"
allowfullscreen="true"
bgcolor="#000000"
scale="tofit"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
The problem is going to be with the Flash, not the HTML. The movie is scaled correctly when it first loads, but after a few seconds it changes dimensions. This indicates that the Flash is probably resizing all of the elements dynamically based upon pixel values, rather than relative to the size of the stage.
I think this just might be a property of the Jing video. The following html seems to work for other shockwave files.
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
width="100%"
height="100%">
<param name="movie" value="How_To_Add_A_Location.swf" />
<param name="quality" value="high" />
<param name="scale" value="exactfit" />
<embed src="How_To_Add_A_Location.swf" quality="best" type="application/x-shockwave-flash" width="100%" height="100%" allowfullscreen="true" scale="exactfit" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
Video plays fine, but the controls (play, stop, rewind etc.) don't appear, despite setting the "controller" parameter to "true".
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="320" height="260">
<param name="src" value="myvid.mov" />
<param name="controller" value="true" />
<object type="video/quicktime" data="myvid.mov" width="320" height="260" class="mov">
<param name="controller" value="true" />
</object>
</object>
Works fine when I refer to this video:
http://realdev1.realise.com/rossa/rendertest/quicktime.html
Do the controls need to be enabled when encoding the video perhaps?
The height of the movie + 16px should do the trick.