How to send custom data in Microsoft.Communication.RecordingFileStatusUpdated event of Event Grid - azure-communication-services

I am using Azure communication service APIs to start a Group video/audio call in my Angular / .Net Core application. I am also using the Azure.Communication.CallingServer to record the calls. I use the Azure Event Grid Webhook on the Microsoft.Communication.RecordingFileStatusUpdated event so Azure can notify my API when the Recording is available for download. All this works well and I'm able to download the recording stream.
The issue I'm having is trying to map the recording file to the meeting record in my application database. The event grid Event Subscription is created at design time in Azure and it cannot seem to pass any custom data. When the recording becomes available for download, can Event Grid send me custom data about the recording that I may have previously passed at runtime?

You can persist the call ID and/or recording ID (a part of the StartRecording response) by the time you're starting the recording and then map the RecordingFileStatusUpdated event to those IDs by utilizing the data in the subject.
Check out how this sample uses recordingData to persist the recording status.

Related

Azure Event Hub stard receiving events from specified time

Is there any way to set up event hub that it is starts receiving events (from iot hub) from specified time ? Sometimes I nedd to do little changes in my code and I don't want to do again some actions on data that was send before I deploy my new event hub code. Maybe I should use something different to provide custom logic to my iot hub data, that allow me to do custom logic on received data without doing same code on data that I received beforce deploy my service ?
You haven't specified which API you use, but here are two options:
If you are receiving the events directly with EventHubReceiver, there is a CreateReceiver() method overload which accepts DateTime startingDateTimeUtc, see API reference
If you are using EventProcessorHost, you can specify the initial timestamp offset as part of EventProcessorOptions.InitialOffsetProvider, see docs. I believe the existing checkpoints will override this value, so you'd have to clean up the checkpoints in blob storage while deploying a new version

Sync EventKit events with remote database

I would like to create an app that retrieves events (similar to calendar events) from a remote database and shows them in a View, create, edit and delete new or existing events; currently I’m using EventKit framework to access iOS calendar, I read this docs and tried SimpleEKDemo:
https://developer.apple.com/library/ios/documentation/DataManagement/Conceptual/EventKitProgGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009765
I actually can get events from server through an HTTP POST request (a NSMutableURLRequest) with JSON response and show them in a tableView, when I tap on an event I can edit it, update the remote db entry and if I switch to iOS calendar I see the event (so writing in calendar database is successful);
the most important thing is that all events must be synchronized with remote database, so the core problem occurs when user leaves my app, opens iOS calendar and edits an event previously created through my app: in this case the synch does not occur and the data are inconsistent.
I was thinking at these possible ways:
Is there a way to hook at iOS Calendar so I can perform update in remote db, only for a subset of events?
Or can I create an event only editable through my app?
Maybe do I have to quit EventKit and create a custom calendar with custom update functions?
I read also these questions:
Create a calendar in iOS
How to identify EKEvent uniquely with Sync across the devices
Sync database on ipad with remote database
but I don't know if I'am on the right track.
Any help is appreciated, thank you.
EDIT: with "synchronized" I mean that all data on the app database must be the same as server database
At least today you cannot create a custom protocol provider for the iOS calendar, which I think is what you are asking for (you would like to feed the calendar backend with your JSON-like protocol, or some app extension translating that).
There are three options:
a) keep the remote database in sync using an application
b) write your own calendar UI
c) implement CalDAV on the server side, or in a proxy
It sounds like a) is what you are doing today. You would need to sync the EventKit database when your app starts (to pickup changes done in other EventKit apps like Calendar). Obviously the user needs to start your app once in a while to get the sync going ... (as a hack you might also be able to trigger your app using a push)
Depending on your needs b) is a lot of work and you have zero platform integration.
I think implementing CalDAV in your server, or adding a proxy which translates between your server's JSON and CalDAV is probably the best way to go. You can then just add your server as a CalDAV account to iOS. As a bonus you can use any other client doing CalDAV with your server ...

Live Stream midroll ad injection in Wowza Streaming Engine

I haven't found any way to automate inserting an ad spot into an existing live stream without stopping the streams and/or using a Flash client to interact with Wowza.
The idea is that these ads can be randomly chosen and inserted into the stream programatically & automated.
Can someone please point me in the right direction of how to properly change sources on the fly?
Thanks!
The following articles may be of interest for you
https://www.wowza.com/docs/how-to-switch-streams-using-stream-class-streams
https://www.wowza.com/docs/how-to-control-stream-class-streams-dynamically-modulestreamcontrol
https://www.wowza.com/docs/how-to-use-ipublishingprovider-api-to-publish-server-side-live-streams
I've previously created a custom module for Wowza that allows you to create an output stream from a live input stream, then control the output and switch between the live input stream and other live or on demand streams.

Push O/R data updates to Windows Store clients

I am developing a multi-user Windows Store client app. The app's main screen displays data that can be updated by users at any time. Any changes made by a user needs to be pushed onto all clients in order to update the data displayed on the main screens of all the other users.
Would Azure's Notification Hubs apply to my scenario? The demos I've seen so far only show the pushing of "toast" notifications. In my case, I need to push notifications to client application code for programmatic processing rather than for direct display to the user.
My client app is programmed in a way that requires an object/relational mapping tool sitting between it and the database. It appears that Azure's Mobile Services includes support for Entity Framework and so can facilitate this. Is it possible to leverage Notification Hubs to achieve the goal of keeping all clients updated with the latest database changes? If so, then how would I accomplish each event in the following sequence?
Inform the mobile service that the database has changed.
Notify all the clients about the changes.
Materialize the changes on each client as objects via the O/R mapper.

iPhone live data streaming

We have an application with charts. Client wants to implement something like in forex graphs, I mean live data, updating for example each 1, 5 or 10 seconds. Could you please provide me with some theory, how would it be possible to implement, what iOs objects should I use? What should the data provider implement?
I think you are using API s to receive live data to your application. its better that APIs are using JSON format to send data. because those are easy to use. If the data receiving in XML format then its little bit hard. There is JSON class library in the internet to download. Download it and integrate it your application and after that you can use it very easily.
http://mobileorchard.com/tutorial-json-over-http-on-the-iphone/
here is a tutorial. you can refer it and its easy :)
Data for charts should locates on any server side. Create separate thread with requests or async requests to your/clients server side. This will make your requests in the background and users of your application will not be distracted by endless stop/pause during the application lifecycle. Also in the background you should parse received data from server. There are multiple available formats for this aim (JSON in prev post, for ex.). Parse data and update your charts datasource. If your use CorePlot for building charts it's pretty straightforward to refresh charts with new data - use on these CPGraph methods
-(void)reloadData; -(void)reloadDataIfNeeded;
Check NSURLConnection for asynchronous loads of a URL request. NSOperation for start you code in background.