js
5 TopicsWhat is the best practice to inject js or css files in PnP Template Provisioning
I am using PnP template provisioning xml templates. I would like to inject some js and css files like for example jquery. I try to do this with the custom action but I don't like this solution. I do it now like this: <!-- css --> <pnp:CustomAction Name = "CustomCss" Location = "ScriptLink" Sequence = "1003" ScriptBlock="document.write('<link rel="stylesheet" type="text/css" href="{sitecollection}/Style%20Library/Custom/custom.css?v=1.0"></link>');" /> <!-- js --> <pnp:CustomAction Name = "jquery" Location = "ScriptLink" Sequence = "0" ScriptBlock = "
 var headID = document.getElementsByTagName('head')[0]; 
 var newScript = document.createElement('script');
 newScript.type = 'text/javascript';
 newScript.src='{sitecollection}/Style%20Library/custom/jquery.js?v=1.15';
 newScript.id = 'jquery';
 headID.appendChild(newScript);" />3.2KViews0likes1Comment404 response because of wrong API URL generated by onedrive.js
Hi everyone, I got an issue with your OneDrive File Picker Javascript SDK (i'm using 7.2), when i use the share or download actions (it works with the query actions), OneDrive.js generate wrong API URL, mysteriously, your Javascript append to the API url the sharepoint site name. Here is more details of what i do and to reproduce : Like specified in your documentation (https://docs.microsoft.com/en-us/onedrive/developer/controls/file-pickers/js-v72/open-file?view=odsp-graph-online), we can pass in endpointHint a SharePoint document library URL. So i've set the URL to my shared documents sharepoint website, i'm under a french sharepoint so url is https://mytenant.sharepoint.com/Documents%20partages/ instead of https://mytenant.sharepoint.com/shared%20documents/. Everything ok, popup, then login, then the onedrive picking page: I select one or several files, then click on "Ouvrir" (Open), popup close and then i got 404 error response with this error : XHR GET https://mytenant.sharepoint.com/Documents%20partages/_api/v2.0/drives/b!SACSU4CwMEumL8i7GhBy_6-tGhuvB9VBhv2zaXnTBlwJEM203M0NRb0Nrb5cytGZ/items/01YGYIIS7WVLP4SNN4CNBLPC7ZUWSJ4ZJW [HTTP/2 404 Not Found 68ms] XHR GET https://mytenant.sharepoint.com/Documents%20partages/_api/v2.0/drives/b!SACSU4CwMEumL8i7GhBy_6-tGhuvB9VBhv2zaXnTBlwJEM203M0NRb0Nrb5cytGZ/items/01YGYIIS37VMXCKXOYE5FKUSIBZF42OTDH [HTTP/2 404 Not Found 65ms] [OneDriveSDK] calling xhr failure callback, status: 404 OneDrive.js:4:42959 [OneDriveSDK] Received ajax error. OneDrive.js:4:42959 [OneDriveSDK] Failed due to unknown error: OneDrive.js:4:42959 TypeError: a is undefined shareItems https://js.live.net/v7.2/OneDrive.js:4 shareItems https://js.live.net/v7.2/OneDrive.js:4 o https://js.live.net/v7.2/OneDrive.js:12 H https://js.live.net/v7.2/OneDrive.js:12 A https://js.live.net/v7.2/OneDrive.js:12 f https://js.live.net/v7.2/OneDrive.js:12 I don't know why, but OneDrive.js generates wrong API urls, instead of generating https://mytenant.sharepoint.com/_api/v2.0/drives/{driveId} it generates https://mytenant.sharepoint.com/Documents%20partages/_api/v2.0/drives/{driveId} The subdir /Documents%20partages is appended to the URI... here is a screenshot of Firefox console : Here is my snippet: let odOptions = { clientId: appId, action: "share", multiSelect: true, advanced: { endpointHint: 'https://mytenant.sharepoint.com/Documents%20partages/', createLinkParameters: { type: "edit", scope: "organization" }, redirectUri: Routing.generate('onedrive_redirect', null, true), }, success: function(files) { console.log(files); }, cancel: function() { console.log('cancel'); }, error: function(error) { console.log(error); } } OneDrive.open(odOptions); Here is the SDK version i used: https://js.live.net/v7.2/OneDrive.js PS : i've replaced my real tenant name instead of mytenant2.2KViews0likes1CommentDev 80.0.320.4 - Developer Console > Sources > Page > open any *.js file -> No Syntax Highlighting!!
.js file syntax highlighting is broken since last updates in Version 80.0.320.4 (Official build) Dev (64-bit) (mac OS) Version 80.0.326.0 (Official build) canary (64-bit) (Windows 10) This has rendered me almost blind. It works for <scripts>s embedded in .html files but not for .js files.939Views0likes1CommentIs there a way to get live transcript in Microsoft Teams?
I am trying to find a way in Microsoft Teams to get the live transcript, I want to be able to subscribe to a meeting/call that it is still running and to get the transcript from it. I understand that there is an Graph API that allows me to get the transcript for a meeting/call that ended, but that's not what I need. I am alright even with faking the subscription and do a HTTP call every 2-5/seconds. After I get the transcript I would like to do some live processing on the text. I am aware that I can connect a bot to a meeting/call and then the bot can interact with the audio stream and use Azure AI Speech Service to convert the Speech-To-Text and get the live text. I found a sample in Microsoft Github repos: https://github.com/microsoftgraph/microsoft-graph-comms-samples/tree/master/Samples/PublicSamples/EchoBot This is a good solution, but if possible I would like to do be able to do one of the following, if possible: get the transcript without a bot that needs to be connected to a session. connect a bot that can interact with the live transcript in order to get all additional metadata, like speaker name.799Views0likes1CommentIs there a way to get live transcript in Microsoft Teams?
I am trying to find a way in Microsoft Teams to get the live transcript, I want to be able to subscribe to a meeting/call that it is still running and to get the transcript from it. I understand that there is an Graph API that allows me to get the transcript for a meeting/call that ended, but that's not what I need. I am alright even with faking the subscription and do a HTTP call every 2-5/seconds. After I get the transcript I would like to do some live processing on the text. I am aware that I can connect a bot to a meeting/call and then the bot can interact with the audio stream and use Azure AI Speech Service to convert the Speech-To-Text and get the live text. I found a sample in Microsoft Github repos: https://github.com/microsoftgraph/microsoft-graph-comms-samples/tree/master/Samples/PublicSamples/EchoBot This is a good solution, but if possible I would like to do be able to do one of the following, if possible: get the transcript without a bot that needs to be connected to a session. connect a bot that can interact with the live transcript in order to get all additional metadata, like speaker name.700Views0likes0Comments