Oceanor
05-21-2009, 10:01 AM
Hi all, i'm Oceanor and i'm visiting this forum from some weeks..
I'm italian and not so good in writing in english :D
My problem is this: I have a nokia E63 that supports Flash RTMP Streaming if it's in a swf player. So i decided to download abode flash suite and to make a swf with a video-object. I want to attach my rtmp stream source in this object, but the actionscript that i've prepared always fail.:(
I tried with a simple .flv and works, but with rtmp it doesn't seems to work..
Here's my actionscript source to open the FLV file
my video-object is called video_obj
fscommand2("SetSoftKeys", "", "Exit");
// Qualità Alta
fscommand2("SetQuality", "high");
// Modalità FullScreen Attivata
fscommand2("Fullscreen", "true");
// Percorso file flv
var videos:String = "http://blablablablablabla/file.flv";
// NetConnection
var nc:NetConnection;
// Flusso stream
var ns:NetStream;
// SOFTKEYS
var tmpObj:Object = {};
tmpObj.onKeyDown = function():Void {
switch(Key.getCode())
{
// SOFT KEY SINISTRA
// == > Play Video
case ExtendedKey.SOFT1:
playVideo(videos);
break;
// SOFT KEY DESTRA
// == > Chiudi l'applicazione
case ExtendedKey.SOFT2:
fscommand2("Quit");
break;
}
};
Key.addListener(tmpObj);
function playVideo(file:String):Void {
// Nuova connessione
if (!nc)
{
nc = new NetConnection();
nc.connect(null);
}
// Nuovo flusso Stream
if (!ns)
ns = new NetStream(nc);
// Attacchiamo il video flv sull'oggetto video
video_obj.attachVideo(ns);
// Play File
ns.play(file);
}
stop();
And this works.. but how can i do to stream a RTMP video source?
The path of RTMP is this:
http://video.antennasicilia.it/player/MOLplayer/player.swf?streamer=rtmp://live.lasiciliaweb.it/live&file=antenna_sicilia
I think the rtmp source is rtmp://live.lasiciliaweb.it/live and the file to play is antenna_sicilia.flv, but i can't fine the flv file at all. My actionscript source is this (this is more simple just to start to stream opening the SFW and to not have to press the left softkey):
var video:Video;
var ns:NetStream;
var nc:NetConnection = new NetConnection();
nc.objectEncoding = ObjectEncoding.AMF0;
nc.onStatus = function(info:Object):Void {
startStreaming();
}
function startStreaming() {
ns = new NetStream(nc);
ns.setBufferTime(2);
video_obj.attachVideo(ns);
ns.play("antenna_sicilia");
}
nc.connect("rtmp://live.lasiciliaweb.it/live");
Why this doesn't work for me? :confused:
I've tried sniffers to find the FLV extension, nothing.
Sorry for the lenght of my first post, usually I prefer to find solutions myself reading forums and googling, but after 4 weeks dueling with this actionscript I'm very angry :rolleyes:
I'm italian and not so good in writing in english :D
My problem is this: I have a nokia E63 that supports Flash RTMP Streaming if it's in a swf player. So i decided to download abode flash suite and to make a swf with a video-object. I want to attach my rtmp stream source in this object, but the actionscript that i've prepared always fail.:(
I tried with a simple .flv and works, but with rtmp it doesn't seems to work..
Here's my actionscript source to open the FLV file
my video-object is called video_obj
fscommand2("SetSoftKeys", "", "Exit");
// Qualità Alta
fscommand2("SetQuality", "high");
// Modalità FullScreen Attivata
fscommand2("Fullscreen", "true");
// Percorso file flv
var videos:String = "http://blablablablablabla/file.flv";
// NetConnection
var nc:NetConnection;
// Flusso stream
var ns:NetStream;
// SOFTKEYS
var tmpObj:Object = {};
tmpObj.onKeyDown = function():Void {
switch(Key.getCode())
{
// SOFT KEY SINISTRA
// == > Play Video
case ExtendedKey.SOFT1:
playVideo(videos);
break;
// SOFT KEY DESTRA
// == > Chiudi l'applicazione
case ExtendedKey.SOFT2:
fscommand2("Quit");
break;
}
};
Key.addListener(tmpObj);
function playVideo(file:String):Void {
// Nuova connessione
if (!nc)
{
nc = new NetConnection();
nc.connect(null);
}
// Nuovo flusso Stream
if (!ns)
ns = new NetStream(nc);
// Attacchiamo il video flv sull'oggetto video
video_obj.attachVideo(ns);
// Play File
ns.play(file);
}
stop();
And this works.. but how can i do to stream a RTMP video source?
The path of RTMP is this:
http://video.antennasicilia.it/player/MOLplayer/player.swf?streamer=rtmp://live.lasiciliaweb.it/live&file=antenna_sicilia
I think the rtmp source is rtmp://live.lasiciliaweb.it/live and the file to play is antenna_sicilia.flv, but i can't fine the flv file at all. My actionscript source is this (this is more simple just to start to stream opening the SFW and to not have to press the left softkey):
var video:Video;
var ns:NetStream;
var nc:NetConnection = new NetConnection();
nc.objectEncoding = ObjectEncoding.AMF0;
nc.onStatus = function(info:Object):Void {
startStreaming();
}
function startStreaming() {
ns = new NetStream(nc);
ns.setBufferTime(2);
video_obj.attachVideo(ns);
ns.play("antenna_sicilia");
}
nc.connect("rtmp://live.lasiciliaweb.it/live");
Why this doesn't work for me? :confused:
I've tried sniffers to find the FLV extension, nothing.
Sorry for the lenght of my first post, usually I prefer to find solutions myself reading forums and googling, but after 4 weeks dueling with this actionscript I'm very angry :rolleyes: