Browse Source

Some updates here and there

master
Leonie 3 weeks ago
parent
commit
e639405e20
7 changed files with 19 additions and 44 deletions
  1. +1
    -1
      README.md
  2. +7
    -2
      package-lock.json
  3. +3
    -1
      package.json
  4. BIN
      tvbanner.png
  5. +0
    -17
      www/app.js
  6. +3
    -14
      www/player.js
  7. +5
    -9
      www/welcome.js

+ 1
- 1
README.md View File

@@ -9,7 +9,7 @@ Nordcast is a podcast streaming app by koyu.space
- Visual Studio Code
- Visual Studio Code extension for Cordova
- NodeJS with NPM (Installation through `nvm` recommended)
- Cordova
- Phonegap and Cordova
- Optional: Android or iOS SDK
- Optional: Python 3 with PIP for the backend



+ 7
- 2
package-lock.json View File

@@ -1496,6 +1496,11 @@
"version": "git+https://github.com/ghenry22/cordova-music-controls-plugin.git#430a2b1f3bb8af4f06d44d6a9a173bb1cea17fd1",
"from": "git+https://github.com/ghenry22/cordova-music-controls-plugin.git"
},
"cordova-plugin-android-tv": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/cordova-plugin-android-tv/-/cordova-plugin-android-tv-1.0.3.tgz",
"integrity": "sha1-eEHIWZPzPXSqPtAQsArntLV32go="
},
"cordova-plugin-customurlscheme": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cordova-plugin-customurlscheme/-/cordova-plugin-customurlscheme-5.0.0.tgz",
@@ -1532,8 +1537,8 @@
"integrity": "sha1-6sMVgQAphJOvowvolA5pj2HvvP4="
},
"cordova-plugin-music-controls2": {
"version": "git+https://github.com/ghenry22/cordova-music-controls-plugin.git#57c7fd4132f5fec478d33a9422987976440aafde",
"from": "git+https://github.com/ghenry22/cordova-music-controls-plugin.git"
"version": "git+https://github.com/ghenry22/cordova-plugin-music-controls2.git#57c7fd4132f5fec478d33a9422987976440aafde",
"from": "git+https://github.com/ghenry22/cordova-plugin-music-controls2.git"
},
"cordova-plugin-network-information": {
"version": "1.3.4",


+ 3
- 1
package.json View File

@@ -25,6 +25,7 @@
},
"cordova-music-controls": {},
"cordova-plugin-x-socialsharing": {},
"cordova-plugin-android-tv": {},
"cordova-plugin-music-controls2": {}
}
},
@@ -33,6 +34,7 @@
"cordova-file-cache": "^1.2.2",
"cordova-ios": "^5.1.1",
"cordova-music-controls": "git+https://github.com/ghenry22/cordova-music-controls-plugin.git",
"cordova-plugin-android-tv": "^1.0.3",
"cordova-plugin-customurlscheme": "5.0.0",
"cordova-plugin-darkmode": "1.0.0",
"cordova-plugin-device": "^1.1.7",
@@ -40,7 +42,7 @@
"cordova-plugin-file": "6.0.2",
"cordova-plugin-file-transfer": "1.7.1",
"cordova-plugin-globalization": "^1.0.9",
"cordova-plugin-music-controls2": "git+https://github.com/ghenry22/cordova-music-controls-plugin.git",
"cordova-plugin-music-controls2": "git+https://github.com/ghenry22/cordova-plugin-music-controls2.git",
"cordova-plugin-network-information": "^1.3.4",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-whitelist": "^1.3.4",


BIN
tvbanner.png View File

Before After
Width: 1280  |  Height: 720  |  Size: 19KB

+ 0
- 17
www/app.js View File

@@ -73,23 +73,6 @@ function removejscssfile(filename, filetype){

function drr2() {
$(document).ready(function() {
window.setTimeout(function() {
if (device.platform === "Android") {
// Disable media controls for weak testing device
if (device.model === "Nokia 2") {
disableMediaControls = true;
MusicControls.destroy(function() {
if (debug) {
console.log("Media controls destroyed")
}
}, function() {
if (debug) {
console.log("Error destroying media controls")
}
});
}
}
}, 3000);
window.setInterval(function() {
if (localStorage.getItem("uuid") === "dummy") {
$(".dlbutton").hide();


+ 3
- 14
www/player.js View File

@@ -17,10 +17,6 @@ window.setTimeout(function() {
$("#player__controls").hide();
} else {
$("#player__controls").show();
bplay();
window.setTimeout(function() {
bplay();
}, 200);
}
if (findGetParameter("view") === "settings") {
$("#view__cast").hide();
@@ -70,7 +66,7 @@ window.setInterval(function() {
$("#player").attr("width", "800");
$("#player").attr("width", "600");
}
});
}, 1000);

window.setInterval(function() {
try {
@@ -222,7 +218,7 @@ function addControls(file, secret, title, author, podcover, feed, feedtitle) {
// Headset events (Android only)
// All media button events are listed below
case 'music-controls-media-button' :
case 'music-controls-media-button-play-pause' :
bplay();
break;
case 'music-controls-headset-unplugged' :
@@ -852,14 +848,7 @@ window.setInterval(function() {
}, 1500);

window.setInterval(function() {
var color = localStorage.getItem("color-"+Base64.encode(localStorage.getItem("feed")).slice(0, -3));
var style = "background:rgba(" + color.split("\n")[0] + ",.9) !important;";
$("#player__controls").css("background", style.replace("background:", "").replace(" !important;", ""));
if (Number(color.split(",")[0]) > 140) {
$("#player__controls").css("color", "#333");
} else {
$("#player__controls").css("color", "#fff");
}

}, 1500);

function ffw() {


+ 5
- 9
www/welcome.js View File

@@ -1,5 +1,4 @@
document.addEventListener("deviceready", onDeviceReady, false);
var warning_nologin = "Warning: If you don't login you'll be only able to listen to podcasts. This might be suitable for you, but you won't be able to follow podcasts, download them or tell your fediverse friends about them. Are you sure you want to continue?";
var es = false;
var error = false;

@@ -122,13 +121,11 @@ $(document).ready(function() {
}
});
$("#nologin").click(function (e) {
if (window.confirm(warning_nologin)) {
localStorage.setItem("uuid", "dummy");
localStorage.setItem("username", "dummy");
window.setTimeout(function() {
location.href = "app.html#view=main";
}, 50);
}
localStorage.setItem("uuid", "dummy");
localStorage.setItem("username", "dummy");
window.setTimeout(function() {
location.href = "app.html#view=main";
}, 50);
e.preventDefault();
});
});
@@ -170,7 +167,6 @@ function onDeviceReady() {
$("#instance").attr("placeholder", "Server");
$("#kslogin").html("Anmelden");
$("#nologin").html("Weiter ohne Account");
warning_nologin = "Warnung: Ohne einen Account wirst du nur in der Lage sein Podcasts zu hören. Das mag zwar passend für dich sein, aber du kannst dann weder Podcasts folgen noch herunterladen oder im Fediverse mit deinen Freunden teilen. Möchtest du wirklich fortfahren?";
}
});
}

Loading…
Cancel
Save