ConnectSDK / Connect-SDK-iOS

iOS source project for Connect SDK
Apache License 2.0
174 stars 136 forks source link

Add subtitle support #91

Closed viveksekar closed 9 years ago

viveksekar commented 10 years ago

Support for the following formats - SRT, SUB, SMI, SSA, SAMI. With UTF-8 encoding. CMB-918

iheart2code commented 10 years ago

We'll also need a JIRA task for this to have it be supported by the media player web app.

iheart2code commented 10 years ago

@reyawn @jlai is there a TV-side JavaScript API that allows you to easily enable closed-captions? Or is this a feature of Enyo that we'd need to use?

iheart2code commented 10 years ago

Here is the Cast SDK doc for subtitles.

jlai commented 10 years ago

AFAIK enyo does not have any subtitle support. There are three ways to show subtitles, generally:

  1. Platform-specific. For example, the NetCast plugin has a way to specify native subtitles when using its custom video player plugin object. Clunky.
  2. HTML5 "tracks" element for HTML5 video elements. Not sure how well supported this is.
  3. JavaScript library that displays DOM elements on top of the video tag. For example, http://captionatorjs.com/ which is a polyfill for HTML5 tracks.
iheart2code commented 10 years ago

I would prefer we went with the 2nd option for advanced platforms like webOS and possibly Samsung. For DLNA devices (Netcast), there may be some DLNA captioning support.

iheart2code commented 10 years ago

Regarding option 1 -- does webOS expose something that works with the video element?

reyawn commented 10 years ago

Yes, this is an issue that we have discussed in the past. It seems that Jason's #2 above would be the most "standards-compliant" way of doing it, but as he said I'm not sure how well supported this is or how it would look on the platform. Here's a page with a bunch of different audio samples:

http://www.cpcweb.com/webcasts/webcast_samples.htm

-Robert

On Wed, Aug 6, 2014 at 11:16 AM, Jeremy White notifications@github.com wrote:

I would prefer we went with the 2nd option for advanced platforms like webOS and possibly Samsung. For DLNA devices (Netcast), there may be some DLNA captioning support.

Reply to this email directly or view it on GitHub https://github.com/ConnectSDK/Connect-SDK-iOS/issues/91#issuecomment-51374567 .

eunikolsky commented 9 years ago

Android issue: https://github.com/ConnectSDK/Connect-SDK-Android/issues/214

eunikolsky commented 9 years ago

For DLNA, there is no specification for subtitles, so our implementation may not work on some devices. Xbox doesn't support subtitles: http://xbox.uservoice.com/forums/251646-apps/suggestions/6345301-support-subtitles-in-xbox-one-media-player

For FireTV, we can send subtitles (https://developer.amazon.com/public/apis/experience/fling/docs/working-with-built-in-receiver-on-fire-tv#Playing%20Media%20Content%20on%20the%20Built-in%20Receiver), but the user should manually enable one of them with the remote. There are no APIs to change/enable/disable subtitles in Fling SDK (at least, for the default player).

For Cast, based on experiments, the server is required to send the Access-Control-Allow-Origin: * response header. That is, the default http.server python3 module doesn't work, and a number of other web servers may not work either.

eunikolsky commented 9 years ago

To simplify tests and the DLNAService class, we should extract all the XML generation to another class.

eunikolsky commented 9 years ago

Merged into dev with https://github.com/ConnectSDK/Connect-SDK-iOS/pull/169.

eunikolsky commented 9 years ago

Need to add WebOS support as well.

eunikolsky commented 9 years ago

Merged into dev in https://github.com/ConnectSDK/Connect-SDK-iOS/commit/9e29d8341db5a2fbfe541b77d4573063aa942a2e and https://github.com/ConnectSDK/Connect-SDK-iOS-Lite/commit/51c1959296ef1b65a99d18bd153d5d72e61be04b.