I struggle to understand how – using one AudioContext – I would achieve the following:
I use createMediaStreamSource to create the source of the context – works.
I then connect a volume node to the source – works.
I then want to create TWO outputs: One is the "standard" output (the speakers) and the second would be used to feed into a mediaRecorder
I struggle with the 3rd point. How do I specify a different output than speakers? Is the output still a stream I can feed into MediaRecorder?
From what you describe, I assume that you have some code that looks like this:
mediaStreamAudioSourceNode
.connect(gainNode) // your volume node
.connect(audioContext.destination);
You just need to add another MediaStreamAudioDestinationNode and use that as an additional output.
const mediaStreamAudioDestinationNode = new MediaStreamAudioDestinationNode(audioContext);
gainNode.connect(mediaStreamAudioDestinationNode);
const mediaRecoder = new MediaRecorder(mediaStreamAudioDestinationNode.stream);
Related
After creating a teams-tab-app using the vscode teams toolkit, I see that in the default auth-start.html file the script tries to extract the scopes from the URL (that was constructed by the microsoftTeams.authentication.authenticate() method), however I don't see any reference in the documentation on how to pass these scopes in this method.
Does anyone know how to pass these scopes?
I've wondered about this myself when looking at a toolkit, but I haven't used it for any production systems so never bothered to look too deep. I do see that in useTeamsFx.tsx is where it's doing the redirect to startLoginPageUrl, so presumably you need to set REACT_APP_START_LOGIN_PAGE_URL to be the path to the auth-start.html, so you could set it to include a querystring as well. It needs the app Id so you'd need to set that as well, but the useTeamsFx also wants REACT_APP_CLIENT_ID which you'd set as well. As a result, it might make sense to store the scopes you want in your code or in an environment variable as well, and then compose the value you send to initiateLoginEndpoint. Basically, instead of
var startLoginPageUrl = process.env.REACT_APP_START_LOGIN_PAGE_URL;
...
initiateLoginEndpoint: startLoginPageUrl
...
you might instead make it
var startLoginPageUrl = process.env.REACT_APP_START_LOGIN_PAGE_URL;
var scopes = process.env.REACT_APP_SCOPES; // <-- this is added
...
initiateLoginEndpoint: `${startLoginPageUrl}?clientId=${clientId}&scope=${scopes}`
...
but this is untested, so no guarantees.
On a separate but related note, in my sample project, in auth-start, it refers to a very old version of MicrosoftTeams.min.js (v 1.6, and current is 1.11). I might just have a very old Teams Toolkit, but maybe not...
I just finished to setup Blender so it can export to Ogre. When I am exporting I get a bunch of mesh files and a scene file.
I am loading the model that the Ogre SDK provides and it works like so:
mSceneMgr->setAmbientLight(Ogre::ColourValue(0.5f, 0.5f, 0.5f));
// Create an Entity
Ogre::Entity* ogreHead = mSceneMgr->createEntity("Head", "ogrehead.mesh");
// Create a SceneNode and attach the Entity to it
Ogre::SceneNode* headNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("HeadNode");
headNode->attachObject(ogreHead);
// Create a Light and set its position
Ogre::Light* light = mSceneMgr->createLight("MainLight");
light->setPosition(20.0f, 80.0f, 50.0f);
What's happening is that it loads a single mesh file and that's it.
This is the Blender export output:
What do I need to do from here in order to load my model?
It depends a bit on what you want to achieve.
Currently you have created a scene in blender containing multiple parts that together result in your BlackHawk helicopter. If you just need a single object in Ogre, you can combine the elements inside Blender into one object, export that and use the same loading code as before (using the new .mesh file name of course).
If you want the individual parts to stay independent, you will have to load them into Ogre one by one or use one of the many DotScene loaders (e.g. this one or that one or the one that also handles user data) and point it to your "BlackHawk.scene" file (which should reference all helicopter parts).
I have been trying to export data to a google bigquery dataset from datasift, but except for 4 empty rows, no other relevant data has been pushed.
I followed instruction from this link: http://dev.datasift.com/docs/push/connectors/bigquery. Not sure if it's the csdl code that I used the cause.
For example I configured a stream using:
wikipedia.title contains "Audi".
The live preview has no output. Also, the only data sources that I've set as active are Interaction and Wikipedia.
Please let me know what may be the reason for this. At the end of every stream recording I don't see any changes, expect the creation of the table mentioned in the destination with 4 empty rows(some row have null values, and interaction.type is ds_verify).
Thank you!
I need to develop an application that extracts all the contents in Content Tab of the Ektron Workarea and I have to keep tree structure of folders (taxonomies,collections,forms,etc.) also.When I click the content I need to get the Content ID in the code behind also.I need to do all these in a single function.
I tried this requirement with the concept of content block widget in workarea.When we drag that widget and edit it a pop up will come and it displays the folders of work area in tree structure.But when I created an aspx page, put the same code and I browse that page I didn't get the tree structure of all contents.Only the main tabs(Folders,Taxonomies and search ) are visible.Then I drag the user control in the aspx page .But it also doest work.
So how will I solve the above problem.
Can I pull all the contents in tree structure from work area from the root using API codes?.Then can anyone please give the API code to solve?
Please anyone reply!
Assuming you are using 8.6 look here to start with:
http://reference.ektron.com/developer/framework/content/contentmanager/getlist.aspx
Update:
I think I misread your question the first time around. Allow me to expand on my answer a bit. My original answer with the web services assumes that you are rendering the content tree from some sort of "presentation tier" -- a different web site, a console app, or a WPF/WinForms app, etc.
You can get the recursive folder structure with something like this:
private FolderData GetFolderWithChildren(long folderId)
{
var folderApi = new Ektron.Cms.API.Folder();
var folderData = folderApi.GetFolder(folderId);
// This next method is marked as obsolete in v9.0;
// a newer overload is available in v9.0, but I
// don't know if it's available in v8.0
folderData.ChildFolders = folderApi.GetChildFolders(folderId, true);
}
I'm a little confused as to what exactly you're trying to accomplish. If you want to show the entire tree structure graphically, have you tried taking the code and markup from the edit view of the content widget and using it on your non-edit view?
I must say, your requirement that "I need to do all these in a single function" worries me a bit. Workarea content trees can get really large very quickly. If you're trying to load all of the folders and all the taxonomies and all the collections, etc. Then the user will likely be waiting a long time for the page to load, and you risk running into timeout issues.
-- Original Answer --
Ektron v8.0 doesn't have the 3-tier option, which is too bad because that would really make your job a lot easier. In v8.0, there are ASMX web services that you can reference, including:
/workarea/webservices/content.asmx
/workarea/webservices/webserviceapi/user/user.asmx
There are lots more than this; browse through the folders within /workarea/ to see what's available.
It's been a while since I've worked with these services, so I'm a little rusty...
Suppose you add references to those two services I listed above and name them ContentService and UserService. The first thing you'll want to do is set the authentication headers. Then you can call the service methods in much the same way as the old legacy apis.
var contentApi = new ContentService.Content();
contentApi.AuthenticationHeaderValue = new ContentService.AuthenticationHeader();
contentApi.AuthenticationHeaderValue.Username = username;
contentApi.AuthenticationHeaderValue.Password = password;
contentApi.AuthenticationHeaderValue.Domain = domain;
var userApi = new UserService.User();
userApi.AuthenticationHeaderValue = new UserService.AuthenticationHeader();
userApi.AuthenticationHeaderValue.Username = username;
userApi.AuthenticationHeaderValue.Password = password;
userApi.AuthenticationHeaderValue.Domain = domain;
var ud = userApi.GetUserbyUsername("jimmy456");
long folderID = 85;
bool recursive = true;
ContentData[] folderContent = contentApi.GetChildContent(folderID, recursive, "content_id");
I have been developing a simple desktop app using adobe air, html and javascript to save data to sqlite (not as, no flash builder, no flex). Is there a way that i can capture an image from my webcam and save it using these technologies ? If not what else can be done to achieve the result? Thanks in advance.
This can be done, but it is absolutely not performance-friendly :) You will get enormous string-objects (bigger images = bigger strings). But I will tell you how I did it once.
First, you have to get the BitmapData from your webcam. This can be done by creating a BitmapData-object and using its draw()-function, as shown below:
var bmpd:BitmapData = new BitmapData(webcam.width, webcam.height);
bmpd.draw(webcam);
With this BitmapData, you can then call for getPixels(), which will return a ByteArray.
var ba:ByteArray = bmpd.getPixels();
This ByteArray is now ready for serialization. Since you are storing, it is best you store it as a string. This is most commonly done by Base64. You can use this class to implement the base64-encoding, as shown below:
var baseString:String = Base64.encodeByteArray(ba);
The above string can be stored in your sqlite and is a string-representation of your image. The bigger the image, the longer the conversion will take.
To get the image back from your sqlite, you can use the decodeByteArray()-method of the Base64-class I gave you, in combination with a loader-object. Example is shown below.
var baseString = StringFromYourSQLite;
var ba:ByteArray = Base64.decodeToByteArray(baseString);
var imageLoader:Loader = new Loader();
imageLoader.loadBytes(ba);
stage.addChild(imageLoader);
And this is how you can store and retrieve images from your database.