mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-02 06:26:26 -04:00
semicolons
This commit is contained in:
parent
eb7e48b059
commit
c72d3c4a0e
9 changed files with 73 additions and 73 deletions
|
@ -28,7 +28,7 @@ var options = {
|
|||
overrideNative: true
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (player_data.aspect_ratio) {
|
||||
options.aspectRatio = player_data.aspect_ratio;
|
||||
|
@ -147,7 +147,7 @@ if (isMobile()) {
|
|||
|
||||
buttons = ["playToggle", "volumePanel", "captionsButton"];
|
||||
|
||||
if (video_data.params.quality !== 'dash') buttons.push("qualitySelector")
|
||||
if (video_data.params.quality !== 'dash') buttons.push("qualitySelector");
|
||||
|
||||
// Create new control bar object for operation buttons
|
||||
const ControlBar = videojs.getComponent("controlBar");
|
||||
|
@ -155,35 +155,35 @@ if (isMobile()) {
|
|||
children: [],
|
||||
playbackRates: [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0]
|
||||
});
|
||||
buttons.slice(1).forEach(child => operations_bar.addChild(child))
|
||||
buttons.slice(1).forEach(child => operations_bar.addChild(child));
|
||||
|
||||
// Remove operation buttons from primary control bar
|
||||
primary_control_bar = player.getChild("controlBar");
|
||||
buttons.forEach(child => primary_control_bar.removeChild(child));
|
||||
|
||||
operations_bar_element = operations_bar.el();
|
||||
operations_bar_element.className += " mobile-operations-bar"
|
||||
player.addChild(operations_bar)
|
||||
operations_bar_element.className += " mobile-operations-bar";
|
||||
player.addChild(operations_bar);
|
||||
|
||||
// Playback menu doesn't work when it's initialized outside of the primary control bar
|
||||
playback_element = document.getElementsByClassName("vjs-playback-rate")[0]
|
||||
operations_bar_element.append(playback_element)
|
||||
playback_element = document.getElementsByClassName("vjs-playback-rate")[0];
|
||||
operations_bar_element.append(playback_element);
|
||||
|
||||
// The share and http source selector element can't be fetched till the players ready.
|
||||
player.one("playing", () => {
|
||||
share_element = document.getElementsByClassName("vjs-share-control")[0]
|
||||
operations_bar_element.append(share_element)
|
||||
share_element = document.getElementsByClassName("vjs-share-control")[0];
|
||||
operations_bar_element.append(share_element);
|
||||
|
||||
if (video_data.params.quality === 'dash') {
|
||||
http_source_selector = document.getElementsByClassName("vjs-http-source-selector vjs-menu-button")[0]
|
||||
operations_bar_element.append(http_source_selector)
|
||||
http_source_selector = document.getElementsByClassName("vjs-http-source-selector vjs-menu-button")[0];
|
||||
operations_bar_element.append(http_source_selector);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// Enable VR video support
|
||||
if (!video_data.params.listen && video_data.vr && video_data.params.vr_mode) {
|
||||
player.crossOrigin("anonymous")
|
||||
player.crossOrigin("anonymous");
|
||||
switch (video_data.projection_type) {
|
||||
case "EQUIRECTANGULAR":
|
||||
player.vr({projection: "equirectangular"});
|
||||
|
@ -280,7 +280,7 @@ player.on('volumechange', function () {
|
|||
|
||||
player.on('waiting', function () {
|
||||
if (player.playbackRate() > 1 && player.liveTracker.isLive() && player.liveTracker.atLiveEdge()) {
|
||||
console.log('Player has caught up to source, resetting playbackRate.')
|
||||
console.log('Player has caught up to source, resetting playbackRate.');
|
||||
player.playbackRate(1);
|
||||
}
|
||||
});
|
||||
|
@ -767,12 +767,12 @@ if (window.location.pathname.startsWith("/embed/")) {
|
|||
|
||||
// Create hyperlink for current instance
|
||||
redirect_element = document.createElement("a");
|
||||
redirect_element.setAttribute("href", `//${window.location.host}/watch?v=${window.location.pathname.replace("/embed/","")}`)
|
||||
redirect_element.appendChild(document.createTextNode("Invidious"))
|
||||
redirect_element.setAttribute("href", `//${window.location.host}/watch?v=${window.location.pathname.replace("/embed/","")}`);
|
||||
redirect_element.appendChild(document.createTextNode("Invidious"));
|
||||
|
||||
watch_on_invidious_button.el().appendChild(redirect_element)
|
||||
watch_on_invidious_button.addClass("watch-on-invidious")
|
||||
watch_on_invidious_button.el().appendChild(redirect_element);
|
||||
watch_on_invidious_button.addClass("watch-on-invidious");
|
||||
|
||||
cb = player.getChild('ControlBar')
|
||||
cb.addChild(watch_on_invidious_button)
|
||||
};
|
||||
cb = player.getChild('ControlBar');
|
||||
cb.addChild(watch_on_invidious_button);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue