Flash NetStream.play connection drop

Hello, I'm facing a weird Flash behaviour when either trying to play a non-existent live stream or when playing a live stream and the stream ends. In both cases, the Flash rtmfp connection drops for no reason. I have followed the code for chat/streaming Flex apps. Here is the log I'm getting for 5.2.1374.

17:37:24,937 WARN FlowWriter - API-ASYNC-pool-13-thread-276 FlowWriter closed for FlowConnection flow. The session must be closed here. this: FlowWriter{id=2, flowId=2, closed=true, stage=4, critical=true, nameConnection='NetConnection', session=48}
17:37:24,938 INFO Streams - API-ASYNC-pool-13-thread-276 unsubscribe name: af2/test/mymy/o/__abc4__
17:37:24,938 WARN Peer - API-ASYNC-pool-13-thread-276 Unsubscription client before connection
17:37:24,938 INFO RTMFP-Session - API-ASYNC-pool-13-thread-276 Session 48 died
17:37:24,938 INFO Streams - API-ASYNC-pool-13-thread-276 Stream not found - af2/test/mymy/o/__abc4__
17:37:24,938 ERROR MediaHandler - API-ASYNC-pool-13-thread-276 playStream actualSession doesn't exists, session name af2/test/mymy/o/__abc4__
17:37:24,944 INFO RestClient - API-ASYNC-pool-13-thread-277 content -> {"nodeId":"VMLtOWMk87YuyFYIacGpD2jRLMStK96Q@62.112.9.xxx","appKey":"af2_flash","sessionId":"/109.229.29.xxx:60166/62.112.9.xxx:1935","mediaSessionId":"af2/test/mymy/o/__abc4__31/109.229.29.xxx:60166/62.112.9.xxx:1935","name":"af2/test/mymy/o/__abc4__","published":false,"hasVideo":true,"hasAudio":true,"status":"FAILED","info":"Session does not exist","record":false,"width":0,"height":0,"bitrate":0,"minBitrate":0,"maxBitrate":0,"quality":0,"history":false,"gop":0,"fps":0,"audioBitrate":0,"codecImpl":"","transport":"UDP","cvoExtension":true,"mediaType":"play","audioState":{"muted":false},"videoState":{"muted":false},"mediaProvider":"Flash"}
17:37:24,945 INFO RestClient - API-ASYNC-pool-13-thread-277 RECEIVED REST OBJECT <==

Thanks,
P
 

Max

Administrator
Staff member
Good day.
Adobe Flash is obsoleted and not supported by the most browsers. We do not recommend to use it, in the latest WebSDK builds it is disabled by default and may be enabled only in custom build.
On mobile platforms, we also strongly recommend to use native application instead of AIR.
 

Max

Administrator
Staff member
No, there is no other desktop SDK unless WebSDK in browser.
On desktop, it is more suitable to use ffmpeg based streamer for RTMP publishing or browser for WebRTC publishing.
 
Thanks for an answer. The problem with WebSDK for desktop is that it may run on Win but won't run on Mac due to WebKIT limitations. Also, we are not merely interested in ffmpeg/rtmp streaming - we also need a scripting model to integrate with existing clients, hence we need to receive all sorts of events from WCS.
 

Max

Administrator
Staff member
The problem with WebSDK for desktop is that it may run on Win but won't run on Mac due to WebKIT limitations
Please clarify: what exactly does not work in WebSDK in latest Safari browser? If there is a problem, can it be reproduced in latest WebSDK 2.0.223 examples? You can test it in Safari from our demo server https://demo.flashphoner.com:8444/admin/demo.html#
we also need a scripting model to integrate with existing clients, hence we need to receive all sorts of events from WCS.
Consider to use REST hook /StreamStatusEvent to check a stream status, and send your own events to a client. To check if a stream exists on server use REST API /stream/find before trying to play it from a client.
About RTMFP. It is legacy along with Adobe Flash, and we have no plans to support it. So we recommend to migrate to RTMP and use REST hooks and REST API as supposed above.
 
Last edited:
1. WebSDK is working all good on all browsers regardless what. What I'm referring to is using WebSDK for a desktop app, e.g. Edge WebView2. While this may work fine for Win, it will fail for WebKit on Mac.
2. That's what I'm talking about - what's the point of having an RTMP client on the desktop without any scripting control. That's why we use Flash (still).
3. Rearding /stream/find/. That's correct, we may use it in order to find out if the stream is available before playing it in Flash and bypass a connection drop. The funny thing, however, is that when a stream stops publishing - we get a Flash connection drop again) We will look into a workaround for this.
Thanks,
P
 

Max

Administrator
Staff member
What I'm referring to is using WebSDK for a desktop app, e.g. Edge WebView2. While this may work fine for Win, it will fail for WebKit on Mac.
Electron based aplications are working om MacOS, so you can wrap website to Electron and use it on Win and Mac. Also, PWA (Progressive Web Application) may be used on desktop.
The funny thing, however, is that when a stream stops publishing - we get a Flash connection drop again) We will look into a workaround for this.
REST hook /StreamStatusEvent seems to be a workaround: when stream becomes unpublished ("status":"UNPUBLISHED"), send a signaling message to the playing client. It will know the reason to drop connection in this case.
 
Top