# Flv playback jumping in firefox

**URL:** <https://forum.kirupa.com/t/flv-playback-jumping-in-firefox/225767>\
**Category:** Uncategorized\
**Created:** [May 15, 2007, 3:07pm UTC](https://forum.kirupa.com/t/flv-playback-jumping-in-firefox/225767 "2007-05-15T15:07:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaponnel](https://avatars.discourse-cdn.com/v4/letter/c/a6a055/32.png) [@chaponnel](https://forum.kirupa.com/u/chaponnel)\
**Post date:** [May 15, 2007, 3:07pm UTC](https://forum.kirupa.com/t/flv-playback-jumping-in-firefox/225767/1 "2007-05-15T15:07:32Z")

</div>

hi everyone!

i have built an flv video player in flash 8 which is working perfectly in safari and internet explorer. in firefox, however, it is playing the clip immediately whilst still buffering with very distorted sound. then its jumping back to the beginning repeatedly. here is a relevant code sample, if anyone can help me i’ll be eternally grateful, its making me CRAZY!!!

var nc:NetConnection = new NetConnection();  
nc.connect(null);  
var my\_ns:NetStream;  
var my\_ns:NetStream = new NetStream(nc);  
my\_ns.setBufferTime(10);  
my\_ns.onStatus = function(info) {  
if (info.code == “NetStream.Buffer.Full”) {  
bufferClip.\_visible = false;  
}  
if (info.code == “NetStream.Buffer.Empty”) {  
bufferClip.\_visible = true;  
}  
if (info.code == “NetStream.Play.Stop”) {  
my\_ns.seek(0);  
}  
};  
this.createEmptyMovieClip(“vSound”, this.getNextHighestDepth());  
var sound:Sound = new Sound(vSound);  
var listenerObject:Object = new Object();

// the XML Object that will hold the track information  
var videoListXml:XML;

//the callback function triggered by the XML onLoad event  
function loadXML(loaded) {  
if (loaded) {  
loadingText.mediaLoading.traceIt = “media loaded”;  
xmlNodeSongs = this.firstChild.childNodes[1];  
header = [];  
high = [];  
low = [];  
wmv = [];  
total = xmlNodeSongs.childNodes.length;  
for (i=0; i\<total; i++) {  
header\* = xmlNodeSongs.childNodes\*.attributes.title;  
high\* = xmlNodeSongs.childNodes\*.attributes.hi;  
low\* = xmlNodeSongs.childNodes\*.attributes.lo;  
wmv\* = xmlNodeSongs.childNodes\*.attributes.wmv;  
videoMenu(i);  
}  
firstVideo();  
loadingText.mediaLoading.traceIt = “”;  
} else {  
loadingText.mediaLoading.traceIt = “media not loaded!”;  
}  
}  
videoListXml = new XML();  
videoListXml.ignoreWhite = true;  
//specify which function to handle on load event  
videoListXml.onLoad = loadXML;

//the core function

function doPlay() {  
if (\_root.format == “flash”) {  
//we always want to start with a fresh NetStream object,  
//so initialize the environment:  
clearInterval(videoInterval);  
clearInterval(timeInterval);  
my\_ns.stop();  
displayDuration\_txt.text = “”;  
displayPosition\_txt.text = “”;  
theStatus.playingPausing.videoStatus = bufferingStatus  
//initialization is finished; now start from scratch  
theVideo.attachVideo(my\_ns);  
if (\_root.bandwidth == “hi”) {  
my\_ns.play(high[p]);  
trace(high[p])  
} else if (\_root.bandwidth == “lo”) {  
my\_ns.play(low[p]);  
}  
nowPlaying = header[p];  
btnPause.\_visible = true;  
btnPlay.\_visible = false;  
vSound.attachAudio(my\_ns);  
volume\_mc.slider\_mc.\_x = (Math.floor((volume\_mc.\_width+20)/2));  
theStatus.playingPausing.videoStatus = playingStatus;  
//create the setInterval functions that display time data  
var videoInterval = setInterval(videoStatus, 100, my\_ns);  
//var timeInterval:Number = setInterval(checkTime, 100, my\_ns);  
my\_ns.onMetaData = function(obj) {  
duration = obj.duration;  
var Dminutes:Number = Math.floor(duration/60);  
var Dseconds = Math.floor(duration%60);  
if (duration\<10) {  
Dseconds = (“0”+duration);  
}  
displayDuration\_txt.text = Dminutes+":"+Dseconds;  
};  
} else if (\_root.format == “wmv”) {  
getURL(“video.php?lang=”+\_root.lang+"&mix=/video/"+wmv[p], “\_blank”)  
muteBtn.\_visible = false;  
maxBtn.\_visible = false;  
btnNext.\_visible = false;  
btnPrevious.\_visible = false;  
loader.\_visible = false;  
volume\_mc.\_visible = false;  
btnPlay.\_visible = false;  
btnPause.\_visible = false;  
theVideo.\_visible= false;  
volumeLabel = “”;  
controlsLabel = “”;  
displayPosition\_txt = “”;  
displayDuration\_txt = “”;  
}  
}  
function firstVideo() {  
p = 0;  
doPlay();
