RE: Showing captions on local drive in Webkit

CORS settings: https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes

(related: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS)

JF

From: Terrill Thompson [mailto:tft@uw.edu]
Sent: Wednesday, November 12, 2014 12:46 PM
To: w3c-wai-ig@w3.org
Subject: Showing captions on local drive in Webkit

Hi All,
I'm getting an error in Webkit browsers when I try to add WebVTT captions to an HTML5 video on a local drive. Here's the code:

<video controls>

  <source src="test.mp4" type="video/mp4">

  <source src="test.webm" type="video/webm">

  <track kind="captions" src="test.vtt" srclang="en" default>

</video>
All test.* files are located in the same local directory as the HTML file.
The caption file validates according to https://quuz.org/webvtt/

Local captions play fine in both Firefox and IE11.
However, in Chrome, Safari, and Opera the video plays fine but there are no captions. The following error appears in the console:

> Text track from origin 'file://' has been blocked from loading: Not at same origin as the document, and parent of track element does not have a 'crossorigin' attribute. Origin 'null' is therefore not allowed access.
The captions play fine in these same Webkit browsers if all content is hosted on a web server.
I'm assuming this is a bug since the assertion "Not at same origin as the document" is false. Is there any reason to think otherwise? Do local WebVTT files pose any security risks that WebVTT files on a web server don't? Does the crossorigin attribute really have any role in delivering captions?
My use case is teaching students to add captions in a web design course. They don't have convenient access to a web server but they can add HTML5 video to a web page on their local drive and instantly view the results in any browser. However, unless there's a workaround they apparently can't do the same with captions.

Thanks,
Terrill


---
Terrill Thompson
Technology Accessibility Specialist
DO-IT, Accessible Technology Services
UW Information Technology
University of Washington
tft@uw.edu<mailto:tft@uw.edu>

This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED.  Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use.  If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.

Received on Wednesday, 12 November 2014 22:17:51 UTC