I'm working on a desktop live streaming software and I'd like to add my custom thumbnail/image for a scheduled live video (it's known as "slateImage" in youtube's api - https://developers.google.com/youtube/v3/live/getting-started).
I found in Broadcast.insert liveBroadcasts#resource
contains a parameter called snippet.thumbnails.(key)
However it doesn't work for me, the video is with same default slateImage and yes, I remember to enable contentDetails.startWithSlate = true there.
Have anybody faced with same?
if you check the documentation livebroadcasts.insert
Provide a liveBroadcast resource in the request body. For that resource:
You must specify a value for these properties:
snippet.title
snippet.scheduledStartTime
status.privacyStatus
You can set values for these properties:
snippet.title
snippet.description
snippet.scheduledStartTime
snippet.scheduledEndTime
status.privacyStatus
contentDetails.monitorStream.enableMonitorStream
contentDetails.monitorStream.broadcastStreamDelayMs
contentDetails.enableDvr
contentDetails.enableContentEncryption
contentDetails.enableEmbed
contentDetails.recordFromStart
contentDetails.startWithSlate
contentDetails.enableClosedCaptions
The same is stated under livebroadcast.update I would say that the snippet.thumbnails.key is read only. You are not allowed to write to it though the api.
contentDetails.startWithSlate
This setting indicates whether the broadcast should automatically begin with an in-stream slate when you update the broadcast's status to live. After updating the status, you then need to send a liveCuepoints.insert request that sets the cuepoint's eventState to end to remove the slate and make your broadcast stream visible to viewers. When you update a broadcast, this property must be set if your API request includes the contentDetails part in the part parameter value. However, when you insert a broadcast, the property is optional and has a default value of false.
Note: This property cannot be updated once the broadcast is in the testing or live state.
Related
I am using envoy proxy in my application and I am trying to print logs in these three ways:
In fixed ORDERING JSON format
Need to add request and response body of the request to log
Can we add a route level logging (enable/disabling), not with Lua?
All below scenarios log level is added in listener filter in my application.
#1:
I am able to add stdout access logging and able to print logs in JSON format but not able to order them in a fixed format like first key should be response code and so on. Each time JSON log prints order of keys changes.
#2: In my logs how can I add my request and response body? I tried to find formats supported by the envoy but had no luck.
What extra parameters do I need to in json_format to get the body?
json_format": {"protocol": "%PROTOCOL%","duration": "%DURATION%","my_custom_header": "%REQ(MY_CUSTOM_HEADER)%"}
#3: Can we add route level logging in envoy and also enable/disable on route level? I read the documentation but was not able to find anything.
In Lua we can add like below on route level can we do without Lua/another plugin?
envoy.filters.http.lua:
"#type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute
# name: bye.lua
disabled : true
For #1, I have same question with you on #1. It's terrible that we can't control JSON order for the access log.
For #2, I don't think print request body is a good idea. You can try to log request body in your application and track envoy log and your application log with the same x-request-id.
For #3, I don't have further knowledge for lua filter. But enovy access log itself has many fields for UPSTEAM and DOWNSTREAM.
Hope you have already resolved the issue and share back : )
We are using Amazon Connect, Lex and Lambda to create a phone bot. One use case we have is that we need to put the user on hold while we find information in other systems. So the conversation will be something like this:
- bot: hi, what can I do for you?
- user: i want to make a reservation
- bot: wait a minute while I fetch information about available rooms
... after 5 seconds ...
- bot: I found a free room blah blah
I don't see a way to send the wait a minute... message and keep control of the conversation. How can we achieve that?
You can accomplish this inside a single Lex bot by setting the intent to be fulfilled by a lambda function, the response of the function would play a message saying “please wait” and then chain another internet to perform the search using the data from the original intent.
See this link for information about sharing data between intents.
You can chain or switch to the next intent by passing the confirmIntent dialog action back in the lambda response. See this link for more information on the lambda input and response format.
You can use wait block in aws connect https://docs.aws.amazon.com/connect/latest/adminguide/flow-control-actions-wait.html
By using this block you can set time to 5 secs . after time expired you can play prompt.
This is a very common problem typically when we want to do backend lookups in an IVR. The problem is lex does not provide any means to just play prompts.
One way to do it is:
Create a dummy slot in your intent (the reservation intent from your example above) with any type (e.g. AMAZON.NUMBER), we don't really care what the value is in this slot
From the lex code-hook for the intent, return ElicitSlot for this dummy slot with prompt as "Wait a minute while I fetch available rooms... "
If you do only this much, the problem you will face is that Lex will expect input from caller and will wait for around 4 seconds before passing control back to the Init and Validation Lambda, so there will be unnecessary delay. To overcome this, you need to set timeout properties as session attribute in "Get Customer Input" block from connect.
Property1:
Lex V2 Property name: x-amz-lex:audio:start-timeout-ms:[intentName]:[slotToElicit]
Lex Classic Property name x-amz-lex:start-silence-threshold-ms:[intentName]:[slotToElicit]
value: 10 (or any small number, this is in millseconds)
Property2:
Only available in Lex Classic, to disable barge-in on Lex V2, you can do it for required slot from lex console
Property name: x-amz-lex:barge-in-enabled:[intentName]:[slotToElicit]
Value: false
If barge-in is not disabled, there is a chance user may speak in middle of your "Please wait..." prompt and it will not be played completely.
Official documentation for these properties:
https://docs.aws.amazon.com/connect/latest/adminguide/get-customer-input.html
https://docs.aws.amazon.com/lexv2/latest/dg/session-attribs-speech.html
Another way:
Whenever such a prompt needs to be played, store the lex context temporarily either as a contact attribute after serialization, or if too big in size to be stored as contact attribute in a store like dynamodb.
Return control back to connect, play the prompt using 'Play prompt' module in connect. To give control back to bot, you will need invoke a lambda to re-initialize Lex with the full lex context again- using PostText API and then again passing control to same bot using 'Get Customer Input'
I have implemented option1 and it works well. You can even create cover-prompt which gets played if the backend lookup takes longer than expected. The actual lookup could be delegated to another lambda so that the code-hook lambda can continue doing customer interaction ever x (say 5) seconds to keep them informed that you are still looking up information.
we occurred an issue handling manually audio track and subtitles on sender web and mobile (v3 for both).
Basically, we are able to add some track info before load media, we found the added tracks on the receiver but there are present also the tracks that come from the manifest in two formats (AF and standard object).
There is a way to handle them once and to remove the original that comes from manifest on the receiver side?
Additionally, in this way, the senders will be notified of the change (eg. visible only audio track manually added)?
Many thanks for your support.
You can use message interception:
https://developers.google.com/cast/docs/caf_receiver_features#message-interception
Your interceptor should return the modified request or a Promise that resolves with the modified request value.
You can add your own tracks:
request.media.contentId = mediaUrl;
request.media.contentType = 'application/dash+xml';
request.media.tracks = [{
trackId: 1,
trackContentId: captionUrl,
trackContentType: 'text/vtt',
type: cast.framework.messages.TrackType.TEXT
}];
I'm having a problem associating a browser_id to a session when using Products.BeakerSessionDataManager. I'm working on Plone 5.
As far as I understand Zope sessions, as soon as .getSessionData() is called on a session data manager, a session data container is created if it did not exist. Furthermore, this data will contain a token, which is the same as the browser_id associated with the browser making the request. And finally, a cookie is set on the response with the name _ZopeId (and the value is the same as the token). Thus, when I use the default session data manager that come with Zope, I get this:
ipdb> context.session_data_manager.getSessionData()
id: 14737473151418102847, token: 38878600A7nh90DE9ao, content keys: []
However, when I use Products.BeakerSessionDataManager, the same call gives me this:
ipdb> context.session_data_manager.getSessionData()
{'_accessed_time': 1473745441.437582, '_creation_time': 1473745441.437582}
Moreover, no cookie is set.
Perusing some old Zope docs, I found a reference to getContainerKey(), so I thought that might get me the browser_id. However, the returned value is different on every request, so that does not work. Also, calling .getBrowserIdManager().getBrowserId() on the session_data_manager throws an error, because Beaker does not support browser id managers.
I want to set a cookie, and I want a token. I'm doing this so that I can identify anonymous clients in a voting application, so that they will not cast multiple votes (at least not in the same session - there are other mechanisms to allow voting only when certain other conditions are met).
Am I misunderstanding the machinery, or am I missing something?
I'm using Apple's BLTE Tansfer to simulate a heart rate monitor.
Also I have an app that receives the simulated data.
I have question a the use of CBPeripheral:
I want to control the peripheral's name.
First I've tried to add the GAP Service and name characteristic using:
[CBUUID UUIDWithString:CBUUIDGenericAccessProfileString]
[CBUUID UUIDWithString:CBUUIDDeviceNameString]
but Xcode tells me it is not recommended.
It also seems that the service is already included (when watching didDiscoverServices on the receiver side).
How can I access the name property (I want to transmit it to the receiver)?
You don't need to add new services just set up the advertisement in the following way:
NSDictionary *advData =
#{CBAdvertisementDataLocalNameKey:#"<your desired name>",
CBAdvertisementDataServiceUUIDsKey:#[[CBUUID UUIDWithString:#"180D"]]};
[peripheralManager startAdvertising:advData];