Skip to content

Commit

Permalink
Merge pull request #5404 from avalonmediasystem/playlist_structure_fr…
Browse files Browse the repository at this point in the history
…agment

Use fragment_identifier in playlist item ranges
  • Loading branch information
masaball authored Oct 6, 2023
2 parents 24a62a9 + 43752cf commit 3cf72b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/iiif_playlist_canvas_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def simple_iiif_range(label = stream_info[:embed_title])
IiifManifestRange.new(
label: { "none" => [label] },
items: [
IiifPlaylistCanvasPresenter.new(playlist_item: playlist_item, stream_info: stream_info, media_fragment: "t=0,#{stream_info[:duration]}")
IiifPlaylistCanvasPresenter.new(playlist_item: playlist_item, stream_info: stream_info, media_fragment: fragment_identifier)
]
)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/models/iiif_playlist_canvas_presenter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
expect(subject.label.to_s).to eq "{\"none\"=>[\"#{playlist_item.title}\"]}"
expect(subject.items.size).to eq 1
expect(subject.items.first).to be_a IiifPlaylistCanvasPresenter
expect(subject.items.first.media_fragment).to eq "t=0,#{(master_file.duration.to_f)/1000}"
expect(subject.items.first.media_fragment).to eq "t=#{playlist_item.start_time / 1000},#{playlist_item.end_time / 1000}"
end
end

Expand Down

0 comments on commit 3cf72b5

Please sign in to comment.