Hi,
I'm trying to play multiple archive from my application. After playing 1st archive, I've changed ConnectSessionContainer's archiveID but it won't work. So I've tried to logout session and after dispatching SessionEvent.SYNCHRONIZATION_CHANGE, I'm assigning archiveID to session and login. It works sometimes. Could you please give me any permanent solution for multiple playback.
Regards,
John
Hi John,
I tried to do this recently as well using PlaybackBar.as in the Recording sample app. I did it like this and it seems to work:
In PlaybackBar.as, I added:
public function reset():void
{
_archiveManager = _connectSession.archiveManager ;
_archiveManager.addEventListener(ArchiveEvent.TOTAL_TIME_CHANGE,onTota lTimeChange);
_archiveManager.addEventListener(ArchiveEvent.CURRENT_TIME_CHANGE,onCu rrentTimeChange);
_slider.minimum = 0 ;
_slider.maximum = _archiveManager.totalTime/1000 ;
_slider.labels = [_slider.minimum,uint(_slider.maximum/4),uint(_slider.maximum/2),uint (_slider.maximum*3/4),uint(_slider.maximum)];
_slider.tickInterval = uint(_slider.maximum/4) ;
_slider.value = 0;
_archiveManager.seek(0);
}
In my archive play back code, I added:
container.logout();
container.archiveID = recordingSelection.selectedItem.data;
container.login();
playback.connectSession = container;
playback.reset();
Hope this helps,
Jamie
LCCS v1.5 + F.P. 10.0:
With this code I'm getting a few 2 RTEs in SessinoManagerPlayback[173] @ subscribeCollection(). Audio doesn't re-start, while video and drawings stuff re-plays. Looks like that code is requesting the playback before the whole connection is finished or the "SessionManagerPlayback._dataStreams" are not cleaned up. Any suggestions on what event/process I could wait on to make sure everything is set before re-playing?
Here's my work flow:
1) Load the sampleApp example in a new browser window
2) playback starts and audio and video work fine ( see below "PLAYBACK #1" )
3) I click the "reload" button
4) playback stops, I see the "CONNECTSESSION:LOGOUT" trace
5) playback starts again and I get 2 RTEs ( see below "PLAYBACK #2" )
* NOTE: Audio never starts, but video and all drawn stuff works fine
"PLAYBACK #1"
[SWF] eclipse_workspace_3_5:StudioRecording:bin-debug:Recording.swf - 1,102,418 bytes after decompression
Wed Jun 8 11:18:19 GMT-0400 2011 LCCS SDK Version : 1.5.0 Player Version : MAC 10,2,153,1
11:18:19 GMT-0400 requestInfo https://connect.acrobat.com/<removed by alexg>?glt=g:playback&mode=xml&x=0.1789838057011366
11:18:20 GMT-0400 #TicketService# ticket received: 35hol9j8a4rn
11:18:20 GMT-0400 Getting FMS at https://na2.collaboration.adobelivecycle.com/fms?ticket=<removed by alexg>&playback=<removed by alexg>&proto=rtmfp, attempt #1/3
11:18:20 GMT-0400 result: <fms>
<origin>fms5.acrobat.com</origin>
<proto_ports>rtmfp:1935,rtmps:443</proto_ports>
<retry_attempts>2</retry_attempts>
</fms>
11:18:20 GMT-0400 protocols: [object ProtocolPortPair],[object ProtocolPortPair]
11:18:20 GMT-0400 [attempt 1 of 2] Connecting to 0/1: rtmfp://fms5.acrobat.com/playback/<removed by alexg> #startProtosConnect#
11:18:20 GMT-0400 tempNetStatusHandler 0/2,NetConnection.Connect.Success
11:18:20 GMT-0400 isTunneling? false
11:18:20 GMT-0400 is using RTMPS? false
11:18:20 GMT-0400 #SessionManagerPlayback 1050 fms connected: [Event type="connected" bubbles=false cancelable=false eventPhase=2]
11:18:20 GMT-0400 #SessionManagerPlayback 1051 ======= onConnected: play __PacingStream
11:18:20 GMT-0400 #SessionManagerPlayback 1080 ======= onMetadata: play __StreamOffsets
11:18:20 GMT-0400 #SessionManagerPlayback 1128 ======= receiveStreamOffset test_record_27/simpleNote, 61
11:18:20 GMT-0400 #SessionManagerPlayback 1129 ======= receiveStreamOffset test_record_27/myCamera, 93
11:18:20 GMT-0400 #SessionManagerPlayback 1129 ======= receiveStreamOffset test_record_27/FileManager, 127
11:18:20 GMT-0400 #SessionManagerPlayback 1129 ======= receiveStreamOffset test_record_27/AVManager, 159
11:18:20 GMT-0400 #SessionManagerPlayback 1130 ======= receiveStreamOffset test_record_27/swb, 189
11:18:20 GMT-0400 #SessionManagerPlayback 1132 ======= receiveStreamOffset test_record_27/RoomManager, 220
11:18:20 GMT-0400 #SessionManagerPlayback 1133 ======= receiveStreamOffset test_record_27/UserManager, 250
11:18:20 GMT-0400 #SessionManagerPlayback 1135 ======= receiveStreamOffset test_record_27/883A0A60-0A2A-122A-6B36-6FAC8B3146E7, 277
11:18:20 GMT-0400 #SessionManagerPlayback 1136 ======= receiveStreamOffset test_record_27/C4F0DA53-2E5D-8D42-7FD6-6FAC7B8463FF, 289
11:18:20 GMT-0400 #SessionManagerPlayback 1137 ======= onOffsetStreamPlayStatus
11:18:20 GMT-0400 . [object]
11:18:20 GMT-0400 \\
11:18:20 GMT-0400 .level [string]= status
11:18:20 GMT-0400 .bytes [number]= 1246
11:18:20 GMT-0400 .code [string]= NetStream.Play.Complete
11:18:20 GMT-0400 .duration [number]= 0
11:18:20 GMT-0400 #SessionManagerPlayback 1276 receiveLogin:
11:18:20 GMT-0400 . [object]
11:18:20 GMT-0400 \\
11:18:20 GMT-0400 .descriptor [object]= [object Object]
11:18:20 GMT-0400 RECEIVED LOGIN AT SESSION
11:18:20 GMT-0400 .user descriptor from server [object]
11:18:20 GMT-0400 \\
11:18:20 GMT-0400 .affiliation [number]= 10
11:18:20 GMT-0400 .userID [number]= 0
11:18:25 GMT-0400 #SessionManagerPlayback 6033 ======= subscribeCollection root
11:18:25 GMT-0400 #SessionManagerPlayback 6033 ======= subscribeCollection __RootCollection - play
11:18:25 GMT-0400 #SessionManagerPlayback 6053 ======= subscribeCollection UserManager - play
11:18:25 GMT-0400 #SessionManagerPlayback 6055 ======= subscribeCollection FileManager - play
11:18:25 GMT-0400 #SessionManagerPlayback 6057 ======= subscribeCollection AVManager - play
11:18:25 GMT-0400 #SessionManagerPlayback 6058 ======= subscribeCollection RoomManager - play
11:18:25 GMT-0400 RECEIVENODES UserManager
11:18:25 GMT-0400 receiveAllSynchData UserManager
11:18:25 GMT-0400 RECEIVENODES RoomManager
11:18:25 GMT-0400 receiveAllSynchData RoomManager
11:18:25 GMT-0400 checkManagerSync:[object RoomManager]
11:18:25 GMT-0400 RECEIVENODES AVManager
11:18:25 GMT-0400 receiveAllSynchData AVManager
11:18:25 GMT-0400 checkManagerSync:[object StreamManager]
11:18:25 GMT-0400 RECEIVENODES FileManager
11:18:25 GMT-0400 receiveAllSynchData FileManager
11:18:25 GMT-0400 checkManagerSync:[object FileManager]
11:18:25 GMT-0400 checkManagerSync:[object UserManager]
SeekTime: -277
11:18:25 GMT-0400 #SessionManagerPlayback 6338 seek and play
11:18:25 GMT-0400 #SessionManagerPlayback 6353 ======= subscribeCollection myCamera - play
11:18:26 GMT-0400 #SessionManagerPlayback 6360 ======= subscribeCollection simpleNote - play
11:18:26 GMT-0400 #SessionManagerPlayback 6362 ======= subscribeCollection simpleNote - play
11:18:26 GMT-0400 #SessionManagerPlayback 6416 ======= subscribeCollection swb - play
11:18:26 GMT-0400 RECEIVENODES simpleNote
11:18:26 GMT-0400 receiveAllSynchData simpleNote
11:18:26 GMT-0400 RECEIVENODES myCamera
SeekTime: -289
11:18:26 GMT-0400 #SessionManagerPlayback 6557 seek and play
11:18:26 GMT-0400 receiveAllSynchData myCamera
11:18:26 GMT-0400 RECEIVENODES swb
11:18:26 GMT-0400 receiveAllSynchData swb
we are live--------
11:18:43 GMT-0400 #SessionManagerPlayback 23990 ======= onPlayStatus
11:18:43 GMT-0400 . [object]
11:18:43 GMT-0400 \\
11:18:43 GMT-0400 .level [string]= status
11:18:43 GMT-0400 .bytes [number]= 6198
11:18:43 GMT-0400 .code [string]= NetStream.Play.Complete
11:18:43 GMT-0400 .duration [number]= 8
---11:18:43 GMT-0400 #SessionManagerPlayback 24058 ======= onPlayStatus
11:18:43 GMT-0400 . [object]
11:18:43 GMT-0400 \\
11:18:43 GMT-0400 .level [string]= status
11:18:43 GMT-0400 .bytes [number]= 5344
11:18:43 GMT-0400 .code [string]= NetStream.Play.Complete
11:18:43 GMT-0400 .duration [number]= 0
11:18:43 GMT-0400 #SessionManagerPlayback 24125 ======= onPlayStatus
11:18:43 GMT-0400 . [object]
11:18:43 GMT-0400 \\
11:18:43 GMT-0400 .level [string]= status
11:18:43 GMT-0400 .bytes [number]= 11713
11:18:43 GMT-0400 .code [string]= NetStream.Play.Complete
11:18:43 GMT-0400 .duration [number]= 0
11:18:43 GMT-0400 #SessionManagerPlayback 24131 ======= onPlayStatus
11:18:43 GMT-0400 . [object]
11:18:43 GMT-0400 \\
11:18:43 GMT-0400 .level [string]= status
11:18:43 GMT-0400 .bytes [number]= 4360
11:18:43 GMT-0400 .code [string]= NetStream.Play.Complete
11:18:43 GMT-0400 .duration [number]= 0
11:18:43 GMT-0400 #SessionManagerPlayback 24139 ======= onPlayStatus
11:18:43 GMT-0400 . [object]
--11:18:43 GMT-0400 \\
11:18:43 GMT-0400 .level [string]= status
11:18:43 GMT-0400 .bytes [number]= 976
11:18:43 GMT-0400 .code [string]= NetStream.Play.Complete
11:18:43 GMT-0400 .duration [number]= 0
11:18:43 GMT-0400 #SessionManagerPlayback 24159 ======= onPlayStatus
11:18:43 GMT-0400 . [object]
11:18:43 GMT-0400 \\
11:18:43 GMT-0400 .level [string]= status
11:18:43 GMT-0400 .bytes [number]= 1151
11:18:43 GMT-0400 .code [string]= NetStream.Play.Complete
11:18:43 GMT-0400 .duration [number]= 0
11:18:44 GMT-0400 #SessionManagerPlayback 24441 ======= onPlayStatus
11:18:44 GMT-0400 . [object]
11:18:44 GMT-0400 \\
11:18:44 GMT-0400 .level [string]= status
11:18:44 GMT-0400 .bytes [number]= 232791
11:18:44 GMT-0400 .code [string]= NetStream.Play.Complete
11:18:44 GMT-0400 .duration [number]= 8
11:18:44 GMT-0400 #SessionManagerPlayback 24573 ======= onPlayStatus
11:18:44 GMT-0400 . [object]
11:18:44 GMT-0400 \\
11:18:44 GMT-0400 .level [string]= status
11:18:44 GMT-0400 .bytes [number]= 94362
11:18:44 GMT-0400 .code [string]= NetStream.Play.Complete
11:18:44 GMT-0400 .duration [number]= 8
11:18:44 GMT-0400 #SessionManagerPlayback 24606 ======= onPlayStatus
11:18:44 GMT-0400 . [object]
11:18:44 GMT-0400 \\
11:18:44 GMT-0400 .level [string]= status
11:18:44 GMT-0400 .bytes [number]= 1284
11:18:44 GMT-0400 .code [string]= NetStream.Play.Complete
11:18:44 GMT-0400 .duration [number]= 0
11:18:44 GMT-0400 #SessionManagerPlayback 24623 ======= onPlayStatus
11:18:44 GMT-0400 . [object]
11:18:44 GMT-0400 \\
11:18:44 GMT-0400 .level [string]= status
11:18:44 GMT-0400 .bytes [number]= 1573
11:18:44 GMT-0400 .code [string]= NetStream.Play.Complete
11:18:44 GMT-0400 .duration [number]= 0
---------- we are done
11:18:56 GMT-0400 CONNECTSESSION:LOGOUT
11:18:56 GMT-0400 CONNECTSESSION:LOGOUT
"PLAYBACK #2"
11:19:01 GMT-0400 LCCS SDK Version : 1.5.0 Player Version : MAC 10,2,153,1
11:19:01 GMT-0400 requestInfo https://connect.acrobat.com/<removed by alexg>?glt=g:playback&mode=xml&x=0.204225055873394
11:19:01 GMT-0400 #SessionManagerPlayback 41711 ======= seek 0
11:19:01 GMT-0400 requestInfo https://connect.acrobat.com/<removed by alexg>?glt=g:playback&mode=xml&x=0.24730322184041142
11:19:01 GMT-0400 #SessionManagerPlayback 41712 ======= seek 0
11:19:01 GMT-0400 #SessionManagerPlayback 41842 receiveLogin:
11:19:01 GMT-0400 . [object]
11:19:01 GMT-0400 \\
11:19:01 GMT-0400 .descriptor [object]= [object Object]
11:19:01 GMT-0400 RECEIVED LOGIN AT SESSION
11:19:01 GMT-0400 .user descriptor from server [object]
11:19:01 GMT-0400 \\
11:19:01 GMT-0400 .affiliation [number]= 10
11:19:01 GMT-0400 .userID [number]= 0
11:19:01 GMT-0400 #SessionManagerPlayback 41849 ======= subscribeCollection root
TypeError: Error #2007: Parameter connection must be non-null.
at flash.net::NetStream/ctor()
at flash.net::NetStream()
at com.adobe.rtc.session.managers::SessionManagerPlayback/http://www.adobe.com/2006/connect/cocomo/session/internal::subscribeCo llection()[/Users/alexg/Documents/com.adobe.lccs/libs/player10/src/com/adobe/r tc/session/managers/SessionManagerPlayback.as:137]
at com.adobe.rtc.messaging.manager::MessageManager/subscribe()[/Users/al exg/Documents/com.adobe.lccs/libs/player10/src/com/adobe/rtc/messaging /manager/MessageManager.as:196]
at com.adobe.rtc.session::ConnectSession/onLogin()[/Users/alex/Documents /com.adobe.lccs/libs/player10/src/com/adobe/rtc/session/ConnectSession .as:425]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.adobe.rtc.session.managers::SessionManagerBase/receiveLogin()[/Us ers/alexg/Documents/com.adobe.lccs/libs/player10/src/com/adobe/rtc/ses sion/managers/SessionManagerBase.as:313]
at com.adobe.rtc.session.managers::SessionManagerFMS/receiveLogin()[/Use rs/alexg/Documents/com.adobe.lccs/libs/player10/src/com/adobe/rtc/sess ion/managers/SessionManagerFMS.as:293]
at com.adobe.rtc.session.managers::SessionManagerPlayback/receiveLogin() [/Users/alexg/Documents/com.adobe.lccs/libs/player10/src/com/adobe/rtc /session/managers/SessionManagerPlayback.as:127]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
11:19:04 GMT-0400 #SessionManagerPlayback 44775 receiveLogin:
11:19:04 GMT-0400 . [object]
11:19:04 GMT-0400 \\
TypeError: Error #2007: Parameter connection must be non-null.
11:19:04 GMT-0400 .descriptor [object]= [object Object]
11:19:04 GMT-0400 RECEIVED LOGIN AT SESSION
11:19:04 GMT-0400 .user descriptor from server [object]
11:19:04 GMT-0400 \\
11:19:04 GMT-0400 .affiliation [number]= 10
11:19:04 GMT-0400 .userID [number]= 0
11:19:04 GMT-0400 #SessionManagerPlayback 44782 ======= subscribeCollection root
at flash.net::NetStream/ctor()
at flash.net::NetStream()
at com.adobe.rtc.session.managers::SessionManagerPlayback/http://www.adobe.com/2006/connect/cocomo/session/internal::subscribeCo llection()[/Users/alexg/Documents/com.adobe.lccs/libs/player10/src/com/adobe/r tc/session/managers/SessionManagerPlayback.as:137]
at com.adobe.rtc.messaging.manager::MessageManager/subscribe()[/Users/al exg/Documents/com.adobe.lccs/libs/player10/src/com/adobe/rtc/messaging /manager/MessageManager.as:196]
at com.adobe.rtc.session::ConnectSession/onLogin()[/Users/alexg/Document s/com.adobe.lccs/libs/player10/src/com/adobe/rtc/session/ConnectSessio n.as:425]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.adobe.rtc.session.managers::SessionManagerBase/receiveLogin()[/Us ers/alexg/Documents/com.adobe.lccs/libs/player10/src/com/adobe/rtc/ses sion/managers/SessionManagerBase.as:313]
at com.adobe.rtc.session.managers::SessionManagerFMS/receiveLogin()[/Use rs/alexg/Documents/com.adobe.lccs/libs/player10/src/com/adobe/rtc/sess ion/managers/SessionManagerFMS.as:293]
at com.adobe.rtc.session.managers::SessionManagerPlayback/receiveLogin() [/Users/alexg/Documents/com.adobe.lccs/libs/player10/src/com/adobe/rtc /session/managers/SessionManagerPlayback.as:127]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
11:19:05 GMT-0400 #TicketService# ticket received: 17mhp7hm17ffp
11:19:05 GMT-0400 Getting FMS at https://na2.collaboration.adobelivecycle.com/fms?ticket=17mhp7hm17ffp& playback=test_record_27&proto=rtmfp, attempt #1/3
11:19:05 GMT-0400 result: <fms>
<origin>fms5.acrobat.com</origin>
<proto_ports>rtmfp:1935,rtmps:443</proto_ports>
<retry_attempts>2</retry_attempts>
</fms>
11:19:05 GMT-0400 protocols: [object ProtocolPortPair],[object ProtocolPortPair]
11:19:05 GMT-0400 [attempt 1 of 2] Connecting to 0/1: rtmfp://fms5.acrobat.com/playback/na2-c0798bf5-4164-4a17-978e-8495b10 25a2d/localdevroom5/test_record_27 #startProtosConnect#
11:19:06 GMT-0400 tempNetStatusHandler 0/2,NetConnection.Connect.Success
11:19:06 GMT-0400 isTunneling? false
11:19:06 GMT-0400 is using RTMPS? false
11:19:06 GMT-0400 #SessionManagerPlayback 46443 fms connected: [Event type="connected" bubbles=false cancelable=false eventPhase=2]
11:19:06 GMT-0400 #SessionManagerPlayback 46444 ======= onConnected: play __PacingStream
11:19:06 GMT-0400 #SessionManagerPlayback 46465 ======= onMetadata: play __StreamOffsets
11:19:06 GMT-0400 #SessionManagerPlayback 46491 ======= receiveStreamOffset test_record_27/simpleNote, 61
11:19:06 GMT-0400 #SessionManagerPlayback 46492 ======= receiveStreamOffset test_record_27/myCamera, 93
11:19:06 GMT-0400 #SessionManagerPlayback 46492 ======= receiveStreamOffset test_record_27/FileManager, 127
11:19:06 GMT-0400 #SessionManagerPlayback 46493 ======= receiveStreamOffset test_record_27/AVManager, 159
11:19:06 GMT-0400 #SessionManagerPlayback 46494 ======= receiveStreamOffset test_record_27/swb, 189
11:19:06 GMT-0400 #SessionManagerPlayback 46495 ======= receiveStreamOffset test_record_27/RoomManager, 220
11:19:06 GMT-0400 #SessionManagerPlayback 46497 ======= receiveStreamOffset test_record_27/UserManager, 250
11:19:06 GMT-0400 #SessionManagerPlayback 46498 ======= receiveStreamOffset test_record_27/883A0A60-0A2A-122A-6B36-6FAC8B3146E7, 277
11:19:06 GMT-0400 #SessionManagerPlayback 46498 ======= receiveStreamOffset test_record_27/C4F0DA53-2E5D-8D42-7FD6-6FAC7B8463FF, 289
11:19:06 GMT-0400 #SessionManagerPlayback 46499 ======= onOffsetStreamPlayStatus
11:19:06 GMT-0400 . [object]
11:19:06 GMT-0400 \\
11:19:06 GMT-0400 .level [string]= status
11:19:06 GMT-0400 .bytes [number]= 1246
11:19:06 GMT-0400 .code [string]= NetStream.Play.Complete
11:19:06 GMT-0400 .duration [number]= 0
11:19:06 GMT-0400 #SessionManagerPlayback 46641 receiveLogin:
11:19:06 GMT-0400 . [object]
11:19:06 GMT-0400 \\
11:19:06 GMT-0400 .descriptor [object]= [object Object]
11:19:06 GMT-0400 RECEIVED LOGIN AT SESSION
11:19:06 GMT-0400 .user descriptor from server [object]
11:19:06 GMT-0400 \\
11:19:06 GMT-0400 .affiliation [number]= 10
11:19:06 GMT-0400 .userID [number]= 0
11:19:06 GMT-0400 #SessionManagerPlayback 46651 ======= subscribeCollection root
11:19:06 GMT-0400 #SessionManagerPlayback 46651 ======= subscribeCollection __RootCollection - play
11:19:06 GMT-0400 #SessionManagerPlayback 46664 ======= subscribeCollection UserManager - play
11:19:06 GMT-0400 #SessionManagerPlayback 46664 ======= subscribeCollection FileManager - play
11:19:06 GMT-0400 #SessionManagerPlayback 46664 ======= subscribeCollection AVManager - play
11:19:06 GMT-0400 #SessionManagerPlayback 46666 ======= subscribeCollection RoomManager - play
11:19:06 GMT-0400 RECEIVENODES UserManager
11:19:06 GMT-0400 receiveAllSynchData UserManager
11:19:06 GMT-0400 RECEIVENODES RoomManager
11:19:06 GMT-0400 receiveAllSynchData RoomManager
11:19:06 GMT-0400 checkManagerSync:[object RoomManager]
11:19:06 GMT-0400 RECEIVENODES AVManager
SeekTime: -289
11:19:06 GMT-0400 #SessionManagerPlayback 46705 seek and play
11:19:06 GMT-0400 receiveAllSynchData AVManager
11:19:06 GMT-0400 checkManagerSync:[object StreamManager]
11:19:06 GMT-0400 RECEIVENODES FileManager
11:19:06 GMT-0400 receiveAllSynchData FileManager
11:19:06 GMT-0400 checkManagerSync:[object FileManager]
11:19:06 GMT-0400 checkManagerSync:[object UserManager]
11:19:24 GMT-0400 #SessionManagerPlayback 64531 ======= onPlayStatus
11:19:24 GMT-0400 . [object]
11:19:24 GMT-0400 \\
11:19:24 GMT-0400 .level [string]= status
11:19:24 GMT-0400 .bytes [number]= 232791
11:19:24 GMT-0400 .code [string]= NetStream.Play.Complete
11:19:24 GMT-0400 .duration [number]= 8
11:19:24 GMT-0400 #SessionManagerPlayback 64592 ======= onPlayStatus
11:19:24 GMT-0400 . [object]
11:19:24 GMT-0400 \\
11:19:24 GMT-0400 .level [string]= status
11:19:24 GMT-0400 .bytes [number]= 6198
11:19:24 GMT-0400 .code [string]= NetStream.Play.Complete
11:19:24 GMT-0400 .duration [number]= 7
11:19:24 GMT-0400 #SessionManagerPlayback 64624 ======= onPlayStatus
11:19:24 GMT-0400 . [object]
11:19:24 GMT-0400 \\
11:19:24 GMT-0400 .level [string]= status
11:19:24 GMT-0400 .bytes [number]= 5344
11:19:24 GMT-0400 .code [string]= NetStream.Play.Complete
11:19:24 GMT-0400 .duration [number]= 0
11:19:24 GMT-0400 #SessionManagerPlayback 64691 ======= onPlayStatus
11:19:24 GMT-0400 . [object]
11:19:24 GMT-0400 \\
11:19:24 GMT-0400 .level [string]= status
11:19:24 GMT-0400 .bytes [number]= 4360
11:19:24 GMT-0400 .code [string]= NetStream.Play.Complete
11:19:24 GMT-0400 .duration [number]= 0
11:19:24 GMT-0400 #SessionManagerPlayback 64725 ======= onPlayStatus
11:19:24 GMT-0400 . [object]
11:19:24 GMT-0400 \\
11:19:24 GMT-0400 .level [string]= status
11:19:24 GMT-0400 .bytes [number]= 1151
11:19:24 GMT-0400 .code [string]= NetStream.Play.Complete
11:19:24 GMT-0400 .duration [number]= 0
11:19:24 GMT-0400 #SessionManagerPlayback 64758 ======= onPlayStatus
11:19:24 GMT-0400 . [object]
11:19:24 GMT-0400 \\
11:19:24 GMT-0400 .level [string]= status
11:19:24 GMT-0400 .bytes [number]= 976
11:19:24 GMT-0400 .code [string]= NetStream.Play.Complete
11:19:24 GMT-0400 .duration [number]= 0
Alex G.
Thanks Nikola,
I've been playing around with different types of playback and re-play abilities in the sampleApp. Here's the best solution I've found:
public function reset():void {
_slider.minimum = 0;
_slider.maximum = _archiveManager.totalTime/1000;
_slider.labels = [_slider.minimum, uint(_slider.maximum/4), uint(_slider.maximum/2), uint(_slider.maximum*3/4), uint(_slider.maximum)];
_slider.tickInterval = uint(_slider.maximum/4);
_slider.value = 0;
}
and
private function onPlayRecording28():void {
_archiveID = "test_record_28";
if (cSession) {
cSession.logout();
cSession.close("closing because docs say I need to do this, yet without closing I can still get this example to work....odd");
}
var timer:Timer = new Timer(3000);
timer.addEventListener(TimerEvent.TIMER, onDone);
timer.start();
}
private function onDone(event:TimerEvent):void {
Timer(event.target).stop();
if (cSession) {
//wow what a hack!
playbackBar.reset();
onConnectSessionContainerPreInit();
cSession.archiveManager.currentTime = 0;
cSession.archiveManager.seek(0); // without this code, the 2nd playback will start where 1st video stopped
cSession.archiveManager.pause(true);
//ok lets login and see if we can get both audio and video; normally audio doesn't come back
cSession.login();
// I'm giving the login function a chance to log in and LCCS to bootstrap... I can't find an event to listen to in order to trigger the playback again
var timer:Timer = new Timer(10000);
timer.addEventListener(TimerEvent.TIMER, onReadyToGo);
timer.start();
}
}
private function onReadyToGo(event:TimerEvent):void {
Timer(event.target).stop();
cSession.archiveManager.pause(false);
}
I'm still getting the 2 RTEs I described earlier, but I'm finally getting video playback of 2 different videos without having to reload the whole app.
This is not right way to do replay for sure, so please adivse,
Alex G.
Hi Alex,
Instead of re-using the existing ConnectSession, why not take a componentized approach here? You could put the whole thing, minus the archiveID, in an MXML component which contains a ConnectSessionContainer, the slider, and all other componentry relevant to the recording. You'd pass the archiveID to the component to kick it off. When you want to change recordings, close() the existing component (which should close() the session and all componentry), and then create another instance of that component with the new archiveID.
It shouldn't be much more work than what you're doing today (just some refactoring), but should work more reliably.
In the meantime, we'll look into this, but I'm not sure how high the priority should be if the workflow above does work.
thanks
nigel
Hey Nigel,
1) My primary question is what's the magic sequence of method calls to play audio at any point on the timeline?
ArchiveManager.seek() only works on video and vector objects, audio simply cuts off. Imagine a 24 hour long video/audio that you can't start playing at the 23 hour mark.
2) Your suggestion only answers the the original question was in this thread, which I've gotten working with and without having a top level MXML component. For anyone who's trying to re-play working I suggest the following:
a) Here's a simple example of how to reload all components from scratch ( I welcome corrections
)
b) Flex 4.1 SDK + FP10.0
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
private function onKill():void {
topLevel.removeAllChildren();
}
private function onLoad():void {
topLevel.createComponentsFromDescriptors(true);
}
]]>
</fx:Script>
<mx:VBox>
<mx:HBox>
<mx:Button id="kill" label="kill" click="onKill()"/>
<mx:Button id="load" label="load" click="onLoad()"/>
</mx:HBox>
<mx:VBox id="topLevel" creationPolicy="none" >
<mx:Button label="hey there" />
<mx:ColorPicker width="100" height="150"/>
</mx:VBox>
</mx:VBox>
</s:Application>
c) In order to make this work with ConnectSessionContainer you'll also need to add "connectSessionContainer.validateDisplayList()" after "topLevel.createComponentsFromDescriptors(true);"
Alex G.
Sure, I took the example you guys provide "Recording" and added AudioPublisher and AudioSubscriber in the Recording.mxml and Playback.mxml. During playback, the audio plays fine, until you click anywhere on the PlaybackBar/timeline.
Recording.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:rtc="http://ns.adobe.com/rtc">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<rtc:AdobeHSAuthenticator id="auth" userName="{ourUserName}" password="{ourPassword}" />
</fx:Declarations>
<fx:Script>
<![CDATA[
/**********************************************************
* ADOBE SYSTEMS INCORPORATED
* Copyright 2010 Adobe Systems Incorporated
* All Rights Reserved.
* NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the
* terms of the Adobe license agreement accompanying it.If you have received this file from a
* source other than Adobe, then your use, modification, or distribution of it requires the prior
* written permission of Adobe.
* *********************************/
import com.adobe.rtc.session.managers.SessionManagerPlayback;
import mx.utils.Base64Encoder;
import com.adobe.rtc.core.session_internal ;
import com.adobe.rtc.archive.ArchiveManager ;
[Bindable] public var ourRoomURL:String = "";
[Bindable] public var ourUserName:String = "";
[Bindable] public var ourPassword:String = "";
private function onBtnClick():void
{
cSession.archiveManager.isRecording = record.selected ;
}
private function onAudioPubreationComplete():void {
audioPub.publish();
}
]]>
</fx:Script>
<rtc:ConnectSessionContainer id="cSession" authenticator="{auth}" width="100%" height="100%"
roomURL="{ourRoomURL}" >
<mx:HBox top="10" right="10" left="10" bottom="10" verticalGap="6" horizontalAlign="center">
<mx:VBox width="100%" height="100%" >
<rtc:AudioPublisher id="audioPub" creationComplete="onAudioPubreationComplete()" gain="100"/>
<rtc:AudioSubscriber id="audioSub"/>
<rtc:SharedWhiteBoard id="swb" width="100%" height="100%" />
<rtc:WebCamera id="myCamera" width="200" height="200" />
<rtc:Note id="simpleNote" width="100%" height="100%" />
<mx:Button id="record" label="record" click="onBtnClick()" toggle="true" height="30" />
</mx:VBox>
</mx:HBox>
</rtc:ConnectSessionContainer>
</s:Application>
and Playback.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
xmlns:rtc="http://ns.adobe.com/rtc" xmlns:currentDir="*" >
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<rtc:PlaybackAuthenticator id="auth" />
</fx:Declarations>
<fx:Script>
<![CDATA[
/**********************************************************
* ADOBE SYSTEMS INCORPORATED
* Copyright 2010 Adobe Systems Incorporated
* All Rights Reserved.
* NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the
* terms of the Adobe license agreement accompanying it. If you have received this file from a
* source other than Adobe, then your use, modification, or distribution of it requires the prior
* written permission of Adobe.
* *********************************/
[Bindable] public var ourRoomURL:String = "";
]]>
</fx:Script>
<rtc:ConnectSessionContainer id="cSession" authenticator="{auth}" width="100%" height="100%" roomURL="{ourRoomURL}" >
<mx:HBox top="10" right="10" left="10" bottom="10" verticalGap="6" horizontalAlign="center">
<mx:VBox width="100%" height="100%" >
<rtc:AudioPublisher id="audioPub" gain="100"/>
<rtc:AudioSubscriber id="audioSub"/>
<rtc:SharedWhiteBoard id="swb" width="100%" height="100%" />
<rtc:WebCamera id="myCamera" width="200" height="200" />
<rtc:Note id="simpleNote" width="100%" height="100%" />
<currentDir:PlaybackBar width="100%" height="200" />
</mx:VBox>
</mx:HBox>
</rtc:ConnectSessionContainer>
</s:Application>
I'll try to attach the whole project as well....if I can find the 'attachment' button haha
So I debugged into AudioSubscriber a) on the initial playback b) on the secondary playback ( clicking on the timeline )
A) Initial playback:
AudioSubscriber() > initialize() - which invokes subscribe() > ......etc .... > playSteam(...) line 632:
if ( _netStreamTable[streamDescriptor.id] == null ) {
Since _netStreamTable returns null ( it's a null object at this point ), I'm guessing because we haven't played any streams yet. Thus this block gets executed and when getAndPlayAVStream(); is invoked we add that stream to the _netStreamTable
B) On second playback / when I click anywhere on the playbar:
i) AudioSubscriber.onSynchronizationChange() is invoked and the above mentioned "playStream() line 632 is called again
ii) However this time that block of code doesn't execute sine the _netStreamTable contains the playing stream. I suppose this was done to prevent the same audio stream from playing twice ?
At this point the audio becomes either muted or stops???
Nigel, I'm not switching archives in the sample code I added. It's the most plain example of using audio + video recording.
So I modified PlaybackBar.onChange() from:
private function onChange(p_evt:Event):void
{
_archiveManager.seek(_slider.value*1000);
if ( (_slider.value*1000) < _archiveManager.totalTime ) {
_playPauseBtn.label = "Pause/Stop the Recording" ;
}
}
to
private function onChange(p_evt:Event):void
{
_audioSubscriber.close();
_archiveManager.currentTime = _slider.value*1000;
_archiveManager.seek(_slider.value*1000);
_audioSubscriber.subscribe();
if ( (_slider.value*1000) < _archiveManager.totalTime ) {
_playPauseBtn.label = "Pause/Stop the Recording" ;
}
}
It's unreliable, but the audio stream does playback sometimes and mostly at the right spot. I'm pretty sure I need to wait on some event or a better way to reliably play the audio, should I be listening to some even from audioSubscriber? before seeking/subscribing?
I found this the closest to working aside from getting the RTEs from time to time:
private function onChange(p_evt:Event):void
{
audioSubscriber.close();
_archiveManager.pause(true);
_archiveManager.seek(_slider.value*1000);
_archiveManager.currentTime = _slider.value*1000;
_archiveManager.pause(false);
audioSubscriber.subscribe();
if ( (_slider.value*1000) < _archiveManager.totalTime ) {
_playPauseBtn.label = "Pause/Stop the Recording" ;
}
}
The RTEs are still the same ( as described in more detail earlier in this post ):
0:52:28 GMT-0400 #SessionManagerPlayback 327002 ======= subscribeCollection root
TypeError: Error #2007: Parameter connection must be non-null.
at flash.net::NetStream/ctor()
at flash.net::NetStream()
at com.adobe.rtc.session.managers::SessionManagerPlayback/http://www.adobe.com/2006/connect/cocomo/session/internal::subscribeCo llection()[/Users/agoryuk/Documents/com.adobe.lccs/libs/player10/src/com/adobe /rtc/session/managers/SessionManagerPlayback.as:137]
at com.adobe.rtc.messaging.manager::MessageManager/subscribe()[/Users/ag oryuk/Documents/com.adobe.lccs/libs/player10/src/com/adobe/rtc/messagi ng/manager/MessageManager.as:196]
at com.adobe.rtc.session::ConnectSession/onLogin()[/Users/agoryuk/Docume nts/com.adobe.lccs/libs/player10/src/com/adobe/rtc/session/ConnectSess ion.as:425]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.adobe.rtc.session.managers::SessionManagerBase/receiveLogin()[/Us ers/agoryuk/Documents/com.adobe.lccs/libs/player10/src/com/adobe/rtc/s ession/managers/SessionManagerBase.as:313]
at com.adobe.rtc.session.managers::SessionManagerFMS/receiveLogin()[/Use rs/agoryuk/Documents/com.adobe.lccs/libs/player10/src/com/adobe/rtc/se ssion/managers/SessionManagerFMS.as:293]
at com.adobe.rtc.session.managers::SessionManagerPlayback/receiveLogin() [/Users/agoryuk/Documents/com.adobe.lccs/libs/player10/src/com/adobe/r tc/session/managers/SessionManagerPlayback.as:127]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Sorry Nigel, the two were showing up in either case, but the playback issues were more visible when user would select something on a timeline. I do appreciate your help, I made the assumption that audio would work the same as video instead of trying to cleanup and subscribe myself.
Cool if you guys find out anything, let me know ![]()
Thanks,
Alex
Yup essentially it's:
1) cSession.close()
2) audioSubscriber.close(); // if you have one
3) if you are using the PlaybackBar.as I added/modified and call "playbackBar.reset();"
public function reset():void {
_slider.minimum = 0;
_slider.maximum = _archiveManager.totalTime/1000;
_slider.labels = [_slider.minimum, uint(_slider.maximum/4), uint(_slider.maximum/2), uint(_slider.maximum*3/4), uint(_slider.maximum)];
_slider.tickInterval = uint(_slider.maximum/4);
_slider.value = 0;
}
4) set the archiveID again
5) create a new PlaybackSession and set that on the cSession.authenticator = new PlaybackAuthenticator();
6) audioSubscriber.subscribe();
7) cSession.archiveManager.currentTime = 0;
cSession.archiveManager.seek(0);
cSession.login();
This works for me but you'll definitely have to play around with it yourself, to get a better feel when to set archiveID correctly and when to close()/login() ![]()
Alex G.
North America
Europe, Middle East and Africa
Asia Pacific