Git Product home page Git Product logo

interrogable-articles-demo's Introduction

Interrogable Articles Demo

A small web app demonstrating our idea that news articles are entities that can be interrogated for further information on the subject matter, or people/places therein.

Live Version

A the lastest version of this demo is available on Heroku.

What does this app do?

This app doesn't have any clever logic behind it. It's basically a playlist of audio files with gaps in between that a user can use to ask pre-prescribed questions according to a script.

Using

After the web page has been loaded, the audio sources will load. After every audio file has finished loading (or rather, triggered the canplay event), a 'start' button will appear at the bottom of the screen. Tapping this button will start the scripted playback of audio with a pause of 3000ms between each file for the interrogator to ask the scripted questions.

At any point in the demo, the 'stop' button can be pushed, which will reset the demo and allow it to be started again.

After all of the audio files have been played, the demo can be restarted by pushing the 'start' button again.

Changing the audio files

The audio files for this demo are located in the /audio folder of this repo. If you wish to add/remove/completely change the audio files, you can drop your own in here. Then, in /scripts/main.js, locate the variable audioSources. This is an array of paths for audio files that will be loaded after the app has been accessed in a browser. The order of the files in the audioSources array is the order that the files will be played back in during the demo.

Once you've added and arranged the audio files as you like, commit the changes and redeply them to Heroku.

Audio file formats

Depends on the browser that the web page is being run in. .m4a and .mp3 work well in Chrome.

Hidden fine controls

To toggle the visibility of extra controls for the audio (play, pause, next, an previous) tap the header of the demo app. If the demo has not been started already, the controls will not show, but will once you tap the 'Start Demo' button. To indicate whether or not the buttons have been toggled, a red border will appear along the top of the header.

Caveats/Gotchas

If you're running this demo in Chrome on a phone (Android), you need to change one one of Chrome's flags to enable the Javascript to play audio files without a user gesture. You can do this by going to chrome://flags on your device and disabling the 'Gesture requirement for media playback' flag.

interrogable-articles-demo's People

Contributors

seanmtracey avatar wheresrhys avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.