-
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
Conversation
@@ -325,6 +325,11 @@ def hls_manifest | |||
end | |||
end | |||
|
|||
def caption_manifest | |||
return head :unauthorized if cannot?(:read, @master_file) | |||
@caption = @master_file.captions |
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. The caption_manifest
erb file does not acually make use of this but rather uses the captions_master_file_path
. Shouldn't interfere with testing though.
@@ -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 comment
The 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.
resource '/master_files/*/caption_manifest', headers: :any, methods: [:get] | ||
resource '/master_files/*/captions', headers: :any, methods: [:get] |
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.
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.
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.
Looks fine for testing. We'll need to clean things up and add tests later.
Proof of concept for providing captions in HLS manifest. Test on Browserstack and evaluate approach.