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


Similar Posts:


Flash :: Use BitmapData.draw With NetStream.appendBytes?

Apr 9, 2011

I am using NetStream.appendBytes() to play a local video (no server involved) in Adobe AIR. I would like to use BitmapData.draw() to take a picture of the video output, but I am getting this error:

Error #2123: Security sandbox violation: BitmapData.draw: cannot access null. No policy files granted access.

Here is some sample code:

package
{
import flash.display.Sprite;
import flash.filesystem.File;

[Code].....

This is only sample code use for an explanation. The error would happen when calling the getImage method while the video is playing. The error mentions a policy file not found. Since the file is loaded locally there isn't really a place to put a policy file. Is there a policy setting somewhere that needs to be set or is the BitmapData.draw feature just not available when using appendBytes?

View 5 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 :: Used NetStream.appendBytes() ,but Cannot Call BitmapData.draw()?

Nov 14, 2011

the tips: Error #2123: Security sandbox violation: BitmapData.draw: cannot access null. No policy files granted access.
 
Here is some sample code

[Code]...
 
This is only sample code use for an explanation. The error would happen when calling the getImage method while the video is playing. The error mentions a policy file not found. Since the file is loaded locally there isn't really a place to put a policy file. Is there a policy setting somewhere that needs to be set or is the BitmapData.draw feature just not available when using appendBytes? It is a local flv file,  not an ramp stream from a server.

View 9 Replies

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 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

ActionScript 3.0 :: H.264 .mov And NetStream.seek Not Working?

Apr 6, 2009

When working with MOV files using the h.264 codec and AAC sound I am unable to get netStream.seek to work correctly. No matter what argument I pass to netStream.seek it will always seek to 0. I have this problem on both a legacy as2 and a newer as3 video player I have built. Regular flvs work perfectly on both players.

View 1 Replies

ActionScript 3.0 :: NetStream Seek Based On Previous Flv

Apr 15, 2009

I have a series of movie clips (flv's). All are the same movie clip of a rotating object but it's different colour in each clip.When one clip is playing and I click to play another, I would like the clicked movie clip to start playing from the same position at which the previous clip was at. So if a clip had played for 3 seconds and I click a different clip, I would like it to seek and play from 3 seconds instead of 0.[code]Can anyone tell me how I would go about tracking the data of how many seconds of a clip has played?My guess is that it will either be metadata or NetStatusEvent related.

View 4 Replies

Flash :: Start Or Seek To Sub-second Intervals With NetStream?

Jan 20, 2010

I am working on a Flash Video player and am implementing the ability to start a video at x time within the span of an FLV (served from FMS). I am able to start it x seconds into a stream without any issue using

netStream.play(source, startTime);

but as far as I can tell, it only supports seconds. I am looking to be able to give a start time (or even a seek time if that is supported) in milliseconds, or really anything more precise than whole seconds.

Anyone know of any way to achieve this even by monkey patching the fl classes?

View 1 Replies

ActionScript 3.0 :: When Netstream.time Updated / When Seek?

Feb 17, 2009

The problem is that I have an fla video player that uses the netstream class in order to pull a stream (mp4 h264), I've tried this with a few different mp4 files and they all behave the same..Basically, when I goto seek to a position, say 10 seconds into a 300 second mp4, the movie buffer goes blank and my readout of the current time I can see climbing from around 7 seconds and keeps going all the way to the end.. almost as if the seek command is trying to find a keyframe where it can resume from..I'm using http (not rtmp), and thus streaming directly from naive http.After awhile I decided to use the FLVPlayback component, set the source to the same, and it read in some initial metadata.. when I try the movie with the FLVPlayback component I can pause, seek resume to any position without problem, at first I was thinking the problem might have been http related but if the FLVPlayback component works then I'm a little stuck..Also note that I've checked the seekpoints of the movies and there are TONS of them, so the seek command should be able to find a nearby seekpoint to where I suggest.

View 7 Replies

ActionScript 3.0 :: MOV Files - NetStream.Seek Not Working Correctly

Apr 6, 2009

When working with MOV files using the h.264 codec and AAC sound I am unable to get netStream.seek to work correctly. No matter what argument I pass to netStream.seek it will always seek to 0. I have this problem on both a legacy as2 and a newer as3 video player I have built. Regular flv work perfectly on both players.

View 1 Replies

Flash :: NetStream.seek() For Mp4 To Exact Position Not Keyframe?

Jul 26, 2010

It seems seek() on mp4 file seeks to the closest keyframe (seekpoint). Is it possible to seek to exact position in between of keyframes?

View 2 Replies

Actionscript 3 :: Can't Scrub Through FLV Using Netstream.seek() After FLV Finishes Loading

Oct 27, 2010

I'm trying to play an FLV using the Netstream class - standard stuff, really using nothing more complex than things you can find in the help files. I've created a control panel with a bar you can use to click and drag and scrub through the video.

Exporting to Flash Player 9, it's working fine and I can scrub through the video, but only while the FLV is still loading. As soon as it hits 100% the scrubbing (using Netstream.seek()) becomes incredibly unresponsive, almost to the point of crashing the player.

I've killed all ENTER_FRAMES, removed all unnecessary listeners and nullified everything I can think of but something massively resource-intensive seems to be kicking in as soon as the load finishes.

Has anyone ever seen this? I've never come across this and can't find anything similar across assorted forums.

Code below but I don't think the mouse-move drag actions are the problem! Fine in the Flash CS4 IDE, broken in the browser.

// Drag
private function dragVideo(e:MouseEvent):void {
// Match the x position of the dragger to the x position of the mouse
videoControls.progressBar.dragger.x = videoControls.progressBar.barInner.mouseX;

[Code]......

View 1 Replies

Actionscript 3 :: Netstream.seek() Not Working For MP4 Videos In Flash

Mar 11, 2011

I am implementing a video player in Actionscript and I need to be able to define the starting play time for the videos. Netstream.seek(pos) works for flv files but fails for H.264 files (the player starts playing the video from the beginning). Anyone knows what might be the problem? (I am using Netstream for this instead of adding a parameter with the starting time when I call the Netstream.play method because I don't have Flash Media Server).

View 2 Replies

ActionScript 3.0 :: NetStream.seek() Not Seeking To Start Of Video On Mobile

Nov 4, 2011

I have a "video on demand" video that I'd like to seek at any point of the video. It's playing on a Motorola Xoom tablet. I can seek to the beginning of the video when the playhead is near the beginning. However, if I the playhead is towards the end of the video and I attempt to seek to the beginning of the video, the video seeks many seconds after the start of the video. I thought this might be a buffering issue, so I set inBufferSeek to true, but I still have the same issue.

View 2 Replies

ActionScript 3.0 :: Using BitmapData.draw(stage) - Error #2123 Security Sandbox Violation: BitmapData.draw

Jan 9, 2012

I am having an issue with using BitmapData.draw(stage). I am getting the following error:

SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: file:///C|/Documents%20and%20Settings/bla...bla...bla.swf cannot access null. No policy files granted access. Here is a portion of my code:

var bd:BitmapData = new BitmapData(2800, 2100); bd.draw(stage);//this is where the error happens All of the files referenced (.xml/.jpg/.swf) are located in the same local folder as the main .swf. How do I get around this error? The main objective is to print the stage using PrintJob(). I am using Flash Professional CS5.5 and publishing to Flash 10.0/10.1. Let me know if I need to supply any more info.

View 4 Replies

Media Server :: Netstream.seek - Parameter Gets Updated And Drops Backs After Update

Jun 18, 2010

I am using OSMF v1.0 along with FMS 3.5.3 and flash player 10.1. Whenever i do a seek, lets say to a time 't'. Netstream.time gives me an incorrect result which is more than 1.5*t (varies). So if i seek to 100, i get netstream.time as approx. 160. I also noticed, 'NetStream.info.VideoBufferLength' goes very high (from around 3-4 to 50-60) just before the Netstream.time parameter gets updated and drops backs after update.

View 1 Replies

Flash :: Add BitmapData To A NetStream Publishing To A FMS?

Oct 28, 2011

A webcam feed is published to a Flash Media Server. Now I want the Augmented Reality layer to be a part of this video capture, rendered into one NetStream.

Has anyone done something like adding a watermark to a NetStream before?

View 2 Replies

ActionScript 3.0 :: Optimizing Bitmapdata Using Netstream?

May 29, 2010

you can see my project here:

[URL]

It uses bitmap data to draw each frame of the video, which is streamed using the netstream class. My question is - how can I optimise the speed at which it plays? It plays fine when the stage is small, but when on full screen it starts to get jerky.

View 3 Replies

ActionScript 3.0 :: Pause NetStream Loading?

Dec 21, 2009

i have this (becoming-abnoxious) client, for which i make a video player (using the NetStream class), who came out today requesting that instead of starting to load the video only when the user clicks the 'play button, he want the video to begin downloading as the player loads (before the user clicks the 'play' button), but only the first 10 minutes of video (most of his videos are long, even up to an hour), and after that the loading will pause, and will resume (from the same point of course) after 3:30 minutes if the user doesn't click the 'play' button in the meanwhile.

i told him no-can-do: i can pause the download after (give-or-take) 10 minutes of video were downloaded, but once the downloading resumes it will start from squqre-one (using what has downloaded to the browser's cache). his reply for that was 'i don't take no for an answer, find a way'.before i give him the 'no-can-do' again, is there anybody who think that my client request is doable?

View 1 Replies

ActionScript 2.0 :: NetStream Buffer Pause?

Apr 10, 2007

I have a video file FLV which is dynamically loaded using AS NetStream function.Now I want to stop the buffering of the video after a certain amount of bytes are being loaded. For example, the FLV size is 10mb and I want to PAUSE the buffer after the 2mb of bytes are loaded. During the PAUSE of the buffer, the connection should be ON and I should be able to play the video.Is there any way we can PAUSE the buffer and after certain amount of time, we again can START the buffering process? Say it should again start buffering after 2 minutes.

View 2 Replies

Actionscript 3.0 :: FLV NetStream Pause() Doesn't Work

Apr 30, 2008

I followed lee's tutorial to create my own video player and I'm using AS3 for that. The problem is that for some reason, pause() doesn't work, it will pause the first time I clicked it, but it wouldn't go back and play again. I looked through AS3 books and online, everything tells me that pause() should be able to pause and resume. Another thing is that if I try to use pause(true), an error would appear and tell me that the argument should be no more than zero, and I'm like "why?????" so here's my code, it is basically based on lee's code but in AS3...

[Code]....

View 3 Replies

ActionScript 2.0 :: F8 Play / Pause Clip Not Working With NetStream

Feb 6, 2009

I've got a play/pause movie on my timeline to control an FLV via NetStream. The idea is to switch from a play symbol to a pause symbol, but it's not working.[code]Clicking on the clip will start and stop the flv just fine, but the symbol switch doesn't happen. When I take out the ns code, just to check and see if the switch will actually work, there's no problem.What am I doing wrong? How can I get my clip to change from a play to a pause symbol?

View 1 Replies

Can't Trigger "NetStream.Seek.InvalidTime" Event?

May 13, 2009

I made an interface that laods a FLV video (as far as I know this is progressive download as I'm not using any Flash Media server or whatever).The point is that I added a Button on the stage with the following code:

on (release) { _root.stream_ns.seek(15);  }

I also have a event catcher like this in the main timeline:

stream_ns.onStatus = function(infoObject:Object) {  if (infoObject["code"] == "NetStream.Seek.InvalidTime") {  _root.text_display = "Not loaded yet";  }}

[code].....

View 8 Replies

ActionScript 2.0 :: [CS3] Netstream Play/Pause - Show A Couple Of Short Animations?

Feb 20, 2009

I'm using netstream to show a video in .flv.Over this video I need to show a couple of short animations, and when they play, I need to paus the long video so it doesn't plays in advance in the background.I've got this script to pause the movie:

Code:
btnPlay.onRelease = function () {
ns.pause();
}

But how do I apply it so that when the timeline hits a certain frame, it calls it. I mean, the user can't really know when to stop to see the animations, so it has to be done at a specific time.

Code:
this.onEnterFrame = function(){
ns.pause();
}

Would do it.

View 1 Replies

ActionScript 3.0 :: Function NetStream.pause() Process Incorect When Embed Swf In Webpage

Oct 26, 2008

I use NetStream to play media file. It includes pause, resume functions. When running in the flash player, there isn't any problem. However, when embedding this swf file in web page, there is following problem. - If clicking [pause] button and then (in short period) clicking [resume] button to continue playing, no problem. But, if clicking [resume] button after longer period (bigger than playing file's time), the swf file will start playing at the next media file in the list, NOT at the time that was paused.

I would like to send the source code link: [URL]

i can't test this article [URL] when I pause netstream. it clear buffer. when I resume it rebuffer

View 1 Replies

ActionScript 3.0 :: Youtube Api Draw - Error #2121: Security Sandbox Violation: BitmapData.draw

Jun 30, 2011

I'm making something that requires me to draw() the youtubeplayer Giving me this pretty error:

[Code]...

View 4 Replies

ActionScript 3.0 :: NetStream.Connect.Closed - Know Which NetStream Has Been Closed

Aug 2, 2010

A NetStatusEvent with info.code of "NetStream.Connect.Closed" is dispatched by NetConnection when a NetStream is closed. This seems kind of weird, shouldn't the NetStream dispatch the event? how do I know which NetStream has been closed if I have more than one running (which I do)? I need to know so I can cleanup the now dead stream.

View 1 Replies

Media Server :: Error: Failed To Execute Method (NetStream)

Oct 29, 2010

I've googled this and come up empty. All I am trying to do is create a netstream and assign a group to it like so:
 
var netstream;
var groupSpec;
groupSpec = new GroupSpecifier("foo");
trace("groupSpec: "+ groupSpec);

[Code]...

If I remove the groupSpec optional parameter I successfully connect the NetStream. According to the docs [on this page] I should be able to identify a GroupSpecifier in the NetStream constructor.
 
Is this a bug? Is there another way to do this?

View 8 Replies

ActionScript 3.0 :: Error #1069: Property OnPlayStatus Not Found On Flash.net.NetStream

Jul 24, 2009

i am trying to create an MP3 player using AS3. when i competed my server-side and client-side coding i ran it. MP3 plays not more than 5 seconds and there occures a reference error.(ReferenceError: Error #1069: Property onPlayStatus not found on flash.net.NetStream and there is no default value.). what are the reasons for that errors? can i overcome it?

View 2 Replies







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