Remove all references to wmode

Usage of wmode was specific to Flash, which is long dead.
This commit is contained in:
Xaekai 2022-01-31 17:02:10 -08:00
parent dd051098bc
commit 94e2fd10ad
10 changed files with 4 additions and 22 deletions

View file

@ -21,7 +21,6 @@ Setting | Description
--------|------------
Synchronize video playback | By default, CyTube attempts to synchronize the video so that everyone is watching at the same time. Some users with poor internet connections may wish to disable this in order to prevent excessive buffering due to constantly seeking forward.
Synch threshold | The number of seconds your video is allowed to be ahead/behind before it is forcibly seeked to the correct position. Should be set to at least 2 seconds to avoid buffering problems and choppy playback.
Set wmode=transparent | There's probably no reason to touch this unless you know what you're doing. Having a non-transparent wmode can cause modals to display behind the video player, but also can cause performance issues in some situations.
Remove the video player | Automatically remove the video player on page load. Equivalent to manually clicking Layout->Remove Video every time you load a channel.
Hide playlist buttons by default | Hides the control buttons from each video in the playlist, so that only the title is displayed. The control buttons can be shown by right clicking the video item in the playlist.
Old style playlist buttons | Legacy feature introduced in CyTube 2.0 for those who preferred the old 1.0-style video control buttons.

View file

@ -12,7 +12,6 @@ window.DailymotionPlayer = class DailymotionPlayer extends Player
params =
autoplay: 1
wmode: if USEROPTS.wmode_transparent then 'transparent' else 'opaque'
logo: 0
quality = @mapQuality(USEROPTS.default_quality)

View file

@ -51,9 +51,6 @@ window.PeerPlayer = class PeerPlayer extends Player
allow: 'autoplay; fullscreen'
)
if USEROPTS.wmode_transparent
video.attr('wmode', 'transparent')
@peertube = new PeerTubePlayer(video[0])
@peertube.addEventListener('playbackStatusChange', (status) =>

View file

@ -13,14 +13,9 @@ window.VimeoPlayer = class VimeoPlayer extends Player
removeOld(video)
video.attr(
src: "https://player.vimeo.com/video/#{data.id}"
webkitallowfullscreen: true
mozallowfullscreen: true
allowfullscreen: true
allow: 'autoplay; fullscreen'
)
if USEROPTS.wmode_transparent
video.attr('wmode', 'transparent')
@vimeo = new Vimeo.Player(video[0])
@vimeo.on('ended', =>

View file

@ -12,7 +12,6 @@ window.YouTubePlayer = class YouTubePlayer extends Player
waitUntilDefined(YT, 'Player', =>
removeOld()
wmode = if USEROPTS.wmode_transparent then 'transparent' else 'opaque'
@yt = new YT.Player('ytapiplayer',
videoId: data.id
playerVars:
@ -21,7 +20,6 @@ window.YouTubePlayer = class YouTubePlayer extends Player
controls: 1
iv_load_policy: 3 # iv_load_policy 3 indicates no annotations
rel: 0
wmode: wmode
events:
onReady: @onReady.bind(this)
onStateChange: @onStateChange.bind(this)

View file

@ -68,11 +68,6 @@ mixin us-playback
form.form-horizontal(action="javascript:void(0)")
+rcheckbox("us-synch", "Synchronize video playback")
+textbox("us-synch-accuracy", "Synch threshold (seconds)", "2")
+rcheckbox("us-wmode-transparent", "Set wmode=transparent")
.form-group
.col-sm-4
.col-sm-8
p.text-info Setting <code>wmode=transparent</code> allows objects to be displayed above the video player, but may cause performance issues on some systems.
+rcheckbox("us-hidevideo", "Remove the video player")
+rcheckbox("us-playlistbuttons", "Hide playlist buttons by default")
+rcheckbox("us-oldbtns", "Old style playlist buttons")

View file

@ -1168,6 +1168,8 @@ const Callbacks = {
}
};
window.Callbacks = Callbacks;
var SOCKET_DEBUG = {
enabled: (localStorage.getItem('cytube_socket_debug') === 'true'),
omit: (((data)=>{

View file

@ -122,7 +122,6 @@ var USEROPTS = {
synch : getOrDefault("synch", true),
sync_accuracy : getOrDefault("sync_accuracy", 2),
hidevid : getOrDefault("hidevid", false),
wmode_transparent : getOrDefault("wmode_transparent", true),
default_quality : getOrDefault("default_quality", "auto"),
qbtn_hide : getOrDefault("qbtn_hide", false),
qbtn_idontlikechange : getOrDefault("qbtn_idontlikechange", false),

View file

@ -917,7 +917,7 @@ function handleCSSJSTooLarge(selector) {
this.parentNode.insertBefore(notice[0], this);
} else {
let notice = document.querySelector(selector);
notice.remove();
notice?.remove();
}
}

View file

@ -649,7 +649,6 @@ function showUserOptions() {
$("#us-synch").prop("checked", USEROPTS.synch);
$("#us-synch-accuracy").val(USEROPTS.sync_accuracy);
$("#us-wmode-transparent").prop("checked", USEROPTS.wmode_transparent);
$("#us-hidevideo").prop("checked", USEROPTS.hidevid);
$("#us-playlistbuttons").prop("checked", USEROPTS.qbtn_hide);
$("#us-oldbtns").prop("checked", USEROPTS.qbtn_idontlikechange);
@ -687,7 +686,6 @@ function saveUserOptions() {
USEROPTS.synch = $("#us-synch").prop("checked");
USEROPTS.sync_accuracy = parseFloat($("#us-synch-accuracy").val()) || 2;
USEROPTS.wmode_transparent = $("#us-wmode-transparent").prop("checked");
USEROPTS.hidevid = $("#us-hidevideo").prop("checked");
USEROPTS.qbtn_hide = $("#us-playlistbuttons").prop("checked");
USEROPTS.qbtn_idontlikechange = $("#us-oldbtns").prop("checked");