mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
22
.htaccess
22
.htaccess
@@ -1,15 +1,25 @@
|
||||
Options +FollowSymLinks
|
||||
RewriteEngine on
|
||||
RewriteBase /
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
|
||||
RewriteCond %{HTTPS} !=on
|
||||
RewriteRule ^(.*)$ https://%1/$1 [L]
|
||||
RewriteRule ^(.*)$ https://zoff.me/$1 [L]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(.*zoff.no.*)$
|
||||
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
|
||||
RewriteRule ^(.*)$ https://zoff.me/$1 [L]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^(.*zoff.me.*)$
|
||||
RewriteCond %{HTTPS} !=on
|
||||
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [L]
|
||||
RewriteRule ^/?(.*) https://zoff.me/$1 [L]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^zoff.no
|
||||
RewriteRule ^/?(.*) https://zoff.me/$1 [L]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^remote.zoff.no
|
||||
RewriteRule ^/?(.*) https://remote.zoff.me/$1 [L]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^remote.zoff.me
|
||||
RewriteCond %{REQUEST_URI} !/public/css
|
||||
RewriteCond %{REQUEST_URI} !/public/js
|
||||
RewriteCond %{REQUEST_URI} !/public/dist
|
||||
@@ -17,15 +27,15 @@ RewriteCond %{REQUEST_URI} !/public/images
|
||||
RewriteCond %{REQUEST_URI} !/public/font
|
||||
RewriteRule ^(.*)$ public/php/controller.php [L,NC,QSA]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^bot.zoff.no
|
||||
RewriteCond %{HTTP_HOST} ^bot.zoff.me
|
||||
|
||||
RewriteRule ^(.*)$ /public/php/bot.php [L,NC,QSA]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^zoff.no
|
||||
RewriteCond %{HTTP_HOST} ^zoff.me
|
||||
RewriteCond %{REQUEST_URI} /o_callback
|
||||
RewriteRule ^(.*)$ public/html/callback.html [L,NC,QSA]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^zoff.no
|
||||
RewriteCond %{HTTP_HOST} ^zoff.me
|
||||
RewriteCond %{REQUEST_URI} /_embed
|
||||
RewriteRule ^(.*)$ public/html/embed.html [L,NC,QSA]
|
||||
|
||||
|
||||
10
README.md
10
README.md
@@ -1,9 +1,9 @@
|
||||
Zöff
|
||||
Zoff
|
||||
====
|
||||
|
||||
##### The server-side is required for this website, and it's found at: <a href="https://github.com/zoff-music/zoff-server">here</a>
|
||||
|
||||
### Zöff now supports integrated casting with chromecast!
|
||||
### Zoff now supports integrated casting with chromecast!
|
||||
|
||||
##### Config
|
||||
|
||||
@@ -11,9 +11,9 @@ To get the website to run as intended, please enabled mod_rewrite for apache2, a
|
||||
|
||||
### About
|
||||
|
||||
Zöff is a shared (free) YouTube based radio service, built upon the YouTube API.
|
||||
Zoff is a shared (free) YouTube based radio service, built upon the YouTube API.
|
||||
|
||||
Zöff is mainly a webbased service. The website uses <a href="https://nodejs.org/">NodeJS</a> with <a href="http://socket.io/">Socket.IO</a>, <a href="https://www.mongodb.org/">MongoDB</a> and PHP on the backend, with JavaScript, jQuery and <a href="http://materializecss.com/">Materialize</a> on the frontend.
|
||||
Zoff is mainly a webbased service. The website uses <a href="https://nodejs.org/">NodeJS</a> with <a href="http://socket.io/">Socket.IO</a>, <a href="https://www.mongodb.org/">MongoDB</a> and PHP on the backend, with JavaScript, jQuery and <a href="http://materializecss.com/">Materialize</a> on the frontend.
|
||||
|
||||
The team consists of Kasper Rynning-Tønnesen and Nicolas Almagro Tonne, and the project has been worked on since late 2014.
|
||||
|
||||
@@ -81,6 +81,6 @@ Copyright © 2017
|
||||
Nicolas Almagro Tonne and Kasper Rynning-Tønnesen
|
||||
|
||||
Creative Commons License
|
||||
Zöff is licensed under a
|
||||
Zoff is licensed under a
|
||||
<a href="http://creativecommons.org/licenses/by-nc-nd/3.0/no/">Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Norway License.</a>.
|
||||
Do not redistribute without permission from the developers.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"short_name": "Zöff",
|
||||
"name": "Zöff",
|
||||
"short_name": "Zoff",
|
||||
"name": "Zoff",
|
||||
"icons": [
|
||||
{
|
||||
"src": "public/images/144x144.png",
|
||||
|
||||
@@ -1064,7 +1064,7 @@ hide mdi-action-visibility mdi-action-visibility-off
|
||||
}
|
||||
|
||||
.room-namer.autocomplete{
|
||||
margin-left:0px !important;
|
||||
margin-left:5px !important;
|
||||
}
|
||||
|
||||
.channel-finder .input-field{
|
||||
|
||||
2
public/dist/callback.min.js
vendored
2
public/dist/callback.min.js
vendored
@@ -1 +1 @@
|
||||
!function(){function e(e){var t,a=e.substring(1).split("&"),n={};for(var i in a)t=a[i].split("="),2==t.length&&(n[t[0]]=t[1]);return n}window.addEventListener("load",function(){var t,a,n,i=e(window.location.hash),o=window.location.protocol+"//"+window.location.hostname+"/o_callback";if(i.spotify)t="b934ecdd173648f5bcd38738af529d58",a="token",n="playlist-read-private playlist-read-collaborative user-read-private playlist-modify-public",state=i.nonce,window.location.href="https://accounts.spotify.com/authorize?client_id="+t+"&scope="+n+"&show_dialog=false&response_type="+a+"&redirect_uri="+o+"&state="+state;else if(i.youtube)t="944988770273-butsmlr1aotlsskk8lmgvh0etqqekigf.apps.googleusercontent.com",a="token",n="https://www.googleapis.com/auth/youtube",state=i.nonce,window.location.href="https://accounts.google.com/o/oauth2/v2/auth?client_id="+t+"&response_type="+a+"&state="+state+"&redirect_uri="+o+"&scope="+n;else{var s=e(window.location.hash);window.opener.callback(s)}})}();
|
||||
!function(){function o(o){var t,e=o.substring(1).split("&"),a={};for(var i in e)t=e[i].split("="),2==t.length&&(a[t[0]]=t[1]);return a}window.addEventListener("load",function(){var t,e,a,i=o(window.location.hash),n=window.location.protocol+"//"+window.location.hostname+"/o_callback";if(i.spotify)t="b934ecdd173648f5bcd38738af529d58",e="token",a="playlist-read-private playlist-read-collaborative user-read-private playlist-modify-public",state=i.nonce,window.location.href="https://accounts.spotify.com/authorize?client_id="+t+"&scope="+a+"&show_dialog=false&response_type="+e+"&redirect_uri="+n+"&state="+state;else if(i.youtube)t="944988770273-butsmlr1aotlsskk8lmgvh0etqqekigf.apps.googleusercontent.com",e="token",a="https://www.googleapis.com/auth/youtube",state=i.nonce,window.location.href="https://accounts.google.com/o/oauth2/v2/auth?client_id="+t+"&response_type="+e+"&state="+state+"&redirect_uri="+n+"&scope="+a;else{var s=o(window.location.hash);window.opener.callback(s)}})}();
|
||||
4
public/dist/embed.min.js
vendored
4
public/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
8
public/dist/main.min.js
vendored
8
public/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -41,7 +41,7 @@ $(document).ready(function(){
|
||||
$("head").append('<link type="text/css" rel="stylesheet" href="/public/css/embed.css" />');
|
||||
$("head").append('<link type="text/css" rel="stylesheet" href="/public/css/materialize.min.css" />');
|
||||
|
||||
add = "https://zoff.no";
|
||||
add = "https://zoff.me";
|
||||
socket = io.connect(''+add+':8080', connection_options);
|
||||
|
||||
socket.on("get_list", function(){
|
||||
@@ -86,7 +86,7 @@ function setVolume(val) {
|
||||
}
|
||||
|
||||
$(document).on( "click", "#zoffbutton", function(e){
|
||||
window.open("https://zoff.no/" + chan.toLowerCase() + "/", '_blank');
|
||||
window.open("https://zoff.me/" + chan.toLowerCase() + "/", '_blank');
|
||||
});
|
||||
|
||||
$(document).on( "click", ".vote-container", function(e){
|
||||
|
||||
@@ -354,12 +354,12 @@ String.prototype.capitalizeFirstLetter = function() {
|
||||
};
|
||||
|
||||
function share_link_modifier_frontpage(){
|
||||
$("#facebook-code-link").attr("href", "https://www.facebook.com/sharer/sharer.php?u=https://zoff.no/");
|
||||
$("#facebook-code-link").attr("onclick", "window.open('https://www.facebook.com/sharer/sharer.php?u=https://zoff.no/', 'Share Zoff','width=600,height=300'); return false;");
|
||||
$("#twitter-code-link").attr("href", "https://twitter.com/intent/tweet?url=https://zoff.no/&text=Check%20out%20Zoff!&via=zoffmusic");
|
||||
$("#twitter-code-link").attr("onclick", "window.open('https://twitter.com/intent/tweet?url=https://zoff.no/&text=Check%20out%20Zoff!&via=zoffmusic','Share Playlist','width=600,height=300'); return false;");
|
||||
$("#qr-code-link").attr("href", "//chart.googleapis.com/chart?chs=500x500&cht=qr&chl=https://zoff.no/&choe=UTF-8&chld=L%7C1");
|
||||
$("#qr-code-image-link").attr("src", "//chart.googleapis.com/chart?chs=150x150&cht=qr&chl=https://zoff.no/&choe=UTF-8&chld=L%7C1");
|
||||
$("#facebook-code-link").attr("href", "https://www.facebook.com/sharer/sharer.php?u=https://zoff.me/");
|
||||
$("#facebook-code-link").attr("onclick", "window.open('https://www.facebook.com/sharer/sharer.php?u=https://zoff.me/', 'Share Zoff','width=600,height=300'); return false;");
|
||||
$("#twitter-code-link").attr("href", "https://twitter.com/intent/tweet?url=https://zoff.me/&text=Check%20out%20Zoff!&via=zoffmusic");
|
||||
$("#twitter-code-link").attr("onclick", "window.open('https://twitter.com/intent/tweet?url=https://zoff.me/&text=Check%20out%20Zoff!&via=zoffmusic','Share Playlist','width=600,height=300'); return false;");
|
||||
$("#qr-code-link").attr("href", "//chart.googleapis.com/chart?chs=500x500&cht=qr&chl=https://zoff.me/&choe=UTF-8&chld=L%7C1");
|
||||
$("#qr-code-image-link").attr("src", "//chart.googleapis.com/chart?chs=150x150&cht=qr&chl=https://zoff.me/&choe=UTF-8&chld=L%7C1");
|
||||
}
|
||||
|
||||
function initfp(){
|
||||
@@ -385,7 +385,7 @@ function initfp(){
|
||||
|
||||
share_link_modifier_frontpage();
|
||||
|
||||
if(window.location.hostname == "zoff.no") add = "https://zoff.no";
|
||||
if(window.location.hostname == "zoff.me") add = "https://zoff.me";
|
||||
else add = window.location.hostname;
|
||||
if(socket === undefined || Helper.mobilecheck()) socket = io.connect(''+add+':8080', connection_options);
|
||||
if($("#alreadyfp").length === 0 || Helper.mobilecheck() || !socket._callbacks.$playlists){
|
||||
|
||||
@@ -807,8 +807,8 @@ var List = {
|
||||
showToggle=false;
|
||||
$("#toptitle").empty();
|
||||
$("#chan").addClass("bigChan");
|
||||
//$("#chan").html("zoff.no/"+encodeURI(chan));
|
||||
$("#chan").html("zoff.no/"+chan.toLowerCase());
|
||||
//$("#chan").html("zoff.me/"+encodeURI(chan));
|
||||
$("#chan").html("zoff.me/"+chan.toLowerCase());
|
||||
}else{
|
||||
showToggle=true;
|
||||
$("#toptitle").html("Zoff");
|
||||
|
||||
@@ -319,7 +319,7 @@ function init(){
|
||||
|
||||
share_link_modifier_channel();
|
||||
|
||||
if(window.location.hostname == "zoff.no") add = "https://zoff.no";
|
||||
if(window.location.hostname == "zoff.me") add = "https://zoff.me";
|
||||
else add = window.location.hostname;
|
||||
|
||||
if(Player !== undefined) Player.stopInterval= false;
|
||||
@@ -487,7 +487,7 @@ initializeCastApi = function() {
|
||||
switch (event.sessionState) {
|
||||
case cast.framework.SessionState.SESSION_STARTED:
|
||||
castSession = cast.framework.CastContext.getInstance().getCurrentSession();
|
||||
castSession.addMessageListener("urn:x-cast:zoff.no", chromecastListener)
|
||||
castSession.addMessageListener("urn:x-cast:zoff.me", chromecastListener)
|
||||
chrome.cast.media.GenericMediaMetadata({title:song_title, image: 'https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg'});
|
||||
chrome.cast.Image('https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg');
|
||||
chromecastAvailable = true;
|
||||
@@ -499,13 +499,13 @@ initializeCastApi = function() {
|
||||
} catch(e){
|
||||
_seekTo = seekTo;
|
||||
}
|
||||
castSession.sendMessage("urn:x-cast:zoff.no", {type: "loadVideo", videoId: video_id, seekTo: _seekTo})
|
||||
castSession.sendMessage("urn:x-cast:zoff.no", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title})
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", videoId: video_id, seekTo: _seekTo})
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title})
|
||||
hide_native(1);
|
||||
break;
|
||||
case cast.framework.SessionState.SESSION_RESUMED:
|
||||
castSession = cast.framework.CastContext.getInstance().getCurrentSession();
|
||||
castSession.addMessageListener("urn:x-cast:zoff.no", chromecastListener);
|
||||
castSession.addMessageListener("urn:x-cast:zoff.me", chromecastListener);
|
||||
chrome.cast.media.GenericMediaMetadata({title:song_title, image: 'https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg'});
|
||||
chrome.cast.Image('https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg');
|
||||
chromecastAvailable = true;
|
||||
@@ -517,8 +517,8 @@ initializeCastApi = function() {
|
||||
} catch(e){
|
||||
_seekTo = seekTo;
|
||||
}
|
||||
castSession.sendMessage("urn:x-cast:zoff.no", {type: "loadVideo", videoId: video_id, seekTo: _seekTo})
|
||||
castSession.sendMessage("urn:x-cast:zoff.no", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title})
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", videoId: video_id, seekTo: _seekTo})
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title})
|
||||
hide_native(1);
|
||||
break;
|
||||
case cast.framework.SessionState.SESSION_ENDED:
|
||||
@@ -706,7 +706,7 @@ function disable_debug(){
|
||||
}
|
||||
|
||||
function embed_code(autoplay, width, height, color){
|
||||
return '<embed src="https://zoff.no/_embed#' + chan.toLowerCase() + '&' + color + autoplay + '" width="' + width + 'px" height="' + height + 'px">';
|
||||
return '<embed src="https://zoff.me/_embed#' + chan.toLowerCase() + '&' + color + autoplay + '" width="' + width + 'px" height="' + height + 'px">';
|
||||
}
|
||||
|
||||
function set_title_width(start){
|
||||
@@ -1572,12 +1572,12 @@ $(document).on("submit", "#find_form", function(e){
|
||||
|
||||
|
||||
function share_link_modifier_channel(){
|
||||
$("#facebook-code-link").attr("href", "https://www.facebook.com/sharer/sharer.php?u=https://zoff.no/" + chan.toLowerCase());
|
||||
$("#facebook-code-link").attr("onclick", "window.open('https://www.facebook.com/sharer/sharer.php?u=https://zoff.no/" + chan.toLowerCase() + "', 'Share Playlist','width=600,height=300'); return false;");
|
||||
$("#twitter-code-link").attr("href", "https://twitter.com/intent/tweet?url=https://zoff.no/" + chan.toLowerCase() + "&text=Check%20out%20this%20playlist%20" + chan.toLowerCase() + "%20on%20Zoff!&via=zoffmusic");
|
||||
$("#twitter-code-link").attr("onclick", "window.open('https://twitter.com/intent/tweet?url=https://zoff.no/" + chan.toLowerCase() + "/&text=Check%20out%20this%20playlist%20" + chan.toLowerCase() + "%20on%20Zoff!&via=zoffmusic','Share Playlist','width=600,height=300'); return false;");
|
||||
$("#qr-code-link").attr("href", "//chart.googleapis.com/chart?chs=500x500&cht=qr&chl=https://zoff.no/" + chan.toLowerCase() + "&choe=UTF-8&chld=L%7C1");
|
||||
$("#qr-code-image-link").attr("src", "//chart.googleapis.com/chart?chs=150x150&cht=qr&chl=https://zoff.no/" + chan.toLowerCase() + "&choe=UTF-8&chld=L%7C1");
|
||||
$("#facebook-code-link").attr("href", "https://www.facebook.com/sharer/sharer.php?u=https://zoff.me/" + chan.toLowerCase());
|
||||
$("#facebook-code-link").attr("onclick", "window.open('https://www.facebook.com/sharer/sharer.php?u=https://zoff.me/" + chan.toLowerCase() + "', 'Share Playlist','width=600,height=300'); return false;");
|
||||
$("#twitter-code-link").attr("href", "https://twitter.com/intent/tweet?url=https://zoff.me/" + chan.toLowerCase() + "&text=Check%20out%20this%20playlist%20" + chan.toLowerCase() + "%20on%20Zoff!&via=zoffmusic");
|
||||
$("#twitter-code-link").attr("onclick", "window.open('https://twitter.com/intent/tweet?url=https://zoff.me/" + chan.toLowerCase() + "/&text=Check%20out%20this%20playlist%20" + chan.toLowerCase() + "%20on%20Zoff!&via=zoffmusic','Share Playlist','width=600,height=300'); return false;");
|
||||
$("#qr-code-link").attr("href", "//chart.googleapis.com/chart?chs=500x500&cht=qr&chl=https://zoff.me/" + chan.toLowerCase() + "&choe=UTF-8&chld=L%7C1");
|
||||
$("#qr-code-image-link").attr("src", "//chart.googleapis.com/chart?chs=150x150&cht=qr&chl=https://zoff.me/" + chan.toLowerCase() + "&choe=UTF-8&chld=L%7C1");
|
||||
}
|
||||
|
||||
function before_toast(){
|
||||
|
||||
@@ -191,7 +191,7 @@ var Player = {
|
||||
|
||||
playVideo: function(){
|
||||
if(chromecastAvailable){
|
||||
castSession.sendMessage("urn:x-cast:zoff.no", {type: "playVideo"});
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "playVideo"});
|
||||
//socket.emit('pos', {channel: chan.toLowerCase()});
|
||||
chrome.cast.media.GenericMediaMetadata({metadataType: "GENERIC", title:song_title, image: 'https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg'});
|
||||
chrome.cast.Image('https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg');
|
||||
@@ -207,7 +207,7 @@ var Player = {
|
||||
|
||||
pauseVideo: function(){
|
||||
if(chromecastAvailable){
|
||||
castSession.sendMessage("urn:x-cast:zoff.no", {type: "pauseVideo"});
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "pauseVideo"});
|
||||
if($("#play").hasClass("hide")){
|
||||
$("#play").toggleClass("hide");
|
||||
$("#pause").toggleClass("hide");
|
||||
@@ -220,7 +220,7 @@ var Player = {
|
||||
|
||||
seekTo: function(_seekTo){
|
||||
if(chromecastAvailable){
|
||||
castSession.sendMessage("urn:x-cast:zoff.no", {type: "seekTo", seekTo: _seekTo});
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "seekTo", seekTo: _seekTo});
|
||||
} else if(!offline){
|
||||
Player.player.seekTo(_seekTo);
|
||||
} else {
|
||||
@@ -230,7 +230,7 @@ var Player = {
|
||||
|
||||
loadVideoById: function(id){
|
||||
if(chromecastAvailable){
|
||||
castSession.sendMessage("urn:x-cast:zoff.no", {type: "loadVideo", videoId: id});
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", videoId: id});
|
||||
chrome.cast.media.GenericMediaMetadata({metadataType: "GENERIC", title:song_title, image: 'https://img.youtube.com/vi/'+id+'/mqdefault.jpg'});
|
||||
chrome.cast.Image('https://img.youtube.com/vi/'+id+'/mqdefault.jpg');
|
||||
} else {
|
||||
@@ -240,7 +240,7 @@ var Player = {
|
||||
|
||||
stopVideo: function(){
|
||||
if(chromecastAvailable){
|
||||
castSession.sendMessage("urn:x-cast:zoff.no", {type: "stopVideo"});
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "stopVideo"});
|
||||
} else {
|
||||
try{
|
||||
Player.player.stopVideo();
|
||||
@@ -265,7 +265,7 @@ var Player = {
|
||||
Player.getTitle(song_title, viewers);
|
||||
Player.setBGimage(video_id);
|
||||
if(chromecastAvailable){
|
||||
castSession.sendMessage("urn:x-cast:zoff.no", {type: "loadVideo", videoId: video_id});
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", videoId: video_id});
|
||||
chrome.cast.media.GenericMediaMetadata({metadataType: "GENERIC", title:song_title, image: 'https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg'});
|
||||
chrome.cast.Image('https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg');
|
||||
} else {
|
||||
@@ -276,7 +276,7 @@ var Player = {
|
||||
|
||||
sendNext: function(obj){
|
||||
if(chromecastAvailable){
|
||||
castSession.sendMessage("urn:x-cast:zoff.no", {type: "nextVideo", title: obj.title, videoId: obj.videoId});
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "nextVideo", title: obj.title, videoId: obj.videoId});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -394,7 +394,7 @@ var Player = {
|
||||
};
|
||||
|
||||
img.crossOrigin = 'Anonymous';
|
||||
img.src = 'https://zoff.no:8081/https://img.youtube.com/vi/'+id+'/mqdefault.jpg';
|
||||
img.src = 'https://zoff.me:8081/https://img.youtube.com/vi/'+id+'/mqdefault.jpg';
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -118,12 +118,12 @@ var Playercontrols = {
|
||||
{
|
||||
if(!Player.player.isMuted())
|
||||
{
|
||||
if(chromecastAvailable) castSession.sendMessage("urn:x-cast:zoff.no", {type: "mute"});
|
||||
if(chromecastAvailable) castSession.sendMessage("urn:x-cast:zoff.me", {type: "mute"});
|
||||
Playercontrols.choose_button(0, true);
|
||||
Player.player.mute();
|
||||
}else
|
||||
{
|
||||
if(chromecastAvailable)castSession.sendMessage("urn:x-cast:zoff.no", {type: "unMute"});
|
||||
if(chromecastAvailable)castSession.sendMessage("urn:x-cast:zoff.me", {type: "unMute"});
|
||||
Player.player.unMute();
|
||||
Playercontrols.choose_button(Player.player.getVolume(), false);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ $(document).ready(function (){
|
||||
$("#about").modal();
|
||||
$("#contact").modal();
|
||||
|
||||
if(window.location.hostname == "remote.zoff.no") add = "https://zoff.no";
|
||||
if(window.location.hostname == "remote.zoff.me") add = "https://zoff.me";
|
||||
else add = "localhost";
|
||||
socket = io.connect(add + ':8080', connection_options);
|
||||
id = window.location.pathname.split("/")[1];
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</a>
|
||||
</div>
|
||||
<ul class="right hide-on-med-and-down">
|
||||
<li><a class="waves-effect green" title="Remote control a Zoff player" href="https://remote.zoff.no">Remote</a></li>
|
||||
<li><a class="waves-effect green" title="Remote control a Zoff player" href="https://remote.zoff.me">Remote</a></li>
|
||||
<li><a class="modal-trigger waves-effect waves-orange" onclick="$('#about').modal('open')">About</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -20,10 +20,10 @@ if(isset($_GET['chan'])){
|
||||
<img id="zicon" src="public/images/z.svg" alt="zoff" title="Zoff" />
|
||||
</a>
|
||||
<div id="frontpage-viewer-counter" data-position="bottom" data-delay="5" data-tooltip="Total viewers" class="noselect tooltipped" title="Divided among all channels. Hidden or not"></div>
|
||||
<!--<a href="//zoff.no" class="brand-logo brand-mobile hide-on-med-and-up">Zoff</a>-->
|
||||
<!--<a href="//zoff.me" class="brand-logo brand-mobile hide-on-med-and-up">Zoff</a>-->
|
||||
<ul class="right hide-on-med-and-down">
|
||||
<li><a class="header-buttons waves-effect waves-cyan" id="offline-mode" title="Private mode" href="#">Private</a></li>
|
||||
<li><a class="header-buttons waves-effect waves-green" title="Remote control a Zoff player" href="https://remote.zoff.no">Remote</a></li>
|
||||
<li><a class="header-buttons waves-effect waves-green" title="Remote control a Zoff player" href="https://remote.zoff.me">Remote</a></li>
|
||||
<li><a class="header-buttons modal-trigger waves-effect waves-orange" onclick="$('#about').modal('open')">About</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -82,7 +82,7 @@ if(isset($_GET['chan'])){
|
||||
<h5>Create a radio channel, collaborate and listen</h5>
|
||||
<form class="channel-finder">
|
||||
<div class="input-field">
|
||||
<p class="prefix">zoff.no/</p>
|
||||
<p class="prefix">zoff.me/</p>
|
||||
<input
|
||||
class="room-namer autocomplete desktop-search"
|
||||
type="text"
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="theme-color" content="#2D2D2D" />
|
||||
<meta property="og:image" content="https://zoff.no/public/images/favicon.png" />
|
||||
<meta property="og:url" content="https://zoff.no" />
|
||||
<meta property="og:image" content="https://zoff.me/public/images/favicon.png" />
|
||||
<meta property="og:url" content="https://zoff.me" />
|
||||
<meta property="og:title" content="Zoff"/>
|
||||
<meta property="og:description" content="The Shared (free) YouTube radio."/>
|
||||
<meta property="og:type" content="website"/>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
$headers = "From: " . $from . "\r\n";
|
||||
|
||||
if(filter_var($from, FILTER_VALIDATE_EMAIL) && $message != ""){
|
||||
$result = mail("contact@zoff.no", "ZOFF: Contact from form", $message, $headers);
|
||||
$result = mail("contact@zoff.me", "ZOFF: Contact from form", $message, $headers);
|
||||
|
||||
if($result == FALSE){
|
||||
echo "failure";
|
||||
|
||||
@@ -149,12 +149,12 @@
|
||||
</label>
|
||||
</div>
|
||||
<div><a id="code-link" target="_blank">
|
||||
<img id="code-qr" alt="QR code for control" title="Link to control this Zoff player" src="https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L%7C1&chl=http://zoff.no" />
|
||||
<img id="code-qr" alt="QR code for control" title="Link to control this Zoff player" src="https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L%7C1&chl=http://zoff.me" />
|
||||
|
||||
<h4 id="code-text">ABBADUR</h4>
|
||||
</a></div>
|
||||
<p>
|
||||
You can control this Zoff instance from another device by going to <b>https://remote.zoff.no/</b>
|
||||
You can control this Zoff instance from another device by going to <b>https://remote.zoff.me/</b>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -38,7 +38,7 @@ self.addEventListener('fetch', event => {
|
||||
(event.request.headers.get('accept').includes('text/html') ||
|
||||
event.request.headers.get('accept').includes('text/css') ||
|
||||
(event.request.headers.get('accept').includes('*/*') &&
|
||||
(event.request.url.includes('localhost') || event.request.url.includes('zoff.no')))))) {
|
||||
(event.request.url.includes('localhost') || event.request.url.includes('zoff.me')))))) {
|
||||
event.respondWith(
|
||||
fetch(event.request.url).catch(error => {
|
||||
if(event.request.url.includes('manifest.json')){
|
||||
|
||||
Reference in New Issue
Block a user