This repository has been archived by the owner on May 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #382 from alexander-heimbuch/feature/error-handling
feat(error-handling): Handle player load error
- Loading branch information
Showing
69 changed files
with
2,214 additions
and
855 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content="{meta_description}"> | ||
<meta name="author" content=""> | ||
|
||
<title>Podlove Web Player - Playground</title> | ||
|
||
<link href="./assets/gitbook.min.css" rel="stylesheet"> | ||
<link href="https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/5.5.11/jsoneditor.min.css" rel="stylesheet"> | ||
</head> | ||
|
||
<body> | ||
<div class="wrapper"> | ||
<sidebar class="sidebar"> | ||
<ul class="navigation"> | ||
<li><a href="./index.html">Overview</a></li> | ||
<li><a href="./embedding.html">Embedding</a></li> | ||
<li><a href="./theme.html">Theming</a></li> | ||
<li><a href="./config.html">Configuration</a></li> | ||
<li><a href="./persistence.html">Player Persistence</a></li> | ||
<li><a href="./advanced.html">Advanced Usage</a></li> | ||
<li><a href="./playground.html">Playground</a></li> | ||
<li><a class="active" href="./error.html">Error Handling</a></li> | ||
<li><a href="./example.html">Example</a></li> | ||
</ul> | ||
</sidebar> | ||
|
||
<main class="content"> | ||
<div class="inner"> | ||
<h1>Error Handling</h1> | ||
<h3>Load Error</h3> | ||
<p id="load-error"></p> | ||
|
||
<h3>Missing Audio Reference</h3> | ||
<p id="reference-error"></p> | ||
<script src="embed.js"></script> | ||
<script> | ||
var config = { | ||
title: 'FS171 Invasion!', | ||
subtitle: 'LAN Planung - Kalender - Bingo - Wikipedia - Akkukalibration - Alte iPads und iPods - Find My Friends - iPhone Music Player - Apple Watch - Kommandozeile - Star Wars - Dante - Internet of Things Security - VPN', | ||
summary: 'Wir haben eine wie wir finden abwechslungsreiche Sendung produziert, die wir Euch wie immer mit Freude bereitstellen. Während die Live-Hörer Freak-Show-Bingo spielen, greifen wir das Wikipedia-Thema der letzten Sendung auf und liefern auch noch weitere Aspekte des optimalen Star-Wars-Medienkonsums frei Haus. Dazu viel Nerderei rund um die Kommandozeile, eine Einschätzung der Perspektive der Apple Watch, ein Rant über die mangelhafte Security im Internet of Things (and Buildings) und allerlei anderer Kram. Roddi setzt dieses Mal aus, sonst Vollbesetzung.', | ||
publicationDate: '2016-02-11T03:13:55+00:00', | ||
poster: 'https://freakshow.fm/wp-content/cache/podlove/04/662a9d4edcf77ea2abe3c74681f509/freak-show_200x200.jpg', | ||
show: { | ||
title: 'Freak Show', | ||
subtitle: 'Menschen! Technik! Sensationen!', | ||
summary: 'Die muntere Talk Show um Leben mit Technik, das Netz und Technikkultur. Bisweilen Apple-lastig aber selten einseitig. Wir leben und lieben Technologie und reden darüber. Mit Tim, hukl, roddi, Clemens und Denis. Freak Show hieß irgendwann mal mobileMacs.', | ||
poster: 'https://freakshow.fm/wp-content/cache/podlove/04/662a9d4edcf77ea2abe3c74681f509/freak-show_200x200.jpg', | ||
url: 'https://freakshow.fm' | ||
}, | ||
theme: { | ||
primary: '#2B8AC6' | ||
}, | ||
duration: '04:15:32', | ||
chapters: [ | ||
{ start:"00:00:00", title: 'Intro'}, | ||
{ start:"00:01:39", title: 'Begrüßung'}, | ||
{ start:"00:04:58", title: 'IETF Meeting Netzwerk'}, | ||
{ start:"00:18:37", title: 'Kalender'}, | ||
{ start:"00:33:40", title: 'Freak Show Bingo'}, | ||
{ start:"00:35:37", title: 'Wikipedia'}, | ||
{ start:"01:17:26", title: 'iPhone Akkukalibration'}, | ||
{ start:"01:24:55", title: 'Alte iPads und iPod touches'}, | ||
{ start:"01:31:02", title: 'Find My Friends'}, | ||
{ start:"01:41:46", title: 'iPhone Music Player'}, | ||
{ start:"01:56:13", title: 'Apple Watch'}, | ||
{ start:"02:11:51", title: 'Kommandozeile: System Appreciation'}, | ||
{ start:"02:23:10", title: 'Sound und Design für Games'}, | ||
{ start:"02:24:59", title: 'Kommandozeile: Remote Deployment'}, | ||
{ start:"02:32:37", title: 'Kommandozeile: Man Pages'}, | ||
{ start:"02:44:31", title: 'Kommandozeile: screen vs. tmux'}, | ||
{ start:"02:58:02", title: 'Star Wars: Machete Order & Phantom Edit'}, | ||
{ start:"03:20:05", title: 'Kopfhörer-Ersatzteile'}, | ||
{ start:"03:23:39", title: 'Dante'}, | ||
{ start:"03:38:03", title: 'Dante Via'}, | ||
{ start:"03:45:33", title: 'Internet of Things Security'}, | ||
{ start:"03:56:11", title: 'That One Privacy Guy\'s VPN Comparison Chart'}, | ||
{ start:"04:10:00", title: 'Ausklang'} | ||
], | ||
audio: [], | ||
reference: { | ||
config: '//podlove-player.surge.sh/fixtures/example.json', | ||
share: '//podlove-player.surge.sh/share' | ||
} | ||
}; | ||
|
||
podlovePlayer('#load-error', Object.assign({}, config, { | ||
audio: ['http://invalid.url'] | ||
})) | ||
|
||
podlovePlayer('#reference-error', Object.assign({}, config)) | ||
</script> | ||
</div> | ||
</main> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<template> | ||
<div class="error"> | ||
<h2 class="title" :style="titleStyle(theme)">{{ $t(error.title) }}</h2> | ||
<div class="description" :style="descriptionStyle(theme)">{{ $t(error.message) }}</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import store from 'store' | ||
import color from 'color' | ||
import ErrorIcon from 'icons/ErrorIcon.vue' | ||
const titleStyle = theme => ({ | ||
color: theme.player.title | ||
}) | ||
const descriptionStyle = theme => ({ | ||
color: color(theme.player.text).fade(0.25) | ||
}) | ||
export default { | ||
data () { | ||
return { | ||
poster: this.$select('poster'), | ||
title: this.$select('title'), | ||
showTitle: this.$select('showTitle'), | ||
subtitle: this.$select('subtitle'), | ||
theme: this.$select('theme'), | ||
error: this.$select('error') | ||
} | ||
}, | ||
methods: { | ||
titleStyle, | ||
descriptionStyle | ||
}, | ||
components: { | ||
ErrorIcon | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss"> | ||
@import 'variables'; | ||
$error-height: 100px; | ||
.error { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
flex-direction: column; | ||
height: $error-height; | ||
text-align: center; | ||
overflow: hidden; | ||
.title { | ||
margin-top: 0; | ||
margin-bottom: $margin / 3; | ||
font-weight: inherit; | ||
font-size: 1.8em; | ||
line-height: 1em; | ||
} | ||
.description { | ||
margin: 0; | ||
font-weight: inherit; | ||
font-size: 1em; | ||
line-height: 1.2em; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<template> | ||
<div class="header" :style="backgroundStyle(theme)"> | ||
<PodloveError v-if="components.error"/> | ||
<PodloveInfo v-if="components.info"/> | ||
</div> | ||
|
||
</template> | ||
|
||
<script> | ||
import store from 'store' | ||
import color from 'color' | ||
import PodloveInfo from './Info.vue' | ||
import PodloveError from './Error.vue' | ||
const backgroundStyle = theme => ({ | ||
'background-color': theme.player.background | ||
}) | ||
export default { | ||
data () { | ||
return { | ||
theme: this.$select('theme'), | ||
components: this.$select('components') | ||
} | ||
}, | ||
methods: { | ||
backgroundStyle | ||
}, | ||
components: { | ||
PodloveInfo, | ||
PodloveError | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss"> | ||
@import 'variables'; | ||
.header { | ||
padding: $padding $padding 0 $padding; | ||
overflow: hidden; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.