Skip to content

Commit

Permalink
Merge pull request #1767 from sul-dlss/unnecessary-method
Browse files Browse the repository at this point in the history
  • Loading branch information
mjgiarlo authored Nov 17, 2023
2 parents c288788 + 785f63e commit b19e874
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/components/embed/media_tag_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ def enabled_streaming_sources
def transcript
return unless render_captions?

tag.track(src: file.vtt.file_url, kind: 'captions', srclang: 'en', label: 'English')
tag.track(src: @resource.vtt.file_url, kind: 'captions', srclang: 'en', label: 'English')
end

def render_captions?
@include_transcripts && file.vtt
@include_transcripts && @resource.vtt
end

# NOTE: This is only for the legacy media player. We can remove it when we switch to the new player.
Expand Down
4 changes: 0 additions & 4 deletions app/models/embed/purl/resource_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ def thumbnail?
image? && Settings.resource_types_that_contain_thumbnails.include?(resource.type)
end

def vtt
resource.files.find(&:vtt?)
end

def vtt?
mimetype == 'text/vtt'
end
Expand Down

0 comments on commit b19e874

Please sign in to comment.