vidpush/app/views/videolistings/show.html.erb
2014-05-29 14:34:52 -04:00

62 lines
2.2 KiB
Plaintext

<% content_for :extra_head do %>
<script src="//player.bettervideo.com/player/video.dev.js"></script>
<script src="//player.bettervideo.com/plugins/bvPlugins.js"></script>
<% end %>
<div class="pull-right">
<%= link_to 'Back to Campaign', campaign_path(@videolisting.campaign.listingcode) %> |
<%= link_to 'Back to Campaigns List', campaigns_path %>
</div>
<h1><%= @videolisting.campaign.advertisername %> </h1>
<hr>
<p id="notice"><%= notice %></p>
<div class="row">
<div class="col-md-8">
<ul>
<li><h2>Video Code</h2>
Here is the video code:
<input type="text" id="videocode" value="<%= @videolisting.videocode %>">
<button class='clip_button' data-clipboard-target='videocode' data-clipboard-text='<%= @videolisting.videocode %>' id='clip_button' title='Click me to copy to clipboard.'>
<b>Copy To Clipboard...</b>
</button>
<hr>
<h3>Preview Video</h3>
<div class="video-js-responsive-container">
<video class="video-js vjs-blue-skin" id="bvVideo1" preload="auto" controls>
<source src="<%= @videolisting.get_video_url %>" type="video/mp4"></source> <!-- Video URL goes here" -->
</video>
</div>
</li>
</ul>
</div>
</div>
<% content_for :js_foot do %>
<script>
$(document).on('ready page:load', function () {
var clip = new ZeroClipboard($("#clip_button"));
});
</script>
<script>
videojs('bvVideo1',{
"width": 640,
"height": 360,
"poster": '//video2.bettervideo.com/video/PRO/JPG640x360/720.<%= @videolisting.videocode %>.jpg', // Video Preview URL goes here
"plugins": {
"errors": {},
"bvSocial": {"reddit":false,"delicious":false},
"bvReporting": {
"secondaryGA":"UA-XXXXXXXX-X", /* Put your Google Analytics UID here */
"secondaryLabel":"Interactive Video"
},
"bvThemeLoader": {}
}
}, function() { /* Player Ready Callback, 'this' => reference to this player */ } );
</script>
<% end %>