forked from hanami/hanami
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hanami#396 This commit exposes a `video` method to the view which can be used to generate HTML5 video tags. It accepts options to generate HTML attributes along with a block for creating fallback content and/or `source` and `track` tags.
- Loading branch information
1 parent
88091cc
commit afd2bb8
Showing
4 changed files
with
133 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 9 additions & 1 deletion
10
test/fixtures/collaboration/apps/web/app/templates/assets/index.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
<%= image('application.jpg') %> | ||
<%= image('application.jpg') %> | ||
<%= video('movie.mp4') %> | ||
<%= | ||
video do | ||
text "Your browser does not support the video tag" | ||
source src: view.asset_path('movie.mp4'), type: 'video/mp4' | ||
source src: view.asset_path('movie.ogg'), type: 'video/ogg' | ||
end | ||
%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters