@@ -44,11 +44,12 @@ public void testYouTubePublish() throws InterruptedException {
4444 String youtubeHost = "a.rtmp.youtube.com" ;
4545 int youtubePort = 1935 ;
4646 String youtubeApp = "live2" ;
47- final String youtubePublishName = System .getProperty ("youtube.streamname" );
48- if (youtubePublishName == null ) {
49- log .info ("You forgot to set a 'youtube.streamname' system property" );
50- return ;
51- }
47+ final String youtubePublishName = "dybx-y3ph-uqzx-30vx" ; //System.getProperty("youtube.streamname");
48+ log .info ("youtubePublishName: {}" , youtubePublishName );
49+ // if (youtubePublishName == null) {
50+ // log.info("You forgot to set a 'youtube.streamname' system property");
51+ // return;
52+ // }
5253
5354 final RTMPClient client = new RTMPClient ();
5455 client .setConnectionClosedHandler (new Runnable () {
@@ -66,13 +67,13 @@ public void handleException(Throwable throwable) {
6667 client .setStreamEventDispatcher (new IEventDispatcher () {
6768 @ Override
6869 public void dispatchEvent (IEvent event ) {
69- log .info ("ClientStream.dispachEvent() {}" , event );
70+ log .info ("ClientStream.dispachEvent: {}" , event );
7071 }
7172 });
7273 final INetStreamEventHandler netStreamEventHandler = new INetStreamEventHandler () {
7374 @ Override
7475 public void onStreamEvent (Notify notify ) {
75- log .info ("ClientStream.dispachEvent() {}" , notify );
76+ log .info ("ClientStream.onStreamEvent: {}" , notify );
7677 }
7778 };
7879 client .setStreamEventHandler (netStreamEventHandler );
@@ -91,7 +92,7 @@ public void resultReceived(IPendingServiceCall call) {
9192 client .createStream (new IPendingServiceCallback () {
9293 @ Override
9394 public void resultReceived (IPendingServiceCall call ) {
94- int streamId = (Integer ) call .getResult ();
95+ double streamId = (Double ) call .getResult ();
9596 // live buffer 0.5s
9697 @ SuppressWarnings ("unused" )
9798 RTMPConnection conn = (RTMPConnection ) Red5 .getConnectionLocal ();
0 commit comments