[HTML5] Live streaming

Hi guys.

I’m working for a new game with a video player. Our sweet old flash had the NetConnection class and NetStream class for play live streaming.( the old rtmp stream flux ).
Actually, i can’t use the rtmp protocoll for stream and i need to use the rtsp, rtp or http flux.
I’m trying to use the NetConnection class and NetStream class for use one of theese flux, but, when i try to connect to the flux, using the method:

nc.connect( ""http://…);

i receive this error:

“Error: Can only connect in “HTTP streaming” mode”.

What is the problem? There aren’t the functions and methods for live streaming with openfl?

Thanks a lot.

Hello!

NetConnection on the HTML5 target has been tested with MP4 video files hosted on a server or local machine, but I do not think it has specifically been tested with a streaming video server. Is the error message coming from the server?

Hi sing.

The error come from the openfl application. the stream server is up, because for be sure i had test it with the html5 tag video and it work

Have you tried the PlayingVideo sample? Does it work if you replace it with your video?

I just tested PlayVideo example. It plays video with only local assets/video. If video is remote {over http://}, only sound is played.

Can you open developer tools and see if there are any errors? It could be a cross-origin error

When I use -Dcanvas it plays without problem remote location even without CORS header. With WebGL console say even if I have on remote server CORS header:

Error: WebGL warning: texImage2D: Cross-origin elements require CORS. PlayingVideo.js:6575:256
SecurityError: The operation is insecure.it says:

Hmm, perhaps permissions on texImage2D are different than context.drawImage

Well that is mystery for me. I supposed I could set permission on server hosting video by setting CORS header, but this seems to be not true, but setting -Dcanvas lets everything work (except webGl rendering).

Hi guys. Sorry for my response after more time.

I have try the -Dcanvas tag. The stream works. There is only a problem: it’s not fluid.
I’m with openfl 5.0.0 and lime 4.9.1

Have you tried openfl test html5 -Ddom?

Tested and it works, but i can’t use -Ddom for my project, because my graphic elements, from a swf, don’t show good in release.
I’ll try a new solution.
However, the problem is only with live streaming and not with local files.

While looking into my own video issues it seems Romiar had similar issues to mine. I am playing the video from local and can only hear audio but the video is not rendering. Web console does not display any errors.