Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
TabletopsAndAnvils committed Feb 5, 2021
1 parent 0425273 commit 03129cf
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
13 changes: 7 additions & 6 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
"patreon": "TabletopsAndAnvils"
}
],
"version": "0.0.3",
"version": "0.0.4",
"minimumCoreVersion": "0.7.5",
"compatibleCoreVersion": "0.7.9",

"styles": [
"/styles/fsmtabs.css"
"/styles/stream.css"
],

"esmodules": [
"./scripts/howler.js",
"/streamAudio.js"
],
"languages": [
Expand All @@ -40,9 +41,9 @@
"link":"https://github.com/TabletopsAndAnvils/Foundry-Stream-Module/blob/main/img/Screen%20Shot%202021-01-19%20at%2022.03.50.png"
}
],
"bugs": "https://github.com/TabletopsAndAnvils/FSMtabs/issues",
"url": "https://github.com/TabletopsAndAnvils/FSMtabs",
"bugs": "https://github.com/TabletopsAndAnvils/streamAudio/issues",
"url": "https://github.com/TabletopsAndAnvils/streamAudio",

"manifest": "https://raw.githubusercontent.com/TabletopsAndAnvils/FSMtabs/main/module.json",
"download": "https://github.com/TabletopsAndAnvils/FSMtabs/archive/0.0.3.zip"
"manifest": "https://raw.githubusercontent.com/TabletopsAndAnvils/streamAudio/main/module.json",
"download": "https://github.com/TabletopsAndAnvils/streamAudio/archive/0.0.4.zip"
}
37 changes: 22 additions & 15 deletions streamAudio.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
//import { registerSettings } from "../streamMod/scripts/settings";
// demo music url http://s3.yesstreaming.net:7062/stream

var stream = new Howl({
src: ['http://s3.yesstreaming.net:7062/stream'],
ext: ['mp3'],
autoplay: true,
html5: true
});
function streamPlay() {


function openStream() {
sound.play(stream);
}

function openStream() {
AudioHelper.play({src: "http://s3.yesstreaming.net:7062/stream", volume: 0.15, autoplay: true, loop: false}, true);
}

openStream();
Hooks.on("ready", function () {
streamDialog();
});

function streamDialog() {
$('.dialog').css({width: '350px'});
let streamPlayer = new Dialog({
title: `Underhill's Stream Audio`,
content: `<audio controls="controls">
<source src="http://radio.tabletopsandanvils.com:8000/radio.mp3" type="audio/mpeg" />
</audio>`,
buttons: {},
close: (html) => {
console.log(html);
}
});
streamPlayer.options.width = 316;
streamPlayer.position.width = 316;
streamPlayer.render(true)
}

0 comments on commit 03129cf

Please sign in to comment.