There is a similar question at:
Can I get speaker notes from Google Slides by API?
and documentation here:
https://developers.google.com/slides/how-tos/notes
But I can't get it working in flutter.
var ssMap = pp.slides.asMap();
ssMap.forEach((key, slide) {
print('Slide: ${key} : ${slide} ');
var notesId = slide.slideProperties.notesPage.notesProperties.speakerNotesObjectId;
print("NOTE: " + notesId.toString());
How do I read speaker's notes?
Related
We have used Branch.io for implementing deep links in our mobile hybrid app which is developed using ionic 1 framework. We have used branch-cordova-sdk plugin and configured the deep links for sharing with social media apps. We are passing title, description and contentImageUrl for branch.io to create the link. It works great on almost all SM platforms except Snapchat.
When the content is shared on snapchat, the link is showing up along with content but it is not clickable from snapchat. There is no preview of the image is shown. I could not find any solution for this yet. Also please see the code down below in reply. thanks.
Here is the code i'm using:
var branchUniversalObj = null;
var props = {};
props.canonicalIdentifier = 100;
props.title = "my title";
props.contentDescription = "my description";
props.contentImageUrl = "http://lorempixel.com/400/400/";
//create branch object
Branch.createBranchUniversalObject(props).then(function (res) {
branchUniversalObj = res
console.log('Response: ' + JSON.stringify(res))
}).catch(function (err) {
console.log('Error: ' + JSON.stringify(err))
});
Somewhere in the code:
var analytics = {
campaign: "sharing cards"
}
var properties = {
cardId : 100,
cardType: "promo",
refUser: "John"
}
// share sheet
branchUniversalObj.showShareSheet(analytics, properties, "Hello awesome stuff");
When you share a Branch link on various Social Media platforms, it is scraped to display the OG related information (i.e. OG Title, OG Image and OG Description).
When scraped, Branch will return: 1st: any OG parameters that have been defined for the link; 2nd: any OG parameters that have not been defined for the link but that have been defined at the app level (in Social Media Display Customization on the Link Settings page); and finally: any meta tags present on the web site specified in the Default URL ($fallback_url) page.
In order, to ensure that the OG image is displayed correctly, you need to ensure that you have the OG parameters defined at atleast one of the three levels mentioned above.
Here are the various ways to set OG tags
To add the og_image for a particular Quick link on the dashboard:
Visit the Quick links page on your dashboard.
Click on 'Create new Link'
On the 'Configure Options' tab and 'Social Media' section either add the og_image or the og_image_url.
While creating links from the iconic SDK add image URL to the Branch Universal Object using contentImageURL tag as shown below:
Code snippet
var properties = {
canonicalIdentifier: 'content/123',
canonicalUrl: 'https://example.com/content/123',
title: 'Content 123 Title',
contentDescription: 'Content 123 Description ' + Date.now(),
contentImageUrl: 'http://lorempixel.com/400/400/',
price: 12.12,
currency: 'GBD',
contentIndexingMode: 'private',
contentMetadata: {
custom: 'data',
testing: 123,
this_is: true
}
}
// create a branchUniversalObj variable to reference with other Branch methods
var branchUniversalObj = null
Branch.createBranchUniversalObject(properties).then(function (res) {
branchUniversalObj = res
alert('Response: ' + JSON.stringify(res))
}).catch(function (err) {
alert('Error: ' + JSON.stringify(err))
})
To set these OG tags by default for your branch links:
Go to the Link Settings Page on your dashboard:
Scroll down to the "Social Media Display Customization" section
Set the Link Title, Description and an image. Here is a screen shot for your reference.
PS: As a final caution, make sure the image you specify as the OG Image adheres to the Snapchat accepted image dimesions, which I belive is 1080 x 1920 pixels.
Is there a way to post two images in a single post with UWP Community Toolkit?.
I think it is possible, you can check the official sample app of UWP Community Toolkit.
It has encapsulated the twitter apis in its service. And according to the Twitter developer documentation: Uploading Media, it is supported to upload maximum 4 photos in a tweet.
In a word, you can open the project of this sample app, and find SamplePages -> Twitter Service -> TwitterPage.xaml.cs, finally find the SharePictureButton_OnClick event and override the original code:
StorageFile picture = await openPicker.PickSingleFileAsync();
if (picture != null)
{
using (var stream = await picture.OpenReadAsync())
{
await TwitterService.Instance.TweetStatusAsync(TweetText.Text, stream);
}
}
to:
var pictures = await openPicker.PickMultipleFilesAsync();
int num = pictures.Count;
List<IRandomAccessStream> streams = new List<IRandomAccessStream>();
foreach (var picture in pictures)
{
var stream = await picture.OpenReadAsync();
streams.Add(stream);
}
await TwitterService.Instance.TweetStatusAsync(TweetText.Text, streams.ToArray());
I've been trying to get closed captions working with the SEF player, but haven't had any luck. My app uses playready streams and I've tried side loading the SAMI files, but I get errors. I would prefer to do side loading, but if I can get embedded closed captions to work that would be a first step. There seems to be limited and conflicting documentation and posts on the Samsung developer's forum so I'm hoping to find someone who has gotten this to work on 2012/2013 devices.
Here's what I have tried:
var SefPlugin = document.getElementById('pluginDL');
alert(" " + SefPlugin.Open("Download", "1.000", ""));
alert(SefPlugin.Execute('GetPluginInfo'));
var ret = SefPlugin.Execute('StartDownFile', 'http://testurl.com/test.smi', '$TEMP/subtitle.smi', 10, 10);
alert("SUBTITLE DOWNLOAD RETURNED: " + ret);
The output is:
JS ALERT: 1
JS ALERT: 1
JS ALERT: SUBTITLE DOWNLOAD RETURNED: 1
Then in the OnStreamInfoReady method I attempt to do this:
alert(" START SUBTITLE: " +Player.plugin.Execute("StartSubtitle", '$TEMP/subtitle.smi'));
alert("SET STREAM ID: " +Player.plugin.Execute("SetStreamID", 5, 0));
The output is:
JS ALERT: START SUBTITLE: -1
JS ALERT: SET STREAM ID: 1
The StartSubtitle returning -1 is an error and I'm not sure what the problem is with this scenario.
I also tried the AVPlay plugin by downloading the subtitle file the same way as above. Then, I tried to initiate a play action by calling:
var subtitleDataCallback = (function(syncTime, data) {
alert(syncTime + " : " + data);
})();
Main.AVPlayerObj.open('http://testurl.com/test.mp4',
{
subtitle: {
path: "subtitle.smi",
streamID : 0,
sync : 1000,
subtitleDataCallback: subtitleDataCallback
}
});
It plays the content if I leave out the subtitle object, but when I have the subtitle object there it gives me the following error:
JS ALERT: ======================================= ERROR2: TYPE_MISMATCH_ERR
I tried $TEMP/subtitle.smi for the path as well, but I receive the same mismatch error. Any guidance would be greatly appreciated.
I never actually got subtitle files to work with the player. I found a subtitle parser and ripped it out from (http://mediaelementjs.com/). It gives you each subtitle entry in an array that has the time when the subtitle should start showing and when it should stop showing.
I am currently using Gigya wordpress plugin to implement the share bar in Wordpress but I need to be able to track the share event and I am not using Google Analytic. Any idea how I can add a callback in this plugin to enable tracking? The reason I need to use a callback is because google plus share is in an iframe and I can't bind the click event.
I've read this documentation but this is using the Gigya api which is different than the wordpress plug. I tried to use this piece of code and it is not doing anything.
// onSendDone - event handler method, called after Gigya finishes the sharing process
// Reports the event to your Analytics provider
function onSendDone(event) {
console.log('click');
if(event.providers) {
var providers = event.providers.split(",");
for(i = 0; i < providers.length; i++) {
var provider = providers[i];
// Report the event to your Analytics provider
//waTrackPlusOne_vote(provider);
console.log('pass in ' + provider);
}
}
}
var ua = new gigya.services.socialize.UserAction();
var currentURL = window.location.href;
var $currentTitle = $j('title').text();
ua.setLinkBack(currentURL);
ua.setTitle($currentTitle);
// Define Share Bar plugin's Parameters
var shareBarParams ={
userAction:ua,
shareButtons: "google-plusone",
containerID: '.gig-button-container-google-plusone', // location of the Share Bar plugin,
onSendDone: onSendDone // onSendDone method is called after Gigya finishes the publishing process.
}
// Load Share Bar plugin
gigya.services.socialize.showShareBarUI(shareBarParams);
I have just faced the same problem, here it's how I've done it.
At some points when setting up the Gigya Share Button you will have to declare a variable called "shareParams", invoked in gigya.services.socialize.showShareUI(shareParams).
Just add 'onSendDone' : yourFunctionName to the shareParams object.
Example:
var shareParams = {
'userAction' : {0},
'onSendDone' : myNamespace.GigyaSendDone
}
gigya.services.socialize.showShareUI(shareParams);
When the sharing is successfully completed, this Javascript action will be invoked.
So thanks to Emanuele Ciriachi, I found the js api code in the plugin. Once modified it, I think this will resolve my issue.
i have StartPreviewAsync api to show camera preview on screen in C#
but not available in javascript ,so how can i get same preview(output) in javascript template??
or is any way to deploy xaml on javascript??
WinJS seems to have a different API for handling Camera Previews. I'd take a look at this example on MSDN for more details. Namely, in BasicCapture.js, we see the following function, startPreview:
function startPreview() {
displayStatus("Starting preview");
id("btnStartPreview" + scenarioId).disabled = true;
var video = id("previewVideo" + scenarioId);
video.src = URL.createObjectURL(mediaCaptureMgr, { oneTimeOnly: true });
video.play();
displayStatus("Preview started");
getCameraSettings();
// Initialize sliders.
for (var i = 0; i < cameraControlSliders.length; i++) {
cameraControlSliders[i].slider.disabled = false;
initSlider(cameraControlSliders[i]);
}
}
To answer your second question, the only way to load Javascript into a XAML application would be through the WebView control, and even that would not be allowed to directly control the different controls of the XAML UI. If you want to do XAML, you have to stick to C#, VB, or C++.