-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HLS captions for iOS #5082
HLS captions for iOS #5082
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<% caption = captions_master_file_path %> | ||
|
||
#EXTM3U | ||
#EXT-X-TARGETDURATION:<%= @master_file.duration %> | ||
#EXT-X-VERSION:3 | ||
#EXT-X-MEDIA-SEQUENCE:0 | ||
#EXT-X-PLAYLIST-TYPE:VOD | ||
#EXTINF:<%= @master_file.duration %> | ||
<%= caption %> | ||
#EXT-X-ENDLIST |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,8 @@ Unless required by applicable law or agreed to in writing, software distributed | |
--- END LICENSE_HEADER BLOCK --- | ||
%> | ||
#EXTM3U | ||
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",LANGUAGE="en",NAME="English",AUTOSELECT=YES,URI="<%= caption_manifest_master_file_path %>" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Final implementation could have a setting to specify a default caption language to avoid having to hardcode it as english. If this approach is implemented, would be good to eventually circle back and allow editors to define caption language, as well as provide an option to provide multiple caption files. |
||
<% @hls_streams.each do |hls| %> | ||
#EXT-X-STREAM-INF:BANDWIDTH=<%= hls[:bitrate] %> | ||
#EXT-X-STREAM-INF:BANDWIDTH=<%= hls[:bitrate] %>,SUBTITLES="subs" | ||
<%= hls[:url] %> | ||
<% end %> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,8 @@ class Application < Rails::Application | |
resource '/master_files/*/structure.json', headers: :any, methods: [:get, :post, :delete] | ||
resource '/master_files/*/waveform.json', headers: :any, methods: [:get] | ||
resource '/master_files/*/*.m3u8', headers: :any, credentials: true, methods: [:get, :head] | ||
resource '/master_files/*/caption_manifest', headers: :any, methods: [:get] | ||
resource '/master_files/*/captions', headers: :any, methods: [:get] | ||
Comment on lines
+50
to
+51
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if necessary for final implementation. These are necessary when an HLS manifest with captions is requested by an external player such as Ramp, but depending on how iOS handles the requests it may not be through CORS. If we are able to provide captions to IIIF players via the IIIF manifest, then the captions being included in the HLS manifest may only be necessary for iOS. |
||
resource '/timelines/*/manifest.json', headers: :any, methods: [:get, :post] | ||
end | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@caption = master_file.captions
is unnessary for final implementation. Thecaption_manifest
erb file does not acually make use of this but rather uses thecaptions_master_file_path
. Shouldn't interfere with testing though.