ActionScript 3.0 :: Stale Data In Playing NetStream Objects

Apr 27, 2010

I am reusing a NetStream object to play different live streams.

What annoys me is that even though I start playing another stream name on this same stream object, when it is attached to a new Video object after issuing the "play" call, there is stale data after the previous playback. It's NOT the video object obviously, as I already create a new Video object every time I play another stream name on this NetStream object (Video.clear does not work anyway - known player bug).

I can rectify the situation by "resetting" the NetStream object - creating and setting up a new one for each playback, assigning it to the old reference - essentially transparent to the application. The problem is performance - there is the overhead of creating and setting up a new stream object every time. I wish to avoid such overheads.

I wish there was some form of "clear" call for the NetStream class as well...

View 0 Replies


Similar Posts:


ActionScript 3.0 :: Error: "NetStream.Play.StreamNotFound" While Playing Mp4 File Using NetStream Object?

Jan 7, 2010

I am using NetStream, NetConnection and Video object to play an mp4 file which is hosted over a web server using http.This is an AIR application and the relevant code is pasted below:

var url:String = <some http url>;
connect_nc = new NetConnection();
connect_nc.connect(null);

[code]........

View 0 Replies

ActionScript 2.0 :: Playing FLV From Dynamic URL Using Netstream

Mar 14, 2008

I have a URL that dynamically serves an FLV file or GIF file at different times.

For example, if I put [URL] in my browser, and the server happens to serve an FLV file at that time, the browser will ask me to download the FLV file. If the server happens to serve a GIF file at that time, the browser will display the GIF. Basically [URL] will generate dynamic file content.

In my actionscript I have the following code (assume the video object, netconnection, and other initialization are already done):

