pre-certification, cobalt can't render webp page - youtube

For YouTube pre-certification, cobalt needs to render some pages that YouTube assigned.
We test the three commands below:
./cobalt --url=http://www.gstatic.com/webp/gallery/1.webp --allow_http --csp_mode=disable
./cobalt --url=http://www.gstatic.com/webp/gallery/1.webp --disable_navigation_whitelist
./cobalt --url=http://www.gstatic.com/webp/gallery/1.webp --disable_navigation_whitelist --allow_http
but cobalt renders nothing. Could someone guide us on how to render a webp page for pre-certification?

https://www.gstatic.com/webp/gallery/1.webp is not Cobalt compatible.
Please use the following WebP test cases for the pre-certification.
https://qual-e.appspot.com/webp.html
https://qual-e.appspot.com/awebp.html
These sites might not work with Gold build as of now. I will make changes to these sites to work on Gold build and notify here once it's done.
Going forward, I will mention this in the pre-certification document.

Related

Rich link preview in flutter

Is it possible to make a preview from an url, grabbing all the information such as title, relevant texts and images. Is there any plugins I can use readily?
See this Native android plugin
You can do this way :
1)Create a user at https://www.linkpreview.net
2)Generate an Access Key.
3)From your code call
http://api.linkpreview.net/?key=<Your_API_KEY_From_Step_2>&q=https://www.google.com
It returns the meta tags in JSON as below :
{"title":"Google","description":"Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.","image":"http:\/\/www.google.com\/images\/branding\/googlelogo\/1x\/googlelogo_white_background_color_272x92dp.png","url":"https:\/\/www.google.com\/"}
4) Use it in flutter widget to create a preview.
Hope I'm not late to answer this question, There is a plugin for link with previews Rich link preview
Currently, there is not an open source library for flutter providing these meta tags for a website.
There is a temporal solution, using these freemium APIs for getting this information. The main drawback is that the requests are limited before paying.
I know I'm a bit late but I found a solution for that.
The comment of Sudip might work but if you have a lot of preview to generate, you will have to subscribe and pay..
I couldn't use the library rich_link_preview because of some depency issues (it requires http < 1.12.0).
So I had to do it myself. Writting the complete answer in this comment would be too long so I'll tell you how I did it.
I followed this youtube tutorial. If you are too lazy to watch the entire video you can look at his Github Repo. It worked for me and it is not too long (there are only 2 relevant files):
lib/link_preview.dart
lib/helper/fetch_preview.dart

Rendering PDF in iOS

Need help on rendering PDF using CGPDFContext. I am currently using UIWebView to display PDF but would like to perform much more operation rather than just reading like Highlight Text, Search PDF, Annotate PDF. Not looking for using any Framework or library.
Any help will be beneficial. For a start, code on how to render PDF using CGPDF and displaying it instead of using UIWebView.
PDF annotations are a rabbit hole. I've been working on them since 2010. The spec is thousands of pages. It's easy to get started but it takes forever to get right with all the PDFs and variations out there. Even a simple feature like bookmarks are harder than you would think.
To date there's no open source framework that implements PDF annotations. The above linked one can be a good starting point. If you don't have months/years to build something on your own, there are a few commercial options available - like PSPDFKit, available for iOS, Android and Web, which I am building.
We have a guide article listing the most important PDF spec documents.
Searching is another tricky topic. It's quite hard to convert the PDF text data to unicode. The Adobe CIDFont spec is a good starting point.
You shoud try VFReader, it is an open source project for rendering PDF files on iOS. It can be a good starting point.

Firefox extensions equivalent with chrome's

I have one question:
There is the "matches" pattern in a manifest.json file which says under which domain the extension should function.
Is there the same for the firefox extension? Or must be determined in a js file?
If the second option is the correct one, could someone tell me how? Up to now, I get the url of the tab about 10 times (using alerts).
If you know any website which provide examples for 100% amateurs for ff extensions, I would appreciate it, its 2 days I crawl the internet without stopping but I cant find a complete solution!
Thank you for reading.
Firefox addons don't necessarily run on a per-website basis -- they can exist independently of this (like a weather widget, for example). If you want to modify a page, based on its URL, you can use the page-mod module in the Addon SDK. Here's a tutorial to do just that.

