tags:

views:

1296

answers:

5

I have a problem of playing FLV file which id embed in my swf when i place it on server, swf plays correctly but not FLV

any solution will be highly appreciated.


thanks for all replys, its works in All browesers other than IE 6 now ,

i will paste the code here for the flv to chk .

var videopath:String;
var flvtime:String;
var vidPlaying:Boolean = false;
var audio_sound:Sound = new Sound(vflvPlayback);

videopath = "/public/ANS/test/flash/Price_video.flv";

flvtime = ":00/:17";
time_txt.text = flvtime;

endClip_mc.moreabout_btn.enabled = false;
endClip_mc.send_btn.enabled = false;
endClip_mc.replay_btn.enabled = false;

import mx.video.*;
vflvPlayback.contentPath = videopath;
vflvPlayback.stopButton = my_stopbttn;
vflvPlayback.playPauseButton = my_playbttn;
vflvPlayback.seekBar = my_scrubber;
vflvPlayback.playheadUpdateInterval = 17;
var vid_time:Number;
var listenerObject:Object = new Object();
listenerObject.playheadUpdate = function(eventObject:Object):Void  {
    if (eventObject.playheadTime == undefined || vflvPlayback.totalTime == undefined || vflvPlayback.totalTime == 0) {
     return;
    }
    vid_time = Math.floor(eventObject.playheadTime);
    vid_mins = Math.floor(vid_time/60);
    vid_secs = Math.floor(vid_time%60);
    if (vid_secs<10) {
     vid_secs = "0"+vid_secs;
    }
    if (vid_mins<10) {
     vid_mins = "0"+vid_mins;
    }
    time_txt.text = ":"+vid_secs+"/:17";
    var percentPlayed:Number = eventObject.playheadTime/vflvPlayback.totalTime*100;


    if (percentPlayed>=2) {
     this.placeHolder._visible = false;
    }

    vflvPlayback.complete = function(eventObject:Object):Void  {

     vidComplete();
    };

    bar_mc._xscale = (vflvPlayback.totalTime == undefined || isNaN(percentPlayed)) ? 0 : percentPlayed;
};

vflvPlayback.addEventListener("playheadUpdate",listenerObject);

function vidComplete():Void {
    this.attachMovie("gfxFlash","flashFade",1000,{_x:-2, _y:10.5});
}
A: 

"Apache 5.5"? Apache httpd only goes to 2.x, so can we assume you mean Apache Tomcat 5.5? Or??? More information is required. Maybe even a link if you can. Flash players are really good about playing valid FLV video files via HTTP, even with bad mime type headers.

Stu Thompson
yes u are right its apache tomcat 5.5 , am sorry i wont be able to give u a link. My problem is it is not playing in IE6, and Mozilla version s less than 2.Any idea?
So the problem is browser specific? It works is some places? You'll need to show us some code to go any farther.
Stu Thompson
A: 

yes u are right its apache tomcat 5.5 , am sorry i wont be able to give u a link. My problem is it is not playing in IE6, and Mozilla version s less than 2.

Any idea?

A: 

In IIS you need to add the .flv extension to the known mime types otherwise files will be blocked. Perhaps Tomcat needs something similar.

FLV mime = 'video/x-flv'

Ady
Tomcat does not block files just because it does not have a MIME type mapping
Stu Thompson
+1  A: 

As said before check the mime type on the server.

If the FLV is playing in some browsers and not in others there is probably an issue with the Flash Player. First in all browsers go the URL where the FLV lives on the server so see if you actually access the file from a browser. Then check for each browser separately what Flash player version installed. E.g. If you're trying to play H264 video on Flash Player 8 it's not going to work.

Luke
A: 

thanks for all replys, its works in All browesers other than IE 6 now ,

i will paste the code here for the flv to chk .

var videopath:String; var flvtime:String; var vidPlaying:Boolean = false; var audio_sound:Sound = new Sound(vflvPlayback);

videopath = "/public/ANS/test/flash/Price_video.flv";

flvtime = ":00/:17"; time_txt.text = flvtime;

endClip_mc.moreabout_btn.enabled = false; endClip_mc.send_btn.enabled = false; endClip_mc.replay_btn.enabled = false;

import mx.video.*; vflvPlayback.contentPath = videopath; vflvPlayback.stopButton = my_stopbttn; vflvPlayback.playPauseButton = my_playbttn; vflvPlayback.seekBar = my_scrubber; vflvPlayback.playheadUpdateInterval = 17; var vid_time:Number; var listenerObject:Object = new Object(); listenerObject.playheadUpdate = function(eventObject:Object):Void { if (eventObject.playheadTime == undefined || vflvPlayback.totalTime == undefined || vflvPlayback.totalTime == 0) { return; } vid_time = Math.floor(eventObject.playheadTime); vid_mins = Math.floor(vid_time/60); vid_secs = Math.floor(vid_time%60); if (vid_secs<10) { vid_secs = "0"+vid_secs; } if (vid_mins<10) { vid_mins = "0"+vid_mins; } time_txt.text = ":"+vid_secs+"/:17"; var percentPlayed:Number = eventObject.playheadTime/vflvPlayback.totalTime*100;

if (percentPlayed>=2) {
 this.placeHolder._visible = false;
}


vflvPlayback.complete = function(eventObject:Object):Void  {

 vidComplete();
};

bar_mc._xscale = (vflvPlayback.totalTime == undefined || isNaN(percentPlayed)) ? 0 : percentPlayed;

};

vflvPlayback.addEventListener("playheadUpdate",listenerObject);

function vidComplete():Void { this.attachMovie("gfxFlash","flashFade",1000,{_x:-2, _y:10.5}); }

should be in the question, am putting it there.
Stu Thompson