Font size of embedded twitter timeline in webpage - twitter

I have embedded my twitter timeline into my webpage using the following code:
<div style="width:215px; height:500px; overflow:auto;">
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<a class="twitter-timeline"
href="https://twitter.com/BobEagleRadio"
data-tweet-limit="5"
data-width="200"
data-height="500">
Tweets by #BobEagleRadio
</a>
When I load my webpage from the folder on my MacBook it comes out the way I want it. But when I load the same code from my remote host it looks quite different. From the local host it starts Tweets by #bobeagleradio in small font. From the remote host it starts Tweets from #bobeagleradio fun larger font. This has only happened recently. Previously both local and remote versions were the same. Why should that be and does anyone know how to amend the code so as to keep the smaller font version?

Related

Open USDZ File into QuickLook

I am interested in opening a USDZ file in a Safari browser and making sure that it ends up in the QLPreviewer and I was wondering if there is a browser API for safari that can do this. I want to make sure that the link doesn't just open in a new tab.
I have tried just opening a USDZ file but that just gives the appearance of a new tab where you have the option to open into files and stuff like that.
There isn't really any code yet but if that is the best way to achieve this that would make sense.
I see so from what I have read here you need to specify the rel="ar" which I am still not sure if it is working. I have tried it within codepen and nothing is really happening.
<a rel="ar" href="https://s3.amazonaws.com/test.cylindev.com/AR/4472/YF2013-XH-F-1S/JLA-8852-29.usdz">
<img src=""><div class="ar-glyph-background">
<div class="ar-icon"></div>
<div class="ar-text">View in AR</div></div>
</a>
It still doesn't work in a codepen environment but I know you can access previews from that environment and I am not sure where the issue is.
It turns out that you need an image tag within the link and the code I was actually using didn't have that image tag. Very weird choice by the apple devs.

Detect image selection from UIWebView

