Adobe Dreamweaver Forums



Last 10 THreads :         Strip EXIF camera data from PSD files? (Last Post : Russell_Proulx@adobeforums.com - Replies : 2 - Views : 3 )           »          CSH Calls for Merged CHM's (Last Post : TrentSnake - Replies : 0 - Views : 1 )           »          Image Replacement (Last Post : WhatNow - Replies : 0 - Views : 1 )           »          Embedding Flash SWF Skin in External Site (Last Post : QADesign - Replies : 0 - Views : 1 )           »          Compatible issue with ie6 (Last Post : zhtjlong - Replies : 0 - Views : 1 )           »          Re: Photoshop CS4 is a disaster (Last Post : Paulo_Skylar@adobeforums.com - Replies : 0 - Views : 1 )           »          Query question/help (Last Post : trojnfn - Replies : 2 - Views : 3 )           »          CS4 Motion Editor issues (Last Post : aaronlyon - Replies : 4 - Views : 9 )           »          Bridge No Longer Rotates Automatically (Last Post : Michael_Palumbo@adobeforums.com - Replies : 1 - Views : 2 )           »          dollarFormat / numberformat problem (Last Post : izdabye - Replies : 0 - Views : 1 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flash > Flashcom
 
Tags:



Reply
  #1 (permalink)  
Old 11-13-2008, 02:16 PM
Iakoop
 
Posts: n/a
Diggs:
Default Problem with increasing stream delay time on client

Hi,
Iam having this problem:
Iam running tv-like app which streams bunch of videos; after last video in row
finishes, app loads new videoloop from xml and starts stream again. When a
client connects, everything works just fine with 1 exception: the clients
stream is slowly increasing delay from source. Ive tried to check
netStream.bufferLength during playing (its set to 3s on the beginning) and i
found out, thats its slowly growing. - after like 5 minutes of playing its
around 30s; my only suggestion is, that client isnt playing video fast
enough... which sounds kinda stupid to me... (ive checked this on many systems
/ networks and iam pretty sure it has nothing to do with processor/network
overload) please, anyone could have solution for this ?Any help would be highly
appreciated.

Thanks,
J.S.

Application code is here:

application.allowDebug = true;

application.onAppStart = function() {
trace("STREAM>>> Application bednaTV stream started");

application.loopArray = new Array();
application.videoIndex = -1;

application.clientStream = Stream.get("tvStream");

loadXml("http://www.bednatv.cz/fetchXml-loop.xml");

application.clientStream.onStatus = function(str) {
switch (str.code) {
case "NetStream.Play.Stop":
loadXml("http://www.bednatv.cz/fetchXml-loop.xml");
break;
case "NetStream.Play.Start":
application.videoIndex++;
trace("STREAM>>> playing video
"+application.loopArray[application.videoIndex][0]+" videoindex=
"+application.videoIndex);
break;
case "NetStream.Play.Reset":
application.videoIndex = -1;
trace("STREAM>>> Stream restarted");
break;
}
//trace(str.code);
}

function setStream(vidArray) {
for (var i=0;i<vidArray.length;i++) {
var repeat=false;
/*if (i==0) {
repeat = true;
} else {
repeat = false;
}*/
application.clientStream.play(vidArray[i][0],0,-1,repeat);
}
}

function loadXml(target2load) {
application.loopArray = new Array();
var xml = new XML();
xml.ignoreWhite = true;
xml.onLoad = function(succes) {
for (var i = 0; i < xml.firstChild.childNodes.length; i++) {
application.loopArray[i] = new Array();

application.loopArray[i].push(xml.firstChild.childNodes[i].attributes.poradp
ath);
application.loopArray[i].push(xml.firstChild.childNodes[i].attributes.id);

application.loopArray[i].push(xml.firstChild.childNodes[i].attributes.desc);


application.loopArray[i].push(xml.firstChild.childNodes[i].attributes.name);
application.loopArray[i].push(xml.firstChild.childNodes[i].attributes.dil);
}
application.videoIndex = -1;
setStream(application.loopArray);
trace("SERVER>>> XML loaded - starting stream");
}
xml.load(target2load);
}

}

application.onConnect = function(clientObj) {
application.acceptConnection(clientObj);
clientObj.call("getPlayedFileInfo",null,applicatio n.setVidInfo());
// trace("CLIENT>>> Client connected: IP="+clientObj.ip+" |
ID="+clientObj.id+" | referrer="+clientObj.referrer);
}

application.onDisconnect = function(clientObj) {
// trace("CLIENT>>> Client disconnected: IP="+clientObj.ip+" |
ID="+clientObj.id);
}

application.setVidInfo = function() {
// trace(application.loopArray[application.videoIndex]);
return
application.loopArray[application.videoIndex].slice(1,application.loopArray[appl
ication.videoIndex].length);
}

Client.prototype.sendVidInfo = function() {
this.call("getPlayedFileInfo",null,application.set VidInfo());
}




Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-20-2008, 02:03 PM
Semon Seos
 
Posts: n/a
Diggs:
Default Re: Problem with increasing stream delay time on client

Problem
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 04:06 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk