0

我在播放 FLV 文件时遇到问题,当我将它放在服务器上时,它 id 嵌入到我的 swf 中,swf 可以正确播放但 FLV 不能播放

任何解决方案都将受到高度赞赏。


感谢所有回复,它现在可以在除 IE 6 之外的所有浏览器中使用,

我将把 flv 的代码粘贴到 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});
}
4

3 回答 3

1

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.

于 2008-10-28T21:50:06.717 回答
0

“阿帕奇 5.5”?Apache httpd 仅适用于 2.x,所以我们可以假设您的意思是 Apache Tomcat 5.5?或者??? 需要更多信息。 如果可以的话,甚至可能是一个链接。Flash 播放器非常适合通过 HTTP 播放有效的 FLV 视频文件,即使是错误的 mime 类型标头。

于 2008-10-28T07:02:10.567 回答
0

在 IIS 中,您需要将 .flv 扩展名添加到已知的 mime 类型,否则文件将被阻止。也许Tomcat需要类似的东西。

FLV mime = '视频/x-flv'

于 2008-10-28T09:07:58.097 回答