I have made a wrapper app for a website running in c#. Everything runs well until the user tries to upload an image. Permissions have been granted, it allows to select image and use camera, but it does not prevent video (from library or camera).
How do I allow access only to images? I cannot access the backend to modify the request, so I am looking for a solution where I can do it from the app.
Things tested and failed:
1 Detect from urlRequest the call and override it ( web view functions don't get called at all during the image selection)
2 Use UIImagePickerControllerDelegate - selectedImage function does not get called, image simply shows up in webkit as an icon after selection
3 Looked into info.plist restrictions, but there doesn't seem to be any difference between images and video from that end, they are simply camera and photo library permissions
4 Have tried webView.stringByEvaluatingJavaScript, however, looking at the source code, the method called when "Add Image" button is pressed is actually on a different page, with it's url inside one of the script tags. Not sure if this solution can be pursued to a result as I don't know much about web development
For (4), this is part of the source code in the body of the page :
<script src="...LayoutScripts?v=d2fICvYP326VZcultpCUKcJNjGj0lMG8f4XKY8-Vyks1"></script>
<script src="...jquery.validate.additionalmethods.js"></script>
<script src="...Repairs.js"></script>
Then the ...Repairs.js leads to an URL with a number of methods in JS, none of which seems to have a "permission" type of request for the device.
Happy to try and test any possible solutions.

Embedding Youtube videos not working with Node-webkit

I have an embedded youtube video in my nw.js app. The preview for the correct video shows up properly but when I click to play it I am met with the following error:
An error occurred, please try again later
All of the videos in the app get this error, except for one that gets this puzzling error:
The following video contains content from the International Basketball Federation
When I click these videos, I can see the first split second of the video before the error shows up.
I tried enabling/disabling the webkit plugin in the manifest:
"webkit": {
"plugin": true
}
and I tried using the Javascript Player API as suggested by in this post. However I still get the same errors.
How can I get these videos to play properly?
Here is the HTML (I'm using angularJS and the video is in a modal window) that displays the video:
<script type="text/ng-template" id="myModalContent.html">
<object width="100%" height="600px" data={{video}}>
</object>
</script>
I also tried copying this example using the Javascript Player API and even tried using the same video as the example but I'm still getting the same error.
Thank you very much for your time. Let me know if you need anything else from me or if I am being unclear.
Ok so the issue was the ffmpegsumo.dll. At first I tried replacing it with the dll from chrome 39 and 42 and that did not fix my issue. After replacing the file with the ffmpegsumo.dll from Chrome 38.0.2125.122, my issue was fixed and videos played as expected.
Chrome 38.0.2125.122 ffmpegsumo.dll 32 bit
Chrome 38.0.2125.122 ffmpegsumo.dll 64 bit
You need the flash plugins in the plugins directory at the same root level as the package.json NPSWF32_13_0_0_214.dlland NPSWF32_14_0_0_125.dll. This with the above will enable Flash.
Had the same problem in Linux 64 bits using Yeoman Node Webkit Generator (https://github.com/Dica-Developer/generator-node-webkit/wiki/Getting-Started)
Just fixed it by adding the so lib:
$ cp nwjs/nwjs-v0.12.0-linux-x64/libffmpegsumo.so dist/Linux64_v0.12.0/

Cordova iOS: Load videos with downloaded html's and video files

I have the following issue:
I have an iOS Cordova Application.
The application download a zip file and decompress it in "cdvfile://localhost/persistent/content/myfolder" by ussing the following Cordova plugins: org.apache.cordova.file-transfer, org.apache.cordova.file and https://github.com/MobileChromeApps/zip.git
Inside the zip there is an "index.html" file with "video tags" on it.
I was able to succesfully load and execute the "index.html" file, but the video doesn't load.
I know that the video file was decompressed successfully because:
I check the file inside my iPad.
I embed the video in the index of the cordova app (not the downloaded one) in the following way and it works:
var videocontainer = document.getElementsByTagName('video')[0];
var videosource = document.getElementsByTagName('source')[0];
var newmp4 = cordova.file.documentsDirectory + 'content/myfolder/videos/myvideo.mp4';
videosource.setAttribute('src', newmp4);
videocontainer.load();
videocontainer.play();
But, the video is not loaded/played inside the downloaded HTML file. To understand what I'm doing, I have to develop an application that will be updated by downloading its contents from zips, and the contents includes pages with videos embeded on them. It works on PC and Android, but not in iOS.
I tried the following things:
Loading the page in "_self". The page is displayed but not the video.
Loading the page in an iframe. Same result.
Loading the page within an inAppBrowser (plugin). Same result.
Video tag with source src="videos/myvideo.mp4" (works in Web and Android). Same result.
Video tag with source src="./videos/myvideo.mp4" (works in Web and Android). Same result.
Video tag with source src= cordova.file.documentsDirectory + 'content/myfolder/videos/myvideo.mp4' (with JS, by passing the path in a query string, same path that works in the root index.html as I described before). Same result.
Video tag with source src= cordova.file.documentsDirectory + 'cdvfile://localhost/persistent/content/myfolder/videos/myvideo.mp4'. Same result.
All the combination of previous things. Same result....
Loading the downloaded resources in a DIV is not an option, because the resources (images, css, javascripts, audios, videos, etc.) are downloaded on other iOS device's folder: the app's Documents' folder (cdvfile://localhost/persistent/).
I thing I tried almost everything... Why is not trivial to play a video tag, inside an html, that are both in the app's Documents' folder???
:-(
EDIT 1: Cordova Version = 3.6.3
Solution Founded!!
In almost all the android and iOS examples, downloaded content is being executed from "cordova.file.documentsDirectory".
Then, when you link this content in a or (by using AJAX), everything works fine (CSS, images, links) but media tags ( and ).
Again, I dont know why, but almost all the examples downloads and unzip contents by using this path.
After several days being blocked with this issue (I found lots of forums where the devs have to modify all their projects by using plugins like Cordova Media, jaeger25 Html5Video, etc, etc), I tried by using the following path: "cordova.file.dataDirectory"
I download, unzip and execute the HTMLs from this path and everything works with no parsing/modifications to the HTML files (that in my case were thousands). 100% compability with and tags with relative sources' path in an IFRAME!!!!!!
I guess you code the video links into the index.html inside the zip you decompress on the device.
Those links need to get "updated" with some javascript parser, BEFORE you actually load or navigate to this page in your phonegap app.
If your example is caused in Android, you definetly need to include the HTML5 Video plugin here:
https://github.com/jaeger25/Html5Video
On iOS the tag will work for local files. But the links need to be absolute.
And the links will change if you recompile your app or reinstall it.
The files will be available, but the APP ID will have changed and the absolute path also.
Example of an iOS path:
/var/mobile/Applications/<application UUID>/Documents/path/to/file
Hope you solved your problem.

Way to Preview Twitter Widgets Locally

I'm building a website locally and would like to be able to see what the embedded Twitter widgets look like without uploading everything.
Here is the code for a basic Follow button (fiddle):
Follow #twitter
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
If you save this locally on your computer as whatever.html and then open it, you'll notice that the widget script never loads the widget.
Is there any way to get this to work? Thanks.
Add http: before the word "platform" in this portion of the code:
src="//platform.twitter.com/widgets.js"
so that it reads:
src="http://platform.twitter.com/widgets.js"

Resources