fixes #2522
This commit is contained in:
@@ -199,6 +199,12 @@ div#c-posts {
|
|||||||
div#seek-slider {
|
div#seek-slider {
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
float: right;
|
float: right;
|
||||||
|
overflow: visible;
|
||||||
|
background: #EEE;
|
||||||
|
|
||||||
|
.ui-progressbar-value {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#save-video-link {
|
#save-video-link {
|
||||||
|
|||||||
@@ -25,8 +25,7 @@
|
|||||||
<div id="ugoira-control-panel" style="width: <%= [@post.image_width, 350].max %>px;">
|
<div id="ugoira-control-panel" style="width: <%= [@post.image_width, 350].max %>px;">
|
||||||
<%= button_tag "Play", :id => "ugoira-play", :style => "display: none;" %>
|
<%= button_tag "Play", :id => "ugoira-play", :style => "display: none;" %>
|
||||||
<%= button_tag "Pause", :id => "ugoira-pause" %>
|
<%= button_tag "Pause", :id => "ugoira-pause" %>
|
||||||
<p id="ugoira-load-progress">Loaded <span id="ugoira-load-percentage">0</span>%</p>
|
<div id="seek-slider" style="width: <%= [@post.image_width, 350].max - 81 %>px;"></div>
|
||||||
<div id="seek-slider" style="display: none; width: <%= [@post.image_width, 350].max - 81 %>px;"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<p id="save-video-link">
|
<p id="save-video-link">
|
||||||
<% if post.has_ugoira_webm? %>
|
<% if post.has_ugoira_webm? %>
|
||||||
@@ -64,13 +63,7 @@
|
|||||||
$(function() {
|
$(function() {
|
||||||
Danbooru.Ugoira.create_player();
|
Danbooru.Ugoira.create_player();
|
||||||
$(Danbooru.Ugoira.player).on("loadProgress", function(ev, progress) {
|
$(Danbooru.Ugoira.player).on("loadProgress", function(ev, progress) {
|
||||||
$("#ugoira-load-percentage").text(Math.floor(progress * 100));
|
$("#seek-slider").progressbar("value", Math.floor(progress * 100));
|
||||||
});
|
|
||||||
$(Danbooru.Ugoira.player).on("loadingStateChanged", function(ev, state) {
|
|
||||||
if (state === 2) {
|
|
||||||
$("#ugoira-load-progress").remove();
|
|
||||||
$("#seek-slider").show();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var player_manually_paused = false;
|
var player_manually_paused = false;
|
||||||
@@ -89,6 +82,10 @@
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#seek-slider").progressbar({
|
||||||
|
value: 0
|
||||||
|
});
|
||||||
|
|
||||||
$("#seek-slider").slider({
|
$("#seek-slider").slider({
|
||||||
min: 0,
|
min: 0,
|
||||||
max: Danbooru.Ugoira.player._frameCount-1,
|
max: Danbooru.Ugoira.player._frameCount-1,
|
||||||
|
|||||||
Reference in New Issue
Block a user