473,573 Members | 4,174 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JS FLV Video Player works fine in FF but error in IE

So I tried to do my father a favor and convert his advertisements
to .flv and place them on his website. With Flash being $600, I found
an open-source .flv player and configured it. So today he called and
stated it isn't working with IE.

The script:
<script type="text/javascript" src="http://www.fivestarsuz uki.com/
<script type="text/javascript">
* Init and setup FlowPlayer. This example file shows 'advanced'
features like
* playlists and configuring with JavaScript. FlowPlayer.html is a
simpler example.

var flowPlayer1;
function init() {
if (document.getEl ementById) {
flowPlayer1 = document.getEle mentById("FlowP layer");
setInitialConfi g();

// wait for the page to fully load before initializing
window.onload = init;

function setInitialConfi g() {
fpConf.playList = clips;
fpConf.autoPlay = false;
fpConf.autoBuff ering = false;
flowPlayer1.set Config(fpConf);

* This is the playlist with FLV videos and images. The images can have
a duration property
* and the flv video files can have start and end properties that give
the starting and
* ending positions in seconds. All these attributes (duration, start,
end) are optional.
* The start and end attributes really only work with the Flash Media
Server. I have had
* problems when thesting using Red5.
var clips = [
{ name: 'ClickToPlay', url: 'xl7.jpg' },
{ name: 'ACTI', url: 'act1.flv', start: 1, end: 32 },
{ name: 'ACTI', url: 'act2.flv', start: 1, end: 32 },
{ name: 'XL7', url: '14xl7.flv', start: 1, end: 26 }

var fpConf = {
showPlayList: false,
baseURL: 'http://www.fivestarsuz uki.com/video',
bufferLength: 20,
loop: false,
videoHeight: 300,
hideControls: false,
showPlayListBut tons: true,
progressBarColo r1: 0xFF0000,
progressBarColo r2: 0xFF0000,
bufferBarColor1 : 0x00FF00,
bufferBarColor2 : 0x00FF00,
progressBarBord erColor1: 0xAAAAAA,
progressBarBord erColor2: 0xAAAAAA

* JavaScript event hanlders:
function clipSelected(cl ipIndex) {
flowPlayer1.ToC lip(clipIndex);

function play() {
flowPlayer1.DoP lay();
updateIsPlaying ();

function pause() {
flowPlayer1.Pau se();
updateIsPlaying ();

function stop() {
flowPlayer1.DoS top();
updateIsPlaying ();

function updateIsPlaying () {
var field = document.getEle mentById("playi ng");
field.value = "Playing: " + flowPlayer1.get IsPlaying() + ", paused : "
+ flowPlayer1.get IsPaused();

function seek() {
var seekTimeField = document.getEle mentById("seekT ime");
flowPlayer1.See k(seekTimeField .value);

function getTime() {
var time = flowPlayer1.get Time();
var timeField = document.getEle mentById("time" );
timeField.value = time;

function getDuration() {
var value = flowPlayer1.get Duration();
var field = document.getEle mentById("durat ion");
field.value = value;

function getPercentLoade d() {
var value = flowPlayer1.get PercentLoaded() ;
var field = document.getEle mentById("loade d");
field.value = value;

function replaceConfig() {
// replace the playlist in our configuration
fpConf.playList = [
{ name: 'ACT1', url: 'act1.flv' } ];
fpConf.autoBuff ering = true;
fpConf.autoPlay = true;
flowPlayer1.set Config(fpConf);

* Flash callback handlers. The player calls these on specific events:

function onClipDone(clip ) {
addClipEvent("c lip done : " + describeClip(cl ip));

function onClipChanged(c lip) {
addClipEvent("c hanged to clip : " + clip.name);

function onLoadBegin(cli p) {
//addClipEvent("s tarted loading : " + clip.name);

function onStreamNotFoun d(clip) {
addClipEvent("s tream not found: " + describeClip(cl ip));

function onPlay(clip) {
addClipEvent("p lay: " + clip.name);

function onStop(clip) {
addClipEvent("s top: " + clip.name);

function onPause(clip) {
addClipEvent("p aused: " + clip.name);

function onResume(clip) {
addClipEvent("r esumed: " + clip.name);

function onCuePoint(cueP oint) {
addClipEvent("c ue point received, time: " + cuePoint.time + ", type '"
+ cuePoint.type + "', thumb: " + cuePoint.thumb + ", parameters: " +
cuePoint.parame ters);

* Helpers:

function addClipEvent(de sc) {
var events = document.getEle mentById("event s");
events.appendCh ild(document.cr eateTextNode(de sc));
events.appendCh ild(document.cr eateElement("br "));

function describeClip(cl ip) {
return "Name: " + clip.name + ", baseUrl: " + clip.baseUrl + ",
fileName: " + clip.fileName +
", start: " + clip.start + ", end: " + clip.end + ", protected: " +
clip.protected +
", linkUrl: " + clip.linkUrl + ", linkWindow: " + clip.linkWindow + ",
controlEnabled: " +
clip.controlEna bled;


<div id="flowplayerh older" style="width:60 0px; margin:0 auto; ">
This will be replaced by the player.

<script type="text/javascript">
// <![CDATA[

var fo = new SWFObject("vide o/FlowPlayerWhite .swf", "FlowPlayer ",
"468", "350", "7", "#ffffff", true);
// need this next line for local testing, it's optional if your swf is
on the same domain as your html page
fo.addParam("al lowScriptAccess ", "always");
fo.addParam("fl ashVars", "config={config Inject: true}");
fo.write("flowp layerholder");

// ]]>

<a href="javascrip t: clipSelected(1) "><b>Play ACTI</b></
a>&nbsp;&nbsp;< a href="javascrip t: clipSelected(2) "><b>Play ACTII</b></
a>&nbsp;&nbsp;< a href="javascrip t: clipSelected(3) "><b>Play XL7
Reply With Quote

Apr 11 '07 #1
1 3424
On Apr 11, 12:33 pm, "jamesdylangold st...@gmail.com "
<jamesdylangold st...@gmail.com wrote:
So I tried to do my father a favor and convert his advertisements
to .flv and place them on his website. With Flash being $600, I found
an open-source .flv player and configured it. So today he called and
stated it isn't working with IE.
(very long script not included)

I am not certain what you did. First you do not need an open
source .flv player. This is needed only to play a nude .flv without
the .swf container file. If you write proper .flv/.swf code, the free
official flash player on most computers today will play .flv/.swf just
fine and is used by Google, YouTube, MySpace, and many large news
sites. Now an official flash suite that includes an encoder
for .flv/.swf is indeed expensive. However you can buy an encoder that
will encode either .swf old fashioned video or .flv/.swf format video
for about $US 50. If you select to encode as .flv/.swf it will take
most of the usual video file formats as input. After selection of the
usual parameters such as size, bit rate, frame rate etc, it outputs
a .flv(flash video) file and a container .swf file that is quite small
and contains controls, logos, or whatever you need. On your server,
both of these files must be placed in the same directory as your page
using flash. You only refer to the .swf file as usual in the code.
The .flv file is found by the .swf container file automatically, and
you do not even mention it on your web page. After the page is viewed
on a browser, you will find that both the container .swf and .flv
video file have been downloaded to the browser temporary cache.

If you go to my page at http://www.cwdjr.info/video_extreme/VideoZoo.php
you will see a link to a .flv/.swf page. View the page code for this
to see how I use valid object code to make the flash video play both
on IE and most other common recent browsers such as Firefox, Opera,
Netscape, and Seamonkey. These pages are designed to give high
resolution on a good broadband connection, and you likely would encode
at much lower resolution for some ads. Notice this all has not
required any script to play the flash video. I am not for sure exactly
what you intended to do with that very long script you gave, and I am
no sure I would have time to review it in detail, even if I did.
Anyway, a .flv/.swf can be made to play on most recent browsers,
including IE, with valid html using an object approach or even some
invalid html using an embed path for non-IE browsers as often is done.
Hopefully this will help you get your problem with IE solved.

Apr 11 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: jen_designs | last post by:
How do I create custom controls for an embeded video. I need stop, play, pause, etc. Any thoughts?
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
by: chrisdude911 | last post by:
look at this page http://www.acejs.com/scriptsfolder/110003/110003.html is has a custom web button for *audio* is it possible for me to edit the code to make it *video* Thanks Chris
by: richardscheff | last post by:
Video selector works for IE but not other browsers. for not IE <object ID='Player' data="video/dodgeball.wmv" type="video/x-ms-wmv" width="320" height="280"> <param name="filename" value="video/dodgeball.wmv" /> <param name="ShowControls\" value="1" /> <param name="AutoStart\" value="1" /> <param name="PlayCount\" value="1" />
by: anil.rita | last post by:
When the user chooses an AV file to play, based upon the type of file, I want to use the default installed media player to play it. I am wondering if this is a good way - any alternatives, suggestions or improvements? if( wmv file) document.write("<OBJECT id=Player classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 height="354"...
by: michael | last post by:
Hello all, I have a Linksys WVC54GC network camera that I am trying to integrate into a website and to enable browsers other than IE to use. Linksys, in their ever-short-sighted ways, decided to make this device only compatible with IE. It requires IE and ActiveX. However, you can access the video stream directly with the following...
by: Oscar Arreyano | last post by:
I did a website for a friend's company where they wanted a 'downloads' section similar to standard file sharing you see all over the place. Everything works great except for video. I know there are codecs involved, however, if i create a video (I've tried mpg, avi, wma so far) I can watch it on my pc from disk just fine. Since my pc is also my...
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
Note: My apologies for repeating this post from last week, but my nospam alias and profile account were incorrect. I think I have fixed this, so hopefully this post will trigger MS into a response per their MSDN policy. -------------------- I have a web site under .NET 2.0 that renders videos using the Silverlight media player. The web...
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
This is a follow-up to my post "Silverlight video doesn't work when file is streamed from handler in ASP.net" at http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.dotnet.framework.aspnet&mid=e9a38d03-83a8-41fc-8950-5ee60d2a18a5. I have a web site under .NET 2.0 that renders videos using the Silverlight...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.