[Inquiry] Modifying Code to Support AudioPlayerControl in R2

Dear Milestone Technical Support Team,

I am currently working with the Milestone VideoOS platform, and I’ve noticed a change related to the

AudioPlayer class between the 2023 R2 and R3 versions.

[In R3, a new AudioPlayer class was introduced, which exposes the same functionality as the old

AudioPlayerControl, but without requiring a user interface (UI), and it can be used in both Smart Client and standalone environments.]

I have developed my code using the AudioPlayer class, which is based on R3. However, I would like to know how to modify my code to make it compatible with the R2 version.

I assume that in R2, I should still use AudioPlayerControl. Could you please provide guidance on how to adjust my code for R2, and what changes or alternatives need to be made to support the previous version?

In the following code, I believe it might not be as simple as just changing AudioPlayer to AudioPlayerControl.

Could you provide more detailed advice?

private AudioPlayer _audioPlayer;

public class()

{

_audioPlayer = new AudioPlayer();

_audioPlayer.ConnectResponseEvent += new ConnectResponseEventHandler(_audioPlayer_connectResponseEvent);

//…

}

I would greatly appreciate any help or clarification regarding this issue.

Thank you for your time and assistance.

All the samples that use AudioPlayer will if you take the 2023R2 version of the same sample use AudioPlayerControl.

I suggest you have a look at an old sample for guidance.

Maybe you have used a sample for inspiration when you started developing your application. As an example: If your application resembles the ImageViewerClient sample try to explore also the older version of that sample.

This forum thread includes an answer (with many images) guiding how to find an older version of the samples: https://developer.milestonesys.com/s/question/0D5bH00000SExBTSA1/exception-source-method-geticon

Thank you for the detailed response. I didn’t know there were sample sources for different versions. I’ll check the link you provided. Thanks again :slight_smile: