I am maintaining an HTML help system where assets have recently been split apart from HTML documents. I'm noticing that videos that will play when loaded from a local subfolder will not play when loaded from a sibling folder.
Here's a much reduced example: webroot/dir/a.html contains:
<html><body>
Here's a video:<p>
<object id="mediaPlayer" width="640" height="480"
classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
type="application/x-oleobject">
<param name="fileName" value="../siblingdir/xxx.wmv">
<embed type="application/x-mplayer2"
pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"
id="mediaPlayer" name="mediaPlayer"
src="../siblingdir/xxx.wmv">
</object>
</body></html>
Even though webroot/siblingdir contains xxx.wmv, the video will not play.
HOWEVER, if I drop the two "../siblingdir" elements in the above code and store the video in the same folder as the web page, the video will play.
Images will load from a sibling directory.
Can the video be made to play from a sibling folder? It this a security setting? Is it something that can be enabled or disabled?
Test platform is MSIE 11 on Windows 7 Enterprise.
<object id="mediaPlayer" width="640" height="480"
type="application/x-oleobject" data="../siblingdir/xxx.wmv">
<embed type="application/x-mplayer2"
id="mediaPlayer" name="mediaPlayer"
src="../siblingdir/xxx.wmv"/>
</object>
It is best if you publish your web page to a web server (localhost) or if you are using the local file system, publish your video files to the same windows folder as your source html file. Adjust the Advanced tab of Internet Options to "Allow active content in files on my computer to run.". eg. src="xxx.wmv"
Related
I want to integrate an mp3 audio file with a size of 20MB into my website (PHP 7, Apache webserver).
<audio id="myaudio" src="./assets/myaudio.mp3" preload=„none" controls></audio>
The mp3 file should not be loaded on every page load, only when someone presses the play button.
The mp3 file should be streamed and start to play immediately (no waiting for complete download)
The mp3 file should also run in Firefox.
Does anyone have an idea how I can achieve all this?
Streaming MP3
by Toby Mack
To stream MP3's on a page you will need to have an MP3 player like WinAmp, Windows Media Player, or Real Audio Player. The MP3 will stream as it loads on the page and will allow for longer larger sound files to be played.
Save your MP3 file to the same directory where you will be playing the sound from, or a sound directory which you know the URL for already,
Open up a notepad by clicking Start => Programs => Accessories => Notepad
Type in only the exact Address or URL of your MP3 file.
Type it in as simple as this:
http://example.com/sound/music.mp3
where the domain is your domain, the sound folder is where you placed your MP3, and the music.mp3 is your mp3 file.
Save this file as music.m3u . Upload this file into the directory where you will place your sound.
Open your page up in an editor such as Notepad that will allow you to edit the code on the page.
Insert the following code into the HTML code of your page for a clickable link to stream by using this:
Clickable player and doawnload this file by right clicking it and save to yur directory:
<img border="0" src= "mp3.gif" width="41" height="25">
Or you can embed with this:
<EMBED src="music.m3u" autostart=true hidden=true>
Or you can embed for both IE and Netscape with this:
<!This code for IE>
<EMBED SRC="http://example.com/sound/music.m3u" HIDDEN="true" AUTOSTART="true" width="128" height="128">
<!This code for Netscape>
<OBJECT ID="MediaPlayer"
classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
standby="Loading Microsoft Windows Media Player components..."
TYPE="application/x-oleobject" width="239" height="179">
<PARAM NAME="FileName" VALUE="http://server/path/your-file.asx">
<PARAM NAME="AnimationatStart" VALUE="false">
<PARAM NAME="TransparentatStart" VALUE="true">
<PARAM NAME="AutoStart" VALUE="true">
<PARAM NAME="ShowControls" VALUE="0">
<Embed TYPE="application/x-mplayer2"
pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&"
SRC="http://example.com/sound/music.m3u"
Name=MediaPlayer
ShowControls=0
Width=2
Height=2
</embed>
</OBJECT>
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.
I'm looking to play a flash video hosted on a remote website. I've tried the following (and profuse google-ing):
In source of page on http://fakesite1.com/player.jsp:
<embed src = "FlashPlayer.swf?file=http://fakesite2.net/video.flv" />
I can browse to http://fakesite2.net/video.flv and ensure it's there, but the player comes back "movie not loaded" (on right-click) on fakesite1. My initial guess is that this might be some sort of security feature... is it possible to play a video hosted on a remote site?
The message "Movie not loaded" as seen in the context menu of an SWF object in a webpage means that the .swf file was not loaded by the browser plugin. The main cause is that that SWF file doesn't exist and the plugin got a 404 error, in which case make sure that the path to the SWF file is correctly set.
Also, the <embed> element is obsolete in modern HTML. Use <object> instead, as seen below.
Note that various versions of IE (except IE9/10, possibly including IE8) do not support the HTML5 <object data="" /> element, they prefer the IE4-era <object clsid="" /> element, so use a conditional comment, like so:
<!--[if IE]>
<object width="640" height="480" data="http://mysite.com/myflash.swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" >
<![endif]-->
<!--[if !IE]>-->
<object width="640" height="480" data="http://mysite.com/myflash.swf" />
<!--<![endif]-->
Try;
<embed
src="player.swf"
width="300"
height="300"
allowscriptaccess="always"
allowfullscreen="true"
id="player1"
name="player1"
file="http://fakesite2.net/video.flv"
/>
Is your SWF file named exactly "FlashPlayer.swf"?
As far as I know in Windows based systems letter case differences don't matter, however in Unix or Linux based ones it does matter. Your host is probably a Linux one. Try using lower case letters like "flashplayer.swf". Make this a habit with files that will be hosted online all the time. Also no space or special characters, use - or _ to seperate words.
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.
I created a custom video skin for my movie, and published the swf. The file plays on my Mac (using Flash player v9) but it will not play on my PC (using Flash player 10). When I uploaded it to the host, neither players will play the swf. The bitmaps in the flash file show up, but the movie won't play. I don't know if it is how I exported it or what, but it will not play! Any Idea why this is happening?
The video is hosted here:
http://hqinternetsolutions.com/YOGIPATCH/index.html
Here is my Actionscript:
flvPlayback.playPauseButton = playpausebtn;
flvPlayback.muteButton = mutebtn;
flvPlayback.volumeBar = volbar;
flvPlayback.seekBar = seekbar;
And my HTML embedded flash:
<div id="movie">
<object id="movie" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="440" height="273">
<param name="movie" value="file.swf">
<param name="quality" value="high">
<embed src="file.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="440"
height="273"></embed></object>
</div>
Just had a look using Firebug. Your swf appears to be referencing the following URL:
http://hqinternetsolutions.com/Users/larrykain/Desktop/flash%20skin/fullaquatic.flv
It's returning a 404 so it can't find the file. Looking at the URL, check the reference to how you've embedded it in the swf file.
This might be caused by different things:
Make sure the flv file is uploaded to the server along with the SWF.
Your FLV file might be blocked on the web server. Make sure it's not by pointing your browser to the actual FLV file directly (example: http://hqinternetsolutions.com/YOGIPATCH/myvideo.flv)
The flv path set in the FLVPlayback component might be too long.
Try adding a preceding / to the path of FLV in the component.