mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Fixed some minor things on mobile
This commit is contained in:
2
static/dist/embed.min.js
vendored
2
static/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
4
static/dist/main.min.js
vendored
4
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -139,7 +139,7 @@ function init(){
|
|||||||
socket = io.connect(''+add+':8880', connection_options);
|
socket = io.connect(''+add+':8880', connection_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($("#alreadychannel").length == 0){
|
if($("#alreadychannel").length == 0 || window.mobilecheck()){
|
||||||
Player.setup_youtube_listener(chan);
|
Player.setup_youtube_listener(chan);
|
||||||
|
|
||||||
socket.on("get_list", function(){
|
socket.on("get_list", function(){
|
||||||
@@ -187,7 +187,7 @@ function init(){
|
|||||||
$("#channel-load").css("display", "none");
|
$("#channel-load").css("display", "none");
|
||||||
} else {
|
} else {
|
||||||
window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady;
|
window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady;
|
||||||
if(Player.ytplayer == "" || Player.ytplayer == undefined) Player.loadPlayer();
|
if(Player.ytplayer == "" || Player.ytplayer == undefined || window.mobilecheck()) Player.loadPlayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(window.mobilecheck()) Mobile_remote.initiate_volume();
|
if(window.mobilecheck()) Mobile_remote.initiate_volume();
|
||||||
@@ -596,7 +596,8 @@ function onepage_load(){
|
|||||||
$("#player").addClass("player_bottom");
|
$("#player").addClass("player_bottom");
|
||||||
$("#main-row").addClass("frontpage_modified_heights");
|
$("#main-row").addClass("frontpage_modified_heights");
|
||||||
} else {
|
} else {
|
||||||
if(!/iPad|iPhone|iPod/.test(navigator.userAgent)) Player.ytplayer.destroy();
|
console.log("destroying video");
|
||||||
|
Player.ytplayer.destroy();
|
||||||
Player.ytplayer = "";
|
Player.ytplayer = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ var Nochan = {
|
|||||||
$("main").attr("class", "container center-align main");
|
$("main").attr("class", "container center-align main");
|
||||||
$("body").attr("id", "channelpage");
|
$("body").attr("id", "channelpage");
|
||||||
$("header").html($($(e)[61]).html());
|
$("header").html($($(e)[61]).html());
|
||||||
if($("#alreadychannel").length == 0) $("main").html($($(e)[65]).html());
|
if($("#alreadychannel").length == 0 || window.mobilecheck()) $("main").html($($(e)[65]).html());
|
||||||
else {
|
else {
|
||||||
var main = $($($($($(e)[65]).html())[0]).html());
|
var main = $($($($($(e)[65]).html())[0]).html());
|
||||||
$("#main-row").append($(main[2]).clone().wrap("<div>").parent().html());
|
$("#main-row").append($(main[2]).clone().wrap("<div>").parent().html());
|
||||||
@@ -325,8 +325,8 @@ function initfp(){
|
|||||||
|
|
||||||
if(window.location.hostname == "zoff.no") add = "https://zoff.no";
|
if(window.location.hostname == "zoff.no") add = "https://zoff.no";
|
||||||
else add = window.location.hostname;
|
else add = window.location.hostname;
|
||||||
if(socket == undefined) socket = io.connect(''+add+':8880', connection_options);
|
if(socket == undefined || window.mobilecheck()) socket = io.connect(''+add+':8880', connection_options);
|
||||||
if($("#alreadyfp").length == 0){
|
if($("#alreadyfp").length == 0 || window.mobilecheck()){
|
||||||
socket.on('playlists', function(msg){
|
socket.on('playlists', function(msg){
|
||||||
$("#channels").empty();
|
$("#channels").empty();
|
||||||
frontpage = true;
|
frontpage = true;
|
||||||
|
|||||||
@@ -187,7 +187,8 @@ var Player = {
|
|||||||
$("#controls").css("opacity", "1");
|
$("#controls").css("opacity", "1");
|
||||||
$(".playlist").css("opacity", "1");
|
$(".playlist").css("opacity", "1");
|
||||||
Player.ytplayer.loadVideoById(video_id);
|
Player.ytplayer.loadVideoById(video_id);
|
||||||
if(autoplay && !window.mobilecheck()) Player.ytplayer.playVideo();
|
if(autoplay && !window.mobilecheck())
|
||||||
|
Player.ytplayer.playVideo();
|
||||||
if(!durationBegun)
|
if(!durationBegun)
|
||||||
Player.durationSetter();
|
Player.durationSetter();
|
||||||
if(embed){
|
if(embed){
|
||||||
|
|||||||
Reference in New Issue
Block a user