Copy link to clipboard
Copied
Hello there,
I am using a simple FLVPlayback control in my AS3 document. In that I invoked FLVPlayback's methods like play, seek, and stop. Whenever I use these methods I get "VideoError: 1000: Unable to make connection to server or to find FLV on server" error while publishing the file. If I remove these method call then I am not getting this error.
Note: If I load above published file in another file then I'm not getting this error, however same is not working on LMS.
It will be of great help if someone help me resolve this issue.
Copy link to clipboard
Copied
copy and paste your relevant code and highlight the problematic line of code.
Copy link to clipboard
Copied
Here is my file structure:
- Created movieclip at first frame of main timeline in this movieclip:
- Added FLVPlayback on bottom layer as vPlayer instance name
- Added actions on top frame-
- First frame action is: vPlayer.stop ();
- Second frame actions are: vPlayer.playheadTime = 0; vPlayer.play ();
If I remove all above action then it works well but whenever I include any of the action I get above mentioned error.
If you require any more information, please do let me know.
Copy link to clipboard
Copied
that code must be on your movieclip's timeline. is it?
and, what works well with no code? does you flv play?
Copy link to clipboard
Copied
Yes, it is.
I have added code inside movieclip and mp4 plays when I comments the code that mentioned.
Copy link to clipboard
Copied
just above your code, what does the following show:
trace(vPlayer.name);
trace(vPlayer.source);
Copy link to clipboard
Copied
I added trace that you have mentioned in first frame and here is output:
Player Name :: vPlayer
Player Source :: courseContent/LN_1324634806568/sampleVideo_01.mp4
VideoError: 1000: Unable to make connection to server or to find FLV on server
at fl.video::VideoPlayer/stop()
at fl.video::FLVPlayback/http://www.adobe.com/2007/flash/flvplayback/internal::showFirstStream()
at fl.video::FLVPlayback/http://www.adobe.com/2007/flash/flvplayback/internal::handleVideoEvent()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::setState()
at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::httpNetStatus()
Copy link to clipboard
Copied
that can't be.
did you change the trace() statements in any way?
what is your url and what needs to be done to (try and) play sampleVideo_01.mp4?
Copy link to clipboard
Copied
This is what I added trace as at first frame:
trace ("Player Name :: " + vPlayer.name);
trace ("Player Source :: " + vPlayer.source);
I have placed sample mp4 file at same location where this SWF resides. In this example - "courseContent/LN_1324634806568". For simplicity we can give mp4's file name directly instade of complete path to test this SWF file as standalone.
To play that video I'm playing that movieclip from second frame. I have loader SWF which loads this SWF containing FLVPlayback, and this loader file request to play from file second frame. Whenever loader file loads another SWF, this flvplayback containing SWF file is made invisible and stop at it's first frame.
Copy link to clipboard
Copied
in your first frame, replace:
vPlayer.stop();
with:
if(vPlayer.playing){
vPlayer.stop();
}
Copy link to clipboard
Copied
Thanks.
By adding above mention code at first frame resolves the issue, however I another code on second frame which plays the video. Is there similar way that I need to follow?
Copy link to clipboard
Copied
you don't need anything different in your 2nd frame but you don't need to execute the play() method if your video is already playing so you could use:
if(!vPlayer.playing){
vPlayer.play();
}
p.s. please mark helpful/correct responses.
Copy link to clipboard
Copied
I did that but it is throwing same error.
There is another code on second frame that I mentioned as playheadTime=0. As I mentioned earlier, that is required since the video page can be viewed another time and it should start from begining.
( Second frame actions are: vPlayer.playheadTime = 0; vPlayer.play (); )
Copy link to clipboard
Copied
remove vPlayer.playheadTime=0;
and, if message 9 resolved your problem, mark it as the correct answer.
Copy link to clipboard
Copied
If I remove that statement then how I can start that from begining. What I have observed, it starts from the position where we left if we don't use that statement.
Copy link to clipboard
Copied
it doesn't appear you're getting any help from me so let's see if someone else can help you.