-
-
Notifications
You must be signed in to change notification settings - Fork 985
Stream Property Change Listeners
Paul Gregoire edited this page Apr 12, 2017
·
1 revision
In Red5 1.0.9-M6 and later, you can add a PropertyChangeListener
to a stream (ClientBroadcastStream
or PlaylistSubscriberStream
) to get the state events:
flashStream.addStateChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
log.info("Flash stream {} change: {}", sourceStreamName, evt);
}
});
Events for one publishing session, minus all the other stuff in-between
[INFO] [NioProcessor-18] org.red5.stream.MySourceStream - Flash stream paul change: java.beans.PropertyChangeEvent[propertyName=StreamState; oldValue=UNINIT; newValue=PUBLISHING; propagationId=null; source=org.gregoire.MyStream@769ef7ce]
[INFO] [NioProcessor-18] org.red5.stream.MySourceStream - Flash stream paul change: java.beans.PropertyChangeEvent[propertyName=StreamState; oldValue=PUBLISHING; newValue=STARTED; propagationId=null; source=org.gregoire.MyStream@769ef7ce]
[INFO] [NioProcessor-18] org.red5.stream.MySourceStream - Flash stream paul change: java.beans.PropertyChangeEvent[propertyName=StreamState; oldValue=STARTED; newValue=STOPPED; propagationId=null; source=org.gregoire.MyStream@769ef7ce]
[INFO] [NioProcessor-18] org.red5.stream.MySourceStream - Flash stream paul change: java.beans.PropertyChangeEvent[propertyName=StreamState; oldValue=STOPPED; newValue=CLOSED; propagationId=null; source=org.gregoire.MyStream@769ef7ce]