How to get live stream sharable CDN link using agora-sdk ng - agora.io

Created angular project using agora sdk ng
tried to push my live stream using agora it throw me berlow error
reason: "Publish error on rtmp-publish"
status: 32
type: "liveStreamingFailed"
url: "rtmp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov"
Agular side code:
this.client.startLiveStreaming("rtmp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov",false);
Please help on my above issue.
Thanks in advance

The startLiveStreaming method is meant to push the Agora stream to an extertnal RTMP server, such as pushing your stream to YouTube Live or Twitch.
To inject media from an RTMP url, you should use addInjectStreamUrl(API reference)
From the documentation:
Injects an online media stream to a live-broadcast channel.
After you call this method, the server pulls the online stream and
injects it into a live-broadcast channel. This is applicable to
scenarios where all audience members in the channel can watch a live
show and interact with each other. See Inject Online Media Stream for
details.
If the online media stream is injected successfully, this stream is
added to the channel, and all users in the channel receive the
AgoraRTCClient.on("user-published") and
AgoraRTCClient.on("user-joined") callbacks with the uid 666.

Related

How to pass the custom object to remote stream in agora web

I am working in agora web 3.x. I want to pass the custom javascript object from localstream to remote user object.so remote user can access that object
You can use the Agora RTM SDK for web to send and recieve data between users on the same channel. You can convert your JS Object to a JSON and send it over RTM.

Can we mute remote audio at source while using Agora Web SDK API?

I am working on an application where host needs to mute other participants. I have tried using remotestream.muteAudio() api. But this doesn't mute the audio at source. Which means with this API, if host mutes Participant A it is muted only for the host. But participant B can still hear Participant A.
I went through the API documentation and couldn't find the solution.
https://docs.agora.io/en/faq/API%20Reference/web/interfaces/agorartc.stream.html#muteaudio
Can this be achieved by any ways?
Hi there you need to use the Agora RTM SDK to do that.
You can create an RTM channel with the same name as the RTC channel. Alternatively, You can use P2P messaging(Also present in RTM) if that suits your use case better.
Then the host can send a message to the concerned user to mute. On receiving this message, the user can call the muteAudio on their side, thereby muting the audio at source. All of this would be done programmatically.

Azure IOT Central - Cloud to Device messages using MQTT

My IOT Device is connected to IOT central and am able to receive data through export option.
Now i want to send some command to My device,
For example,
Below json data it is expecting to send heartbeat of device on subscribed URL'devices/....ba50621/messages/devicebound/#'
{ "action": "heartBeat",
"requestId": "b2c3d4e5-3424-4dca-32dc-12b73290cfed"
}
i created service application by refering below links to send Cloud to device message,
Stackoverlow ans and
Sample app
used connection string as,
"HostName=asdasdas.azure-devices.net;DeviceId=asdasdasda50621;SharedAccessKey=nXmyveEPrV....pmo9jULvDtik="
This connection string was received when device got register though dps. i used this on service application to connect. i dont know whether this correct.
When application tried to send message, i got unauthorized error.
In the documentation of above link says to get connection string from shared access policy of IOT hub. but i am using iot central and used above connection string.
Kindl help me fix it.
Cloud to device messaging works a bit different in IoT Central than a plain IoT Hub. Instead of connecting the service client to your IoT Hub, you have to use the IoT Central REST API.
You can either send commands to your device or update a property. The complete documentation including samples are here. You can find the documentation to send commands to your devices here.
In the case when your IoTC App is NOT a legacy application, you can use a preview IoTC App (which is a CapabilityModel driven model type) with the REST APIs support for calling your device. Currently preview version doesn't have a feature what you are trying achieved, such as sending a C2D message to the device.
The IoTC preview supports only calling the device method - Execute Command.
The following screen snippets demonstrated this feature. For this example, I am using my Azure IoT Hub Tester, where the virtual devices are using the MQTT protocol directly to the underlying IoT Hub of the IoT Central App.
I have created a free IoT Central App with the AzureKit ESP32 template, registered and provisioned for device1 and connected from the Azure IoT Hub Tester:
Showing a command echo PnP model:
Invoking a command echo by REST POST call. Note, that the Authorization sastoken must be created in the Administration/API tokens page.
The device1 received the direct call and than published its response (note, that this screen was not snipped for its short response time limit). The following screen snippet shows a complete sync REST call with the device1. Note, that this preview version didn't handle the response payload based on the mentioned document and PnP model.
Finally, this screen snippet shows the history of this command action via the REST:
Note, that there is also missing the response object from the device like is described in the CapabilityModel schema.
UPDATE
I have added the missing screen snippet on the device side when the method echo has been invoked:
As you can see the above picture, the device received the REST POST payload and its published response back to the invoker based on the PnP model schema.
UPDATE 2
The following screen snippets demonstrated invoking a command upgrade for device4. Note, that the device4 is a PnP device created from the template SmartConnect FM-201 IoT Gateway.
The device4 received a message on the direct method upgrade:
The device4 sent the response back to the invoker and IoTC app. The following picture shows its history:
Notice again, there is missing a response object in the REST response and also in the IoTC App. I hope, this is a bug in this preview version and it will fix it soon to follow up the CapabilityModel schema.

tagged push notification to android (google cloud messaging) using azure

I am using Azure's Notification Hubs REST APIs to create a Native registration for Google Cloud Messaging with a tag. (http://msdn.microsoft.com/en-us/library/dn223264.aspx)
The API call runs successfully and returns a RegistrationId as well as my tags in the XML response:
<GcmRegistrationDescription
<RegistrationId>222222222222222222222-1111111111111111111-2</RegistrationId>
<Tags>toto ,titi</Tags>
</GcmRegistrationDescription>
However with the debug console, I fail to push a message to that tag with the error below:
No registrations with the tag "toto" were found for the selected platform.
The Read Registration method of the REST api does not return the tags either. It returns an Etag element.
<GcmRegistrationDescription>
<ETag>4</ETag>
<RegistrationId>222222222222222222222-1111111111111111111-2</RegistrationId>
</GcmRegistrationDescription>
The same works great for the iPhone when creating a Native registration for Apple Push Notification Service.
Any ideas on what I missed would be greatly appreciated!

Accessing YouTube live streams with Web Audio API

Is it possible to access YouTube live stream content (video/audio) in Javascript and Web Audio API e.g. for real-time mixing of the audio content?
Is the payload HTML5 compatible or is it Flash only?
... or is access to these streams limited via CORS or licensing clauses?
In my case, live streams would be created in Google Hangout http://www.google.com/+/learnmore/hangouts/onair.html
You can only access the content for HTML5 streams, and of course I'd expect this would not be available in the future for encrypted streams. Hangouts use a plugin right now, so you can't do this.