| Bill Pickard 2006-01-09, 5:46 pm |
| Hi Stefan,
I built a barebones version to attempt to play video stored on the server.
It contains 2 buttons, 2 textfields and the FLVPlayback component. I have
the required main.asc in the proper place on the server.
<code>
import mx.video.*;
var NC:NetConnection = new NetConnection();
NC.onStatus = function(info) {
status_txt.text = info.code;
};
connect_btn.onPress = function() {
NC.connect("rtmp://XXX.XX.XXX.XXX/ITAVIDEO");
};
function playVideo(videoName) {
if(NC.isConnected){
var CP:String = "rtmp://XXX.XX.XXX.XXX/ITAVIDEO/" +
videoName + ".flv";
flvPB.contentPath = CP;
}
}
play_btn.onPress = function() {
var vidToPlay:String = vid_txt.text;
playVideo(vidToPlay);
};
</code>
Using the FLVPlayback component, this works for the first FLV I specify, but
successive attempts fail.
I get "failed to play aaa.flv; stream not found" in the FlashComm app
inspector.
So I decided to try the MediaPlayBack component instead, this works fine in
the barebones version, but, in my non-barebones app, neither component will
work!
The only difference between the two apps is that in the non-barebones app,
the component is embedded into a movieclip that's dynamically attached to
the stage when the app is initialized and the clip holding the component's
visibility is set to false.
When I play the video in the non-barebones app, I pass the videoname to a
function which sets vid_holder's visibility to true and sets the contentPath
of the component... And I get nothing. These videos are rather small, and
the server is 8 feet to my right.. so it's not a matter of waiting for it to
stream.
In using these components, does it matter whether or not the FLV is recorded
using FlashCom or not?
I'm clued out...
Thanks for everyone's help so far.
Bill
-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Stefan Richter
Sent: Saturday, January 07, 2006 6:55 AM
To: 'FlashComm Mailing List'
Subject: RE: [FlashComm] Dynamically setting FLVPlayback _contentpath
atruntimeusing RTMP
Question:
Do you first play a video (and that works) and then try to play another
(which fails) by updating the contentpath?
Stefan
> -----Original Message-----
> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Bill
> Pickard
> Sent: 06 January 2006 22:36
> To: flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> Subject: [FlashComm] Dynamically setting FLVPlayback _contentpath at
> runtimeusing RTMP
>
> Hi,
>
> Here's the scenario (which is rather simple but I can't seem to find
> any good info on the problem). I hope someone's come across this
> before and can offer some good advice.
>
>
> Using: Flash 8 Professional
> Server: FCS 1.5 (updated)
>
> User connects to FCS.
> User records video.
> User can playback, pause, seek, video after recording, save FLV name
> to Remote Shared Object, playback at a later date.
>
> I have it working fine with my own home-rolled version, but I'd like
> to use the FLVPlayback component for it's seeking and buffering (my
> seek method seems a bit inaccurate).
>
> I've followed the MM docs, installed the main.asc from the sample
> directory (according to the directions in the docs), reloaded my app,
> and tried setting the _contentPath variable to
> "rtmp://123.45.67.89/ITAVIDEO/"+videoName , but I keep getting:
>
> 1000: Unable to make connection to server or to find FLV on server
>
> All of my other apps are working fine, so the problem isn't with the
> server.
> I'm probably just using the wrong syntax, or missing something else
> simple, but it's driving me up the wall.
>
> I've searched the web, posted to MM forums, searched the chattyfig
> archives (found one similar prob that was solved, but that was using
> the mediaPlayback component), tried a variety of paths.. but still to
> no avail.
>
>
> Thanks in advance,
>
> Bill Pickard (bill_pickard[at]sfu.ca)
>
>
>
>
>
>
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
|