From 10dbcc23ee9ea7ca58b5340f690c9ead781cf859 Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Tue, 7 Feb 2017 15:18:04 -0500 Subject: [PATCH] @albertogasparin added FCsubscribe call and proxy type to RTMP video provider Closes #208. Fixes #202. Closes #156. --- CHANGELOG.md | 2 +- src/com/videojs/providers/RTMPVideoProvider.as | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59ac643e..e718240e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ CHANGELOG ========= ## HEAD (Unreleased) -_(none)_ +* @albertogasparin added FCsubscribe call and proxy type to RTMP video provider -------------------- diff --git a/src/com/videojs/providers/RTMPVideoProvider.as b/src/com/videojs/providers/RTMPVideoProvider.as index 10481c1a..5097f34d 100644 --- a/src/com/videojs/providers/RTMPVideoProvider.as +++ b/src/com/videojs/providers/RTMPVideoProvider.as @@ -394,6 +394,7 @@ package com.videojs.providers{ private function initNetConnection():void{ if(_nc == null){ _nc = new NetConnection(); + _nc.proxyType = 'best'; // needed behind firewalls _nc.client = this; _nc.addEventListener(NetStatusEvent.NET_STATUS, onNetConnectionStatus); } @@ -463,6 +464,7 @@ package com.videojs.providers{ switch(e.info.code){ case "NetConnection.Connect.Success": _model.broadcastEventExternally(ExternalEventName.ON_RTMP_CONNECT_SUCCESS); + _nc.call("FCSubscribe", null, _src.streamURL); // try to subscribe initNetStream(); break; case "NetConnection.Connect.Failed": @@ -639,7 +641,7 @@ package com.videojs.providers{ * Called from FMS when subscribing to live streams. */ public function onFCSubscribe(pInfo:Object):void { - // no op for now but needed by NetConnection + initNetStream(); } /**