░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/var/www/canvas/lib/api/html
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: track_tag.rb
# frozen_string_literal: true # # Copyright (C) 2016 - present Instructure, Inc. # # This file is part of Canvas. # # Canvas is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, version 3 of the License. # # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more # details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # require "nokogiri" module Api module Html class TrackTag include LocaleSelection def initialize(media_track, doc, node_builder = Nokogiri::XML::Node) @media_track = media_track @doc = doc @node_builder = node_builder end attr_reader :media_track, :doc, :node_builder def to_node(url_helper) node_builder.new("track", doc).tap do |n| n["kind"] = media_track.kind n["srclang"] = media_track.locale n["src"] = url_helper.show_media_tracks_url( media_track.media_object_id, media_track.id ) n["label"] = language_name end end private def language_name available_locales[media_track.locale] || media_track.locale end end end end
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 content.rb
RB
6.9 KB
2023-09-24 03:39
EDIT
📄 link.rb
RB
2.8 KB
2023-09-24 03:36
EDIT
📄 media_tag.rb
RB
3.2 KB
2023-09-24 03:36
EDIT
📄 track_tag.rb
RB
1.5 KB
2023-09-24 03:36
EDIT
📄 url_proxy.rb
RB
9.3 KB
2023-09-24 03:36
EDIT