netStream.play(http://www.myserver.com/path1/var=somevalue);

When the URL serves an FLV file, the video plays successfully in my flashplayer.

Note that the *actual* FLV file is not specified, only the path that is supposed to contain it. I haven't seen any example of this before, but it works when I try it.

Problem: If the URL happens to serve a GIF, my flashplayer stalls.

Question:

How can I detect that the URL served a GIF? (so that my player can recover) I tried checking if an onStatus event was fired (I'm expecting NetStream.Play.StreamNotFound), but there doesn't seem to be any. It looks like the netstream object did not react to the wrong input.

View 3 Replies

ActionScript 3.0 :: Fetch NetStream Meta Without Playing?

Nov 30, 2011

Is there any way to get a NetStream's meta from FMS other than starting playback?I want duration, framerate, etc. before the movie starts playing.

View 1 Replies

Flash :: NetStream Only Playing When Fully Loaded?

Feb 9, 2012

I've been searching for this for a while, and either my google-fu is weak or there is no easy to find answer yet...

I am using a NetStream to stream a video file from anywhere. The NetStream is NOT connected to any server. Here is the code:

// Create new connection and stream
_netCon = new NetConnection();
_netCon.connect(null);

[Code]....

This basically works, of course, but the video always starts playing only when it is fully loaded. It also passes the metadata only then. But the main reason to use a NetStream is so that you can play a video BEFORE it is fully loaded.

I tried playing around with the bufferTime property, but to no avail. Also made sure that there is no caching involved when loading the video. I always load a "new one" by adding some "?bla=date" value behind the url.

Is it possible that the "real" streaming only works when really connected to a server? Or am I missing something else?

View 3 Replies

Flash :: NetStream FLV Movie Playing Way Too Fast?

Mar 14, 2012

I have this little NetStream movie (which I'm not allowed to show, sorry) set up like this:

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);

[code].....

View 1 Replies

Actionscript 2.0 :: Detecting When A NetStream Has Finished Playing?

Jun 17, 2009

I'm brininging in external .flv's into my swf using the NetStream method, I can't seem to detect when the flv has finished playing so I can reset the buttons in my video playlist.

View 11 Replies

Actionscript 3.0 :: Detect If NetStream Video Is Playing Or Not

Feb 11, 2010

I'm sure this is a simple question, but I just can't crack it. In my video player I want to detect if the current status is playing or paused. But I can't figure out where this info comes from. Is it a property of the ns object?

View 4 Replies

ActionScript 2.0 :: Getting Status Of The NetStream Whether It Is Playing Or Paused Or Stopped?

Jul 22, 2009

how I know the status of the NetStream whether it is playing or paused or stopped

View 7 Replies

Media Server :: Stale Image From Earlier Playback After Close The Stream And Play Another Name

Jul 8, 2010

I don't think there is much to add to the subject. It is a bug, anyhow. Let's say I am playing content from publisher which is displayed in a video. I then close the stream, and issue a play call for content B on this same stream object. If publisher B is slow enough (no new data arrives for a short while), I manage to catch a glimpse of OLD UNRELATED content from publisher A! Why is this, and is there anything I can do about it? By the way Video.clear is broken in Flash Player 10, and that's public knowledge. However, I am not sure the clear method alleviates the problem. Even if you clear the video, the stale data appears afterwards anyway.

View 1 Replies

Flash :: Use One NetStream Object To Feed Two Video Objects Simultaneously?

Oct 27, 2010

I'm trying to attach a single NetStream Object to two separate Video objects instead of pulling redundant streams from the server. The expected behavior would be for both Video's to display the same content. However, it seems that the last video I attach the NetStream to is the only Video that will display the content.Has anyone else run into this? I'd rather not go to the inelegant steps of using BitmapData to clone pixels if I don't have to.

View 2 Replies

Flash - Play A Single NetStream But Show Different Parts Of It On Different Video Objects?

Jan 19, 2011

I have 3D videos encoded with each eye's content side-by-side on each frame. What I want to do is take the left-half and over-lay it on the right-half. (I'll then change with the colors and the overlaying so that someone with blue-cyan 3D glasses can view the video).

I tried to attach a single NetStream to two video objects and offset them, but that only let the stream play on one object.

View 2 Replies

Actionscript 3 :: What Type Of Data Can I Send Via A NetStream?

Oct 27, 2010

I know I can attach audio and video to a NetStream. Apparently, I can also attach text messages although I haven't seen an example (if you know of one, please let me know). I also know that I can record a stream via Flash Media Server. I'm wondering what other types of data - if anything - else I can attach to a NetStream and record?

View 1 Replies

Flex :: Streaming - Access Raw Outgoing NetStream Data In AIR?

Jun 29, 2011

I have a Flex/AIR desktop application that connects a local camera and microphone to a NetStream for delivery to a Flash media server.However, I would also like to archive a copy of the outgoing stream locally on the filesystem. Is there any access to the actual bytestream of a NetStream object (even in the dreaded mx.internal namespace) that I could turn around and feed to a FileStream for the local archive?

View 1 Replies

ActionScript 3.0 :: Attach Only Simple Object Data Type To Netstream

Aug 18, 2009

I want to attached simple object data type which is holding string to netstream object. i dont want to attached any audio video data. only simple text data want to add in netstream obj.

View 0 Replies

Flex :: Playing A Large/long H264 File With NetStream Takes A LONG Time To Begin Playback?

Aug 1, 2010

I'm trying to play a 10 minute long video (h264/mp4) which is 39MB in size, after I call stream.play(fileURL) it doesn't start playback until its loaded around 12-16MB of the file (many many seconds later), I finally get onMetaData at this point too. Why doesn't it begin playback right away, or at least w/in a couple seconds? What can cause this bloated lead in time?

View 2 Replies

Flash :: NetStream.Buffer.Full Not Fired After Call To NetStream.pause?

Jul 6, 2011

I'm making a small video players in AS3, and I've found that after calling NetStream.pause() or NetStream.togglePause(), no status messages are being fired any more.If I click the "pause" button while the video is buffering, I never get the Buffer.Full message.Here is some code:

_connection = new NetConnection();
_connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
_connection.connect(null);[code].....

View 1 Replies

ActionScript 3.0 :: Error On BitMapData.draw() After NetStream.pause() Then NetStream.seek()

Feb 25, 2010

I am working on an app that will take a snapshot of an rtmp stream of an archived video, save it to a file, and ExternalInterface the file name to the hosting page to javascript it up for display.

I actually have all pieces working great. The only time an error is thrown is when I pause the video, seek to somewhere, and then try to take a snapshot. Then there is a runtime error of:
SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: mySwf.swf cannot access rtmp://myFlashServer/myApp. No policy files granted access.I've seen post after post of suggestions and have tried them, but without success.

I have the crossdomain.xml and my FlashMediaServer security setup fine (it is actually working, except for this one glitch). It just seems to be the pause-then-seek-then-BitMapData.draw() combination which is creating issues.

Another weird thing: after the error is thrown, if I resume the stream and take a snapshot, it works flawlessly again.

View 5 Replies

ActionScript 1/2 :: Sound Objects In Loaded Swfs Not Playing?

Jun 1, 2009

I'm working in ActionScript 2.  I have a series of swfs with Sound objects.  Works just fine when I play the swf.  However, when I load them into a loader, no sound. 

View 3 Replies

Flash :: Test My Android App For Playing Objects In WebView?

Mar 23, 2012

I need to test my Android app for playing flash objects in the WebView.

At first I didn't need to test it on the emulator since I have an actual device (Android 2.3.7) but since users have been reporting issues about the app on Android 4.0 (Ice Cream Sandwich), I want to test it now in the emulator.[code]...

View 1 Replies

ActionScript 2.0 :: Sound Objects In Loaded Swfs Not Playing?

Jun 1, 2009

I'm working in ActionScript 2. I have a series of swfs with Sound objects. Works just fine when I play the swf. However, when I load them into a loader, no sound.

View 3 Replies

ActionScript 3.0 :: Playing Video With Alpha Channel - Objects Behind Clickable

Jul 30, 2011

I have a Video object which plays a video with an alpha channel. There are objects behind the Video object which I'd like to allow the user to interact with, so if someone mouses over the playing video nothing happens but if they mouse over objects in the background, something happens. Is this possible?

View 3 Replies

ActionScript 2.0 :: Music Player - Create Four Different Sound Objects Since Later Songs Are Loading While The First Are Playing?

Apr 21, 2004

I've been messing with this for almost six hours now and am at the end of my wits. I need a flash mp3 player that follows the following guidelines:

*all encased within its own movie clip
*loads four different songs, one after the other (event)
*each song displays its own loader
*user scrolls through song selection and plays available (loaded) ones
*first song plays when loaded and continues to the others

any tips on where to go with this? do I create four different sound objects since later songs are loading while the first are playing?

View 5 Replies

Actionscript 3 :: NetStream.info, Getting Error #2154 "The NetStream Object Is Invalid"

Mar 20, 2012

In my application I have a video playing from a NetStream. Every second on timer I update a text label with statistics like stream.info.currentBytesPerSecond. The problem occurs when the NetConnection associated with this NetStream closes: the getter for stream.info throws

[Code]...

View 1 Replies

Data Integration :: Playing FLV Files From VB.NET

May 13, 2007

I am developing a VB.NET Windows application that plays SWF and FLV files in popup windows.

The user presses a button on the main application form, a window pops up, and the Flash media will then play (in theory).

I was successful in getting SWF files to play. First, I added the Shockwave Flash Object AciveX control to my toolbox (VB.NET named it AxShockwaveFlash1), and then double clicked it to add it to my popup form. Then, in the startup routine for my popup, I added the following lines to play my SWF:

AxShockwaveFlash1.Movie = "path/filename.swf"
AxShockwaveFlash1.Play()

I attempted exactly the same approach using a separate form for an FLV file, this time of course setting the Movie property of the Shockwave Flash Object to "path/filename.flv". In this case, the FLV file did not play. There were no error messages, but just a popup screen with nothing on it.

View 7 Replies

ActionScript 3.0 :: Playing Music From Xml Data?

May 1, 2011

I am creating a Flash app that searches xml for music data such as track, artist and file location of the mp3. The results are returned as a radial tree visualisation.
 
I am attempting to create a functionality where each node in the tree, is clickable and this will play the track. At the moment when i click, it seems to play all the tracks at the same time and crashes. I think this is because of the node event listener -
 
[CODE]
newNodeSprite.addEventListener(MouseEvent.CLICK, playMusic);
[/CODE]

[Code].....

View 5 Replies

ActionScript 3.0 :: Playing Music From XML Data

Apr 30, 2011

I am creating a Flash app that searches xml for music data such as track, artist and file location of the mp3. The results are returned as a radial tree visualisation. I am attempting to create a functionality where each node in the tree, is clickable and this will play the track. At the moment when i click, it seems to play all the tracks at the same time and crashes. I think this is because of the node event listener -
ActionScript Code:
newNodeSprite.addEventListener(MouseEvent.CLICK, playMusic);

View 0 Replies

ActionScript 3.0 :: Getting The FFT Data From A Non-playing Soundfile?

Feb 1, 2009

I'm desperately searching for a way to get the frequencys of a soundfile without having to play it.I was shocked to see that the computespectrum method only processes real-time sound.I made some research and came across this. Ok so now I'd have the array of the amplitudes.Next step would be to make the Fast Fourier Transformation.

What I tried so far :

- Load external C++ dll. With fftw and SwfStudio. I failed at understanding how to create an SwfStudio Plugin or even to understand how to implement that software in my actionscript code.

- Try to Transform the C++ code to actionscript. Well, this guy could do it. He has exactly what I'm desperatly trying to do. If he'd ever release his source but I failed at understanding how the transformation process works.

- Letting Java do the work and then read the Data from an external swf.Ok, this could've worked if I could only use Actionscript 2. It seems that AS3 can't read variables from imported AS2 swfs.

View 3 Replies

Flash :: Data Integration - Playing In Dreamweaver

Dec 4, 2006

I want to include a 'welcome' flash movie onto the homepage of my site, but I just want it to play once and then disappear. Do i do this through flash or dreamweaver? and if so how?

View 1 Replies

Professional :: Adding Data To XML Objects?

Dec 20, 2010

how to add completely new data to XML data I'm holding in a var.
 
I'm importing XML data into an editor I'm creating.  The XML looks like this:
 
<itemList_120>
<mediaFile order="1" playTime='2' transIn='1' transOut='9'>gif.gif</mediaFile>  <mediaFile order="2" playTime='1' transIn='6' transOut='8'>jpg.jpg</mediaFile>

[Code]....

Rather than change existing XML data, how do I add completely new data?  ie, if the above var held two "mediaFile" lines of XML, how do I add or insert a third?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved