mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-22 10:58:50 +00:00
Commit whitespace
This commit is contained in:
@@ -93,7 +93,7 @@ var shareOptions = {
|
||||
description: "<%= description %>",
|
||||
image: "<%= thumbnail %>",
|
||||
embedCode: `<iframe id='ivplayer' type='text/html' width='640' height='360'
|
||||
src='<%= host_url %>/embed/<%= video.id %>?<%= host_params %>' frameborder='0'></iframe>`
|
||||
src='<%= host_url %>/embed/<%= video.id %>?<%= host_params %>' frameborder='0'></iframe>`
|
||||
};
|
||||
|
||||
var player = videojs("player", options, function() {
|
||||
@@ -102,37 +102,37 @@ var player = videojs("player", options, function() {
|
||||
seekStep: 5,
|
||||
enableModifiersForNumbers: false,
|
||||
customKeys: {
|
||||
play: {
|
||||
key: function(e) {
|
||||
// Toggle play with K Key
|
||||
play: {
|
||||
key: function(e) {
|
||||
// Toggle play with K Key
|
||||
return e.which === 75;
|
||||
},
|
||||
handler: function(player, options, e) {
|
||||
if (player.paused()) {
|
||||
player.play();
|
||||
} else {
|
||||
player.pause();
|
||||
}
|
||||
}
|
||||
},
|
||||
backward: {
|
||||
key: function(e) {
|
||||
// Go backward 5 seconds
|
||||
return e.which === 74;
|
||||
},
|
||||
handler: function(player, options, e) {
|
||||
player.currentTime(player.currentTime() - 5);
|
||||
}
|
||||
},
|
||||
forward: {
|
||||
key: function(e) {
|
||||
// Go forward 5 seconds
|
||||
return e.which === 76;
|
||||
},
|
||||
handler: function(player, options, e) {
|
||||
player.currentTime(player.currentTime() + 5);
|
||||
}
|
||||
handler: function(player, options, e) {
|
||||
if (player.paused()) {
|
||||
player.play();
|
||||
} else {
|
||||
player.pause();
|
||||
}
|
||||
}
|
||||
},
|
||||
backward: {
|
||||
key: function(e) {
|
||||
// Go backward 5 seconds
|
||||
return e.which === 74;
|
||||
},
|
||||
handler: function(player, options, e) {
|
||||
player.currentTime(player.currentTime() - 5);
|
||||
}
|
||||
},
|
||||
forward: {
|
||||
key: function(e) {
|
||||
// Go forward 5 seconds
|
||||
return e.which === 76;
|
||||
},
|
||||
handler: function(player, options, e) {
|
||||
player.currentTime(player.currentTime() + 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -141,23 +141,23 @@ player.share(shareOptions);
|
||||
|
||||
<% if video_start > 0 || video_end > 0 %>
|
||||
player.markers({
|
||||
onMarkerReached: function(marker) {
|
||||
onMarkerReached: function(marker) {
|
||||
if (marker.text === "End") {
|
||||
if (player.loop()) {
|
||||
if (player.loop()) {
|
||||
player.markers.prev("Start");
|
||||
} else {
|
||||
player.pause();
|
||||
}
|
||||
}
|
||||
},
|
||||
markers: [
|
||||
} else {
|
||||
player.pause();
|
||||
}
|
||||
}
|
||||
},
|
||||
markers: [
|
||||
{ time: <%= video_start %>, text: "Start" },
|
||||
<% if video_end < 0 %>
|
||||
<% if video_end < 0 %>
|
||||
{ time: <%= video.info["length_seconds"].to_f - 0.5 %>, text: "End" }
|
||||
<% else %>
|
||||
<% else %>
|
||||
{ time: <%= video_end %>, text: "End" }
|
||||
<% end %>
|
||||
]
|
||||
<% end %>
|
||||
]
|
||||
});
|
||||
|
||||
player.currentTime(<%= video_start %>);
|
||||
@@ -167,9 +167,9 @@ player.currentTime(<%= video_start %>);
|
||||
var currentSources = player.currentSources();
|
||||
for (var i = 0; i < currentSources.length; i++) {
|
||||
if (player.canPlayType(currentSources[i]["type"].split(";")[0]) === "") {
|
||||
currentSources.splice(i);
|
||||
i--;
|
||||
}
|
||||
currentSources.splice(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
player.src(currentSources);
|
||||
|
||||
Reference in New Issue
Block a user