Sha256: a1b71cef9ae44dc975f6e9619803462d20f1b6dd37006383c8be61653642c21c

Contents?: true

Size: 1.49 KB

Versions: 1

Compression:

Stored size: 1.49 KB

Contents

<div class="px-video-container" id="myvid">
	<div class="px-video-img-captions-container">
		<div class="px-video-captions hide" aria-hidden="true"></div>
		<video
			id="<%=options[:id]%>"
			<%= "controls" if !!options[:controls] %>
			width="<%=options[:width]%>"
			height="<%=options[:height]%>"
			poster="<%=options[:poster]%>"
			preload="<%=options[:preload]%>"
			data-setup="<%= options[:setup] %>"
		>
			<!-- source files -->
			<% if options[:sources] %>
				<%- options[:sources].each do |type, source| %>
					<source src="<%= source %>" type='video/<%= type %>' />
				<%- end %>
			<%- end %>
			
			<!-- text track file -->
			<% if options[:captions] %>
				<%- options[:captions].each do |lang, caption| %>
					<track kind="captions" src="<%= caption %>" srclang="<%= lang %>" label="<%= lang %>" />
				<%- end %>
			<%- end %>
			
			<!-- fallback for browsers that don't support the video element -->
			<div>
				<% if options[:sources] %>
					<%- options[:sources].each do |type, source| %>
						<a href="<%= source %>">
							<img src="<%=options[:poster]%>" width="<%=options[:width]%>" height="<%=options[:height]%>" alt="download video" />
						</a>
					<%- end %>
				<%- end %>
				
			</div>
		</video>
	</div><!-- end container for captions and video -->
	<div class="px-video-controls"></div>
</div><!-- end video container -->

<script>
	// Initialize
	new InitPxVideo({
	    "videoId": "myvid",
	    "captionsOnDefault": true,
	    "seekInterval": 20,
	    "debug": true
	});
</script>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pxvideo_rails-0.0.1 app/views/pxvideo_rails/_pxvideo_rails.html.erb