embed video object in html - html

I embed a video in html page with swf file. that is running on local host but when i run this on live server. than it dosent work properly.
I link flv video in swf file and embed it in html.
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','600','height','338','title','testing','src','Edit_video/9vi/home-page2','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','Edit_video/9vi/home-page2' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="600" height="338" title="testing">
<param name="movie" value="Edit_video/9vi/home-page2.swf" />
<param name="quality" value="high" />
<embed src="Edit_video/home-page2.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="600" height="338"></embed>
</object></noscript>

These two urls don't match:
<param name="movie" value="Edit_video/9vi/home-page2.swf" />
<embed src="Edit_video/home-page2.swf" ... />

running on local host but when i run this on live server
One reason for that can be careless handling of case.
Windows native filesystems you are case-insensitive, so you can refer to Edit_video and if the real name of the directory is actually edit_video with a small e it doesn't care. But if you then upload it to a server running a case-sensitive filesystem (like most Linux hosts), that won't work any more; the two are different filenames and won't match.

Additionally you need to ensure that the file system on your local server matches that of your live server.
I.e. make sure that the file path
Edit_video/9vi/home-page.swf
is valid from where the HTML is being stored online.

Related

Embedding WMV video file in HTML page using Silverlight plugin

I need to embed a video file codified in Windows Media Video format (WMV). The video files are send in streaming using Windows Media Services(in on Demand Mode) over HTTP protocol, and the client need to reproduce them.
I need to dinamically create a page with a video file embedded (each time the file and its path can change).
If I simply put in browser client the path of the file to reproduce, like:
http://myMediaServer:8000/stremVideo/pinball.wmv
automatically Windows Media Player opens, and I can control the reproduction of the video (seek forward, seek backward, pause or resume), without any problem, while if the video file is embedded in an HTML page, using the following code I can't seek the reproduction but I can only pause and resume the video.
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="480" height="360" codebase="http://www.microsoft.com/Windows/MediaPlayer/">
<param name="Filename" value="http://remoteServer:8000/stremVideo/pinball.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 src="http://remoteServer:8000/stremVideo/pinball.wmv" type="application/x-mplayer2" autostart="1" enabled="1" showstatusbar="1" showdisplay="1" showcontrols="1" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" width="480" height="360"></embed>
</object>
So, the questions are the following:
How can I obtain all the control for the embedded video file?
Someone suggest to use Silverlight plugin. How can I embed video in a HTML page using Silverlight plugin? I need to create a Silverlight application? If yes, I need to have one application for each video file I want reproduce?
You need to create one Silverlight player app and use it as more times as you want.
And you can control it via JS.
Silverlight is best solution for high-quality WMV on pages.
Params, which you defined, are params of Silverlight app and you must specify in app which params you must have and how they will be used.
There is an open source player frame work which may help: Have you looked at this? http://playerframework.codeplex.com/

Flash file not playing on browser from server

I have a flash file on my server and I am trying to open it on my browser. If I call for it directly, it downloads the file. If I embed it in html file and then call the html file, it does not display the flash file. Is there any other way to access it without converting flash file into any other format?
Following is my code in html:-
<html>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="498" height="380" id="test1">
<param name="movie" value="game.swf" />
<embed src="game.swf" width="498"
height="380" name="test1" type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer" />
</object>
</html>
It sounds to me that your web server is not configured to serve SWF's (aka: it doesn't know what it is). This is typical on barebones IIS installations. Therefore, it forces a "download file" header when you request the file.
Check your web server config to ensure it is allowing SWF files to be served.

getting embedded flowplayer to play a local video file

