Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Multiple archive playback not working

Avatar

Level 2

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

22 Replies

Avatar

Level 3

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,onTotalTimeChange);

_archiveManager.addEventListener(ArchiveEvent.CURRENT_TIME_CHANGE,onCurrentTimeChange);

_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

Avatar

Level 2

Hi,

It works little bit. Playback speed is not satisfactory. Is there any way to restrict protocol for playback auth?

Regards,

John

Avatar

Level 4

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"

"PLAYBACK #2"

Alex G.

Avatar

Level 4

Hi Alex,

Thanks for reporting the issue. Let me look into it and update you as soon as I have something.

Thanks,

Nikola

Avatar

Level 4

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:

and

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.

Avatar

Level 4

Any luck getting play + replay working ?

Seems the approach you guys are taking is "login()" + "seek()" which works to start playback, yet if you seek() again to any point on the timeline, the audio doesn't play.

Avatar

Former Community Member

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

Avatar

Level 4

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

  c) In order to make this work with ConnectSessionContainer you'll also need to add "connectSessionContainer.validateDisplayList()" after "topLevel.createComponentsFromDescriptors(true);"

Alex G.

Avatar

Former Community Member

Hi Alex,

I haven't experienced any problems with Audio seek - could you send the

simplest app you can which reproduces this issue? I'd be pretty interested

in checking it out.

If you're not switching between archives, do you still encounter this

issue?

nigel

Avatar

Level 4

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

and Playback.mxml

I'll try to attach the whole project as well....if I can find the 'attachment' button haha

Avatar

Level 4

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:

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???

Avatar

Former Community Member

Hi Alex,

Interesting - this is super-helpful research. As you switch from one

archive to another, could you close() the audioSubscriber and then subscribe

when you switch? This should solve your issue.

nigel

Avatar

Level 4

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:

to

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?

Avatar

Level 4

I found this the closest to working aside from getting the RTEs from time to time:

The RTEs are still the same ( as described in more detail earlier in this post ):

Avatar

Former Community Member

I see - if you're not switching from archive to archive, putting these

details in a new thread might help prevent confusion =).

Still, all that you're posting is very helpful, so thanks again. We're

looking into the issue, including the RTE, which I can repro on occasion.

nigel

Avatar

Level 4

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

Avatar

Former Community Member

Yeah, this is a weird one, since I've seen the RTE, but not the audio

issue. But the code you pointed out here is a big help - we'll be digging in

deeper over the next week.

thanks

nigel

Avatar

Level 4

any progress on this? i'm also trying to do playbackback of multiple archives within the same application and running into similar issues.  before i forge ahead i just want to know if this has already been solved. 

Avatar

Level 4

I think things have been working well since LCCS 2.0.0. I haven't seen the RTEs and after LCCS 1.5.0 I haven't seen problems with multi-archive playback. I haven't tested this in 2.1.0.

Try it out and let us know what you find

Avatar

Level 4

so what's the process for playing back a second archive?  do you need to .close() all of your pods/subscribers, then close() the ConnectSession, then reset the archiveID in archiveManager and login to the ConnectSession again?