Skip to content

Commit

Permalink
Prefer master tracks and hls and wait for NaN and Infinity.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus Eibrink-Lunzenauer authored and KatrinIhler committed May 16, 2024
1 parent 6f78812 commit 9e54332
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions frontend/js/integrations/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ define([
RegExp.prototype.test.bind(/application\/.*|video\/.*/),
_.property("mimetype")
));
videos = _.sortBy(videos, 'master').reverse();
videos.sort(
util.lexicographic([
util.firstWith(_.compose(
Expand Down
4 changes: 2 additions & 2 deletions frontend/js/player-adapter-html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ define(

window.Hls = Hls;
mediaElementPlayer = new mejs.MediaElementPlayer(targetElement, {
renderers: ["html5", "native_hls"],
renderers: ["native_hls", "html5"],
alwaysShowControls: true,
autoRewind: false,
stretching: "fill",
Expand All @@ -96,7 +96,7 @@ define(
*/
$(mediaElement).on("canplay durationchange", function () {
// If duration is still not valid
if (isNaN(self.getDuration()) || mediaElement.readyState < 1) {
if (!isFinite(self.getDuration()) || mediaElement.readyState < 1) {
return;
}

Expand Down

0 comments on commit 9e54332

Please sign in to comment.