I embedded flowplayer on an html page using the following <object tag .It successfully plays the mentioned video from their site (ie from url http://stream.flowplayer.org/KimAronson-TwentySeconds1318.flv
However,I would like to play a video from my local filesystem. say /home/me/videos/test.flv
How do I mention the url in this case? What baseurl ,url values should I provide?
<object width="320" height="200" id="undefined" name="undefined"
data="http://releases.flowplayer.org/swf/flowplayer-3.2.10.swf" type="application/x-shockwave-flash">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.10.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value='config={"clip":{"baseUrl":"http://stream.flowplayer.org","url":"http://stream.flowplayer.org/KimAronson-TwentySeconds1318.flv"},"canvas":{"backgroundColor":"#112233"},"plugins":{"controls":{"time":false,"volume":true,"fullscreen":false},"content":{"url":"flowplayer.content-3.2.8.swf"}}}' />
</object>
You cannot directly ask the flowplayer to load a file from your local file system. Think about all this flash (swf) files trying to load this file from a remote server, they just cannot simply use whatever in your file system as a resource.
The easiest way to test it out is set up a local server. Be it Apache, IIS, or whatever server you like or easy for you. And then change the config's url to the video's url on your local server, which will solve your problem.
You don't need to change any thing for baseUrl as this is where all this flowplayer flash files being loaded. For example, the content url in your provided code will be baseurl + content.url => http://stream.flowplayer.org/flowplayer.content-3.2.8.swf.
However, once you put your page into production, you may need to consider about hosting this flash files locally to avoid fetch the remote flowplayer server every time. In that case, you need to change the baseUrl to whatever the new server should be.

How do you dynamically load different streaming F4V files into one SWF player?

I need to figure out how to utilize one SWF player/file to load different streaming F4V files dynamically.
As it stands now, I have:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="500" height="314" id="something" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="/images/flash/' . $video . '" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="/images/flash/' . $video . '" quality="high" bgcolor="#ffffff" width="500" height="314" name="something" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
</object>
Currently I am publishing a separate SWF player/file for each F4V, but this is unacceptable. I need to use one SWF file to load different F4V files. I'm not that knowledgeable in the ways of Flash, but I believe that the "src" attribute of the embed tag and the "name='movie'" attribute of the object's param tag needs to point to the SWF player/file. So does anybody know how I can manipulate the object and embed tags to make them load a different F4V file into the SWF player?
Well since nobody responded it was up to me to continue my search for the answer to this one. I modified a solution taken from: http://www.webdeveloper.com/forum/showthread.php?t=185784 by infinityspiral.
It requires you to add the following line of code to the SWF player/file.
FLVPlayerInstanceName.play(this.loaderInfo.parameters.file);
After doing this and uploading it to your web server, you can access FlashVars. The one I needed to access was "file" and I simply had to feed it an rtmp call (such as "rtmp://yourserver.vod/mp4:Whatever.f4v") once in a param tag inside the object tag and once as an attribute inside the embed tag and it worked.
There does appear to be a bug with the version of Flash Media Server I'm using though... You need to be careful what directory you're putting your F4V files in on your streaming server until Adobe corrects the issue (so I had to fiddle with my rtmp call above by removing a directory level inside the call to get it to work).

How to stop Quicktime movie in web page from auto loading?

I have two quicktime movie files embedded in one web page. I have set autoplay="false" to prevent them both from playing at the same time, but they still load at the same time. Can I prevent them from loading until the user clicks the play button?
autohref="false" is supposed to do this but it does not seem to work.
Apple's documentation for the EMBED element
[BEGIN EDIT - 2010/03/30]
The problem here, I think, is that there is no control to modify buffering behavior. The AutoHREF parameter refers to preloading the value of an href parameter (or perhaps an HREF embedded in the video itself?), not to buffering the video.
I'm currently using a modification of this technique on some pages and Javascript with Modernizr to dynamically insert different video embeds depending on browser support.
I transcode my video to ogg/theora/vorbis like this with VLC (on a Mac; it's very similar for *nix) with 1024kbps bitrate for video and 128kbps bitrate for audio:
/Applications/VLC.app/Contents/MacOS/VLC \
--rc-fake-tty -I dummy \
${original_video} \
':sout=#transcode{vcodec=theora,vb=1024,acodec=vorbis,ab=128,audio-sync}:standard{mux=ogg,dst=${ogg_file},access=file}' vlc://quit
And to transcode to MP4/H.264/AAC (same bitrates) (assuming VLC supports M4A/AAC audio):
/Applications/VLC.app/Contents/MacOS/VLC \
--rc-fake-tty -I dummy \
${original_video} \
':sout=#transcode{vcodec=mp4v,vb=1024,acodec=mp4a,ab=128}:standard{mux=mp4,dst=${m4v_file},access=file}:sout-transcode-soverlay=0' vlc://quit
(Using the original, high-quality video would be best, but this should work for any format VLC can decode.)
Just for giggles, I also use the HTML5 audio element, when available, and here's how I transcode an mp3 to ogg/vorbis (using lame and vorbis-tools) at 128kbps (VBR) and high quality:
lame --decode ${mp3_file} - \
| oggenc -r -b 128 -q 9 -o ${ogg_file} -
And mp3 to m4a/AAC (using lame and faac):
lame --decode ${mp3_file} - \
| faac -w -s -o ${m4a_file} -
(Of course using the original raw PCM/WAV would be better.)
(IANAL, but:) It's important to note that both H.264 and AAC are under patent (and licensing is exorbitant). There are some fears that Theora may be subject to so-called submarine patents, but it and Vorbis appear to be unencumbered currently.
[END EDIT]
Did you find an answer to this? I'm seeing the same behavior. (I've been assuming that parameter/attribute names are not case-sensitive, as even the Apple docs inconsistently use various case schemes.)
In case there's any confusion, I think what the original questioner (and I) wants is for the Quicktime movie not to be downloaded at all until the user clicks the "play" button. I have several videos on the same page, and it's unlikely that the user will watch them all; I don't want them downloaded until they're explicitly requested. The "autohref" parameter is supposed to ensure this behavior when set to "false", but at least in Firefox 3.6 with Quicktime plugin 7.6.3 on Mac OS 10.6.2, it doesn't appear to work.
<object
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab"
width="332"
height="184"
id="video-0"
>
<param name="src" value="video/sony-ps3.mov" />
<param name="AllowEmbedTagOverrides" value="True" />
<param name="AutoPlay" value="False" />
<param name="AllowEmbedTagOverrides" value="True" />
<param name="AutoPlay" value="False" />
<param name="AutoHREF" value="False" />
<param name="EnableHREF" value="False" />
<param name="EnableJavascript" value="True" />
<param name="ShowLogo" value="False" />
<param name="Volume" value="60" />
<param name="wmode" value="transparent" />
<embed
width="332"
height="184"
src="video/sony-ps3.mov"
type="video/quicktime"
pluginspage="www.apple.com/quicktime/download"
name="video-0"
AllowEmbedTagOverrides="True"
AutoPlay="False"
AutoHREF="False"
EnableHREF="False"
EnableJavaScript="True"
ShowLogo="False"
Volume="60"
wmode="transparent"
></embed>
</object>
I haven't tried this yet but maybe it will work it's the first thing listed autohref="false"
http://web.mac.com/studybuddys/iWeb/studybuddys/12%20Multimedia_files/06%20Apple%20QT%20Embed%20Tag%20Attributes.pdf
I'm trying to do this for audio (not have it load till the play button is clicked) but i don't have an href value all I have is a src value
ps - I just noticed in your original posting that you said autohref="false" is supposed to do this but doesn't work
I guess I'll just add that I just have a src value and no href value i am trying to find the same answer but with audio
It depends on how you embed the QuickTime movies. But it should respect the autoplay flag. Just putting it in tagswill work, but I think it's not the correct way to do it. Have you done it like the code below?
<object width="160" height="144"
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="sample.mov">
<param name="autoplay" value="false">
<param name="controller" value="false">
<embed src="sample.mov" width="160" height="144"
autoplay="false" controller="false"
pluginspage="http://www.apple.com/quicktime/download/">
</embed>
</object>
Update
Or do you mean the movies do not play on page load, but both start playing when the user interacts with one of them? If the latter is the case it would probably be better to set a placeholder image which a user can click and then load the appropriate content, instead of loading both applets at the same time. Doing it like this takes less resources, because the end user machine would only have to load the QuickTime plugin once a user has activated a particular movie.