Giter Club home page Giter Club logo

mdio's Introduction

mdio

Build Status

A markdown document player. See example:

Installation

For webpack

$ npm install mdio

Getting Started

Markup the content

<div id='mdio'>
  # The Three Little Pigs

  ![cover](http://homepages.uni-paderborn.de/odenbach/wwwmath/pics/pigs/pig2.jpg)
  Once upon a time there was a mother pig who had three little pigs.
  The three little pigs grew so big that their mother said to them,
  ...
</div>

Setup the player

const mdio = Mdio({
  selector: '#mdio',
  utteranceLang: 'en-US'
})

Markup Instructions

Title and Cover

The title should be the 1st token with heading1. And the cover should be the 2nd token which is the image type with 'cover' alt.

# This is the title

![cover](image-url)

...

Speech under the Scene

![image-alt1](image-url-1)    
sentence 1
sentence 2
sentence 3

![image-alt2](image-url-2)
sentence 4
sentence 5

Local Action Optional Settings

Image Scene

![image-alt1](image-url-1) <!-- {...} -->

Single Speech

sentence 1 <!-- {"utteranceRate": 0.4} -->

Multiple Speech

<!-- block {"utteranceRate": 0.4} -->
![image-alt1](image-url-1)
sentence 1
sentence 2
sentence 3
<!-- endblock -->

Avaliable Options

  • selector: the CSS selector for refering the element which the player will be set to. (default: #mdio)

API

play(callback)

...

pause(callback)

...

stop(callback)

...

forward(callback)

...

backward(callback)

...

mdio's People

Contributors

wonderchang avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar  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.