Replies: 1 comment
-
Closed as per the Community Stand-up discussion here: https://youtu.be/N9wMcBP4jtg?t=2889 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
I'm trying to play "different sound effects", basically, using a hidden MediaElement. My current approach assumes I've already declared a named MediaElement in the xaml markup for page (call it "FxPlayer") with PlaybackControls set to hidden, something like:
<toolkit:MediaElement x:Name="FxPlayer" MaximumHeightRequest="1" MaximumWidthRequest="1" ShouldShowPlaybackControls="False" />
And that everything that follows happens in code behind:
Play audio with the mediaelement when it's host page is active, but only in response to a message (using WeakReferenceMessages, say). I need to able to pass either a file or stream to the Source of the existing FxPlayer when a message arrives to the page control. The sound the "FxPlayer" element plays changes depending on the message, which is why I assume a good implementation will let me use MediaSource instances instantiated at runtime and used to set the Source element of the property.
Any help appreciated. I'll post back if I find a solution.
Beta Was this translation helpful? Give feedback.
All reactions