Viewing Dynamic Flash website in ipad

Hello people
I am really facing a big ask. I have created a dynamic AS3 flash website which loads images and text from an xml file.
Everything is fine, it works okay. EXCEPT that it goes totally dead in Ipad / iphone. My client was somehow not aware of this. And now he is going ballistic about the importance of IPAD in todays world etc etc..
I know IPAD does NOT support flash. Other than the OBVIOUS solution of recoding the complete website in HTML5 etc, I just wanted to know if somebody has tried anything else that could somehow make it work.
I have heard about the following, would like to know if any of this would make sense:
1. USE FLASH SUPPORTIVE BROwSER APPS IN IPAD
like Photon, skyfire, Puffin : are these brosers any good!! observations !!
2. CONVERT THE FLASH FILE INTO HTML5
using :
(1) Google SWiffy
Tried converting flash to HTML5 using swiffy extension for flash professional cs5 but the output was a disaster. XMLlist ignored, .... the list of errors is endless.
(2) Using Flash Professional CS6 / Toolkit for CreateJS
Any body having experience With this?? Any suggestions.
(3) Sothink sWf decompiler - decompile to HTML5
(4) Adobe Wallaby
(5) Anything else that is out there ...
3. USE ADOBE AIR
(1) Repackage as an app for IOS
This would work but can never give the experience of a website. Any thoughts.
(2) Package as AIR execute able file that can be run on IPAD??
Does Apple Ipad allow the installation of AIR files ??
Can it somehow be added to a browser and where it may automatically be loaded into the safari browser in IPAD etc ?? Its highly unlikely. Any thoughts !!
I would really appreciate if anybody and everbody could share their eperiences with these options AND whether or not its worth the try !!
Is the only option available is RECODING ONLY!!
Thanks ... looking forward to all your inputs and suggestions
Thanking you all in anticipation
Moody
Like you I found swiffy a waste of time for most things other than very simple as2 animations.
I don't know about AIR, but CS6 toolkit with createjs is excellent. Have a look at the video on the adobe site (http://www.adobe.com/devnet/createjs.html) - it's a good introduction to what you can and can't do.
Pete

PDF Previewing and viewing

I'm creating a document viewing web application. You log in and it takes you to a screen where you have all your docs listed on the left. I want to make it so that when you roll over a document a preview of the document shows up on the right. From there you can click on it for a full view and printing capabilities. I'm not asking how to do all that but I'm wondering what the best way would be to go about rendering the preview of the document. The documents are all going to be pdfs and stored on a server. I'm working in asp.net 3.5 mvc in visual studios 2008.
For creating the PDF preview, first have a look at some other discussions on the subject on StackOverflow:
How can I take preview of documents?
Get a preview jpeg of a pdf on windows?
If these don't answer your question, you can try a couple more things:
You can get a commercial renderer (PDFViewForNet, PDFRasterizer.NET, ABCPDF, ActivePDF, ...).
Most are fairly expensive though, especially if all you care about is making thumbnails.
There is a CodeProject article that shows how to use the Adobe ActiveX, but it may be out of date, easily broken by new releases and its legality is murky.
Install GhostScript on the server and request rendered thumbnails of any page from it.
I did a small project that you will find on the Developer Express forums as an attachment.
Be careful of the license requirements for GhostScript through.
I use it for an internal software and it's working pretty well.
Hope this helps.
Here
I render the jpeg thumbnails of the first page of the pdf document when a file is uploaded.
When the user clicks he can download the document (or open them direcly in the browser) to read and print them.
Update: to create the thumbnails I used a .net component called PDFView4NET from O2Solutions

Resources