mirror of
https://github.com/iv-org/invidious.git
synced 2024-08-21 19:43:23 +02:00
Fix player parameters
This commit is contained in:
parent
d25146d22f
commit
d75d34abdd
@ -129,11 +129,12 @@ var player = videojs('player', options, function() {
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
this.share(shareOptions);
|
||||
player.share(shareOptions);
|
||||
|
||||
<% if video_start > 0 || video_end > 0 %>
|
||||
this.markers({
|
||||
<% if video_start > 0 || video_end > 0 %>
|
||||
player.markers({
|
||||
onMarkerReached: function(marker) {
|
||||
if (marker.text === 'End') {
|
||||
if (player.loop()) {
|
||||
@ -151,23 +152,22 @@ var player = videojs('player', options, function() {
|
||||
{time: <%= video_end %>, text: 'End'}
|
||||
<% end %>
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
this.currentTime(<%= video_start %>);
|
||||
<% end %>
|
||||
player.currentTime(<%= video_start %>);
|
||||
<% end %>
|
||||
|
||||
<% if !listen %>
|
||||
var currentSources = player.currentSources();
|
||||
for ( var i = 0; i < currentSources.length; i++ ) {
|
||||
<% if !listen %>
|
||||
var currentSources = player.currentSources();
|
||||
for ( var i = 0; i < currentSources.length; i++ ) {
|
||||
if (player.canPlayType(currentSources[i]['type'].split(';')[0]) === '') {
|
||||
currentSources.splice(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
player.src(currentSources);
|
||||
<% end %>
|
||||
});
|
||||
player.src(currentSources);
|
||||
<% end %>
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
@ -138,11 +138,12 @@ var player = videojs('player', options, function() {
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
this.share(shareOptions);
|
||||
player.share(shareOptions);
|
||||
|
||||
<% if video_start > 0 || video_end > 0 %>
|
||||
this.markers({
|
||||
<% if video_start > 0 || video_end > 0 %>
|
||||
player.markers({
|
||||
onMarkerReached: function(marker) {
|
||||
if (marker.text === 'End') {
|
||||
if (player.loop()) {
|
||||
@ -160,28 +161,27 @@ var player = videojs('player', options, function() {
|
||||
{time: <%= video_end %>, text: 'End'}
|
||||
<% end %>
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
this.currentTime(<%= video_start %>);
|
||||
<% end %>
|
||||
player.currentTime(<%= video_start %>);
|
||||
<% end %>
|
||||
|
||||
<% if !listen %>
|
||||
var currentSources = player.currentSources();
|
||||
for ( var i = 0; i < currentSources.length; i++ ) {
|
||||
<% if !listen %>
|
||||
var currentSources = player.currentSources();
|
||||
for ( var i = 0; i < currentSources.length; i++ ) {
|
||||
if (player.canPlayType(currentSources[i]['type'].split(';')[0]) === '') {
|
||||
currentSources.splice(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
player.src(currentSources);
|
||||
<% end %>
|
||||
player.src(currentSources);
|
||||
<% end %>
|
||||
|
||||
<% if preferences %>
|
||||
this.volume(<%= preferences.volume.to_f / 100 %>);
|
||||
this.playbackRate(<%= preferences.speed %>);
|
||||
<% end %>
|
||||
});
|
||||
<% if preferences %>
|
||||
player.volume(<%= preferences.volume.to_f / 100 %>);
|
||||
player.playbackRate(<%= preferences.speed %>);
|
||||
<% end %>
|
||||
|
||||
function toggle(target) {
|
||||
body = target.parentNode.parentNode.children[1];
|
||||
|
Loading…
Reference in New Issue
Block a user