microsoftgraph / microsoftgraph/microsoft-graph-comms-samples

InvalidOperationException : MediaPlatform was not initialized

Open
#381 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
253
Forks
275
Avg merge
1d 5h
Merged PRs (30d)
1

Description

  1. We have developed a WPF .Net framework application and created a ‘Call’ button to initiate Microsoft Teams calling:
    Image5

  2. On the click of 'Call' button 'calling' method got called and in this calling method we have used below code to create 'MediaConfig' for 'AppHostedMediaConfig':

AudioSocketSettings audioSockSettings = new AudioSocketSettings            
{                 
CallId = Guid.NewGuid().ToString(),                 
SupportedAudioFormat = AudioFormat.Pcm16K,                 
StreamDirections = StreamDirection.Sendrecv              
};     
AudioSocket audioSock = new AudioSocket(audioSockSettings);     
var mediaConfig = MediaPlatform.CreateMediaConfiguration(audioSock);     
var call = new Call     
{        
MediaConfig = new AppHostedMediaConfig         
{             
Blob = mediaConfig.ToString(Newtonsoft.Json.Formatting.None)         
},     
}
  1. When we use 'StreamDirection.Sendrecv' we are getting below error while applying it to 'AudioSocket':
    Image6

  2. When we use the 'StreamDirection.Sendonly', Then the instance of 'AudioSocket' class is created successfully. But we get below error calling 'MediaPlatform.CreateMediaConfiguration(audioSock)':
    Image7

  3. The package reference being installed in the application are as follow:
    Image8

Both these errors seems to be related with 'Microsoft.Skype.Bot.Media' dll.

Please provide a solution for these exceptions

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WPF .NET Framework calling method and the Microsoft.Skype.Bot.Media package references shown in the issue. Reproduce both AudioSocket configurations, then inspect where MediaPlatform initialization is expected before CreateMediaConfiguration; done means both reported exceptions have a documented, verified resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.