01-16-2012 09:26 AM
I have a custom live streaming solution. This server send a NetStream.Play.Kick_private_show the the connection close.
Can I detect with the player API the NetConnection.Connect.Closed or something else that I can know when the connection close?
Here the log on Brightcove debugger:
lc0.18840163620188832 (0:1935) NetStream.Play.Kick_private_show 09:14:10 unknown DEBUG MEDIA
lc0.18840163620188832 (0:1935) Closing connection 09:14:10 unknown DEBUG MEDIA
lc0.18840163620188832 (0:1935) NetConnection.Connect.Closed 09:14:10 unknown DEBUG MEDIA
Solved! Go to Solution.
01-19-2012 01:48 PM
You can make use of the Player API to trigger an localized/customized message if the FMS server fails to connect to the player for whatever reason.
When we are unable to load your Player due to various reasons (i.e., invalid ID, deleted player, systems issues, etc) there are various error messages that can be implemented for different scenarios.
Each scenario and error message is shown on the documentation below which describes how to customize the messages themselves:
First, you will want to create an XML file that contains the code snippet in the above doc. Once this file is created and uploaded to your webspace, you can bring the XML in through the Publishing Code Snippet as follows:
<param name="localizedErrorXML" value="http://www.domain.com/localized.xml" />
config["localizedErrorXML"] = "http://www.domain.com/localized.xml";
To further customize the error with your website, you can also change the background color of the BootloaderSWF, by editing the "bgcolor" config parameter so that it matches your background instead of always loading the default #FFFFFF.
You or a developer can also use the Player API to fire off custom related error message based on the event by creating specific event handles in the publishing code as documented in the following article:
All the best~
01-19-2012 02:50 PM - edited 01-19-2012 02:53 PM
The player load the stream successfully (the stream is always available) but the stream send the NetStream.Play.Kick_private_show function and then it disconnect.
So I can't use the templateErrorHandler to target the error. Do you have any other ideas ?
Maybe the FMS server can send a trigger that the player API can retrieve ?
Do you think if the stream disconnect, I can retrieve the error with templateErrorHandler even if im already watching the stream?
01-20-2012 03:33 PM
I did some additional research and when the FMS server registers a NetConnection.Connect.Closed event, it cannot be access by the Player API. Unfortunately, I'm not aware of how this specific implementation can be accomplished.