Filepicker.io - video/* mimetype does not work in Chrome - filepicker.io

I've recently noticed a weirdness in Chrome where .mov files aren't being recognized as valid video files when picking. The following JSFiddle illustrates my point
http://jsfiddle.net/6aJBM/
You'll need to change the API key obviously. If open the above JSFiddle in Firefox, you can select both images and videos from the filesystem. If on the other hand you open it in Chrome, .mov files will be greyed out and therefore non-selectable. It seems like .mov files aren't registering as video files in Chrome. Has anyone ran into this issue?

This is really silly, but if you replace video/* with:
video/avi, video/quicktime, video/mpeg, video/mp4, video/ogg,
video/webm, video/x-ms-wmv, video/x-flv, video/x-matroska,
video/x-msvideo, video/x-dv
That will do the trick.
There's a odd bug/feature in Chrome that doesn't allow .mov to be selected. I'll have to look it up again, but iirc, chrome's behavior is considered strict, to the letter, compliance with the spec.

On the Filepicker blog they suggested using the extensions filter instead of mimetypes.
var acceptedExtensions = [
'3g2','3gp','3gp2','3gpp','3gpp2','aac','ac3','eac3','ec3','f4a',
'f4b','f4v','flv','highwinds','m4a','m4b','m4r','m4v','mkv','mov',
'mp3','mp4','oga','ogg','ogv','ogx','ts','webm','wma','wmv'
];
filepicker.pickAndStore({extensions: acceptedExtensions},...

Related

How to include subtitles in Azure Media Services' manifest?

Using the portal I uploaded a video to an input-asset and encoded it into an output-asset. On the output-asset I uploaded a .vtt file via "Upload captions" button. I can reproduce the video with the captions/subtitles in https://ampdemo.azureedge.net/, using the manifest URL and an extra URL for the .vtt file in the "Tracks" options. However other video players don't seem to support captions/subtitles via an extra URL (for example in Android or here). Is there a way to somehow include the captions/subtitles in the manifest? I see manifests from other sources including subtitles. For example, https://d3rlna7iyyu8wu.cloudfront.net/skip_armstrong/skip_armstrong_stereo_subs.m3u8 (can be played here).
Unfortunately there's not a way to add the captions to the manifest itself. However, you pointed to the Bitmovin player and it actually supports VTT captions as per https://bitmovin.com/docs/player/articles/subtitle-and-closed-captions-support. Here's some example code that includes the VTT link https://cdn.bitmovin.com/player/web/8/docs/interfaces/core_config.sourceconfig.html

Cannot embed image/gif to GitHub page

I'm trying to embed a GIF in a GitHub Pages page and tried every single way I found online can work. Here's my link:
https://github.com/jellyfishrui/Interactive-Programming-in-Python-Rice-University/blob/master/Week3/Stopwatch-the-Game/Instructions
The last line of code is the embedding code:
![StopWatch](https://github.com/jellyfishrui/Interactive-Programming-in-Python-Rice-University/blob/master/Week3/Stopwatch-the-Game/StopWatch.gif)
I also tried to embed the PNG (also saved as other formats like JPEG) and changed the extension to upper/lower case. But none of them can help me load the image. I also tried it on different browsers but they just all turned the same.
I tried the absolute/relative path and neither worked.
That file has no file extension but you're trying to use Markdown for the image. Try renaming it to Instructions.md.
Also, make sure the casing of the file matches the file you've uploaded. Guessing what case to use isn't likely to work.

Access downloaded pdf file path in HTML5 file system and display it in webview

In my chrome app, I am using HTML5 file system to save the pdf files to sand box.Downloading is working fine.But how do i access that downloaded file path? I want to give that path as webview source.
The best way, if it works, would be to use a filesystem URL. To get this use FileEntry.toURL
These don't work on external files (i.e. files that come from chrome.fileSystem.chooseEntry and are outside the app's sandbox) but should work for files in the app's sandbox.
Note, I am referring to filesystem:// urls not file://urls, which won't work as Marc Rochkind has pointed out in his answer.
Disclaimer: I haven't tested this, but I believe it should work.
You need to get the contents of the PDF into a data URL. See my answer to this question:
Download external pdf files to chrome packaged app's file system

Failed to display UIWebView to display docx/xlsx file with SFUZipEndOfCentralDirectoryError error with custom URL

We are writing some program to display documents on iOS. I think that there are a lot of confusion on the web about what type of documents which iOS UIWebView could display. Generally people refer to Technical Q&A QA1630 Using UIWebView to display select document types to see that all the MS office 07+ files (such as docx, xlsx, pptx) could not be displayed, however actually that is not what we see from testing. Actually we are able to display docx/xlsx/pptx document at UIWebView either loading from a remote URL, local file or in memory (loadData, here the baseURL can not be nil on simulator, see this link). Of course We are testing on latest version of iOS on iPhone simulator, it might be that the support was not at older iOS. At this point, We don't know that yet. If you know, please let me know.
However right now, We have one issue to display document at UIWebView by using custom URL for security reason. I did the custom URL by following the code here: protecting iOS resource. We could display xls, doc, ppt, pdf file, but not docx/xlsx/pptx, We got some error like this:
EXCEPTION SFUZipEndOfCentralDirectoryError: Could not find the end of central directory record
We tried to debug and could not figure what's to do here. Do you see similar error here? Could anyone shed some lights on this? Thanks very much.
It looks like the document you're trying to open might be corrupt. docx, xlsx, and pptx files are actually zip files containing a bunch of XML documents and other data. Check if you are able to uncompress the file on your computer by renaming it to .zip and then unzipping.

Why is this simple SVG not working on the iPhone?

I am not able to render a simple SVG rectangle on an iPhone running iOS 4.2.1. The code is directly taken from the w3schools tutorial here or you can try it from my server here. I understand that iOS supported SVG starting from version 2.1, so this should work! What am I missing?
Needless to say that the exact same document is rendered correctly on my desktop browsers and also on an iPad.
I'm afraid you need to set the content type as xml in older versions of Safari and Firefox to serve inline SVG (you can, however, use it in an img tag is you don't need to access its DOM). If you don't want change the doctype or the extension you can let the web server handle it. In Apache you would place an .htaccess file in your document root and put...
AddType application/xhtml+xml .html
I'm not sure if this causes any side effects elsewhere. You could only serve it to older versions of Safari with some rewrite conditions, but I'm not too familiar with the syntax to give you a straight answer.
You can see your file served as xhtml here:
http://duopixel.com/stack/